Olve.OpenRaster
0.1.1
See the version list below for details.
dotnet add package Olve.OpenRaster --version 0.1.1
NuGet\Install-Package Olve.OpenRaster -Version 0.1.1
<PackageReference Include="Olve.OpenRaster" Version="0.1.1" />
<PackageVersion Include="Olve.OpenRaster" Version="0.1.1" />
<PackageReference Include="Olve.OpenRaster" />
paket add Olve.OpenRaster --version 0.1.1
#r "nuget: Olve.OpenRaster, 0.1.1"
#addin nuget:?package=Olve.OpenRaster&version=0.1.1
#tool nuget:?package=Olve.OpenRaster&version=0.1.1
Olve.OpenRaster
The purpose of this library is to provide simple read-only access to .ora
, or OpenRaster, files, with a simple native C# library with minimal dependencies, in fact, Olve.Utilities
and OneOf
are the only dependencies of this project.
Installation
Simply run the following command to add a dependency for the nuget package to your project:
dotnet add package Olve.OpenRaster
Usage
This package only contains two operations:
ReadOpenRasterFile opens a
.ora
file, reads the metadata frommimetype
andstack.xml
files and returns the data in an easily-consumable class structure.GetLayerImage takes a layer image source string and reads the image with a provided
IImageFileReader
.
Currently, no default implementations of IImageFileReader
have been added to the library, you will have to convert the byte stream to an image file yourself, but the .ora
structure is handily abstracted away, so you will most likely only need to parse a .png
file yourself.
The BigGustave
library is a good candidate for this, as it is a simple and lightweight PNG decoder. Here is an example of how you could implement this:
dotnet add package BigGustave
using BigGustave;
using Olve.Utilities.Types.Results;
namespace Olve.OpenRaster.BigGustave;
public class PngFileReader : IImageFileReader<Png>
{
public Result<Png> ReadImage(Stream stream)
{
return Png.Open(stream);
}
}
Future
I want to expand this in the future with:
- Reading all content. Currently, the following is not supported:
- Thumbnail images
- Merged image
- Writing operations to both stack and all images.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- Olve.Utilities (>= 0.10.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.