CoreJ2K.Skia 1.0.2.13

There is a newer version of this package available.
See the version list below for details.
dotnet add package CoreJ2K.Skia --version 1.0.2.13                
NuGet\Install-Package CoreJ2K.Skia -Version 1.0.2.13                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoreJ2K.Skia" Version="1.0.2.13" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoreJ2K.Skia --version 1.0.2.13                
#r "nuget: CoreJ2K.Skia, 1.0.2.13"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CoreJ2K.Skia as a Cake Addin
#addin nuget:?package=CoreJ2K.Skia&version=1.0.2.13

// Install CoreJ2K.Skia as a Cake Tool
#tool nuget:?package=CoreJ2K.Skia&version=1.0.2.13                

CoreJ2K - A Managed and Portable JPEG2000 Codec

Copyright (c) 1999-2000 JJ2000 Partners;
Copyright (c) 2007-2012 Jason S. Clary; Copyright (c) 2013-2016 Anders Gustafsson, Cureos AB;
Copyright (c) 2024 Sjofn LLC.

Licensed and distributable under the terms of the BSD license

Summary

This is an adaptation of CSJ2K, which provides JPEG 2000 decoding and encoding functionality to .NET based platforms. CSJ2K is by itself a C# port of the Java package jj2000, version 5.1. This is a fork of CSJ2K for .NET Standard 2.1 making it possible to implement JPEG decoding and encoding on any platform.

Installation

Apart from building the relevant class libraries from source, pre-built packages for the supported platforms can also be obtained via NuGet.

Usage

The Library provides interfaces for image rendering, file I/O and logging.

Decoding

To decode a JPEG 2000 encoded image, call one of the following methods:

public class J2kImage
{
	public static PortableImage FromStream(Stream, ParameterList = null);
	public static PortableImage FromBytes(byte[], ParameterList = null);
	public static PortableImage FromFile(string, ParameterList = null);
}

The returned PortableImage offers a "cast" method As<T>() to obtain an image in the type relevant for the platform. When using the SKBitmapImageCreator on .NET, a cast to SKBitmap or SKPixmap would suffice:

var bitmap = decodedImage.As<SKBitmap>();

Encoding

To encode an image, the following overloads are available:

public class J2kImage
{
	public static byte[] ToBytes(object, ParameterList = null);
	public static byte[] ToBytes(BlkImgDataSrc, ParameterList = null);
}

The first overload takes an platform-specific image object. This is still works-in-progress, but an implementation is available for SKBitmap objects.

The second overload takes an CSJ2K specific object implementing the BlkImgDataSrc interface. When Portable Graymap (PGM), Portable Pixelmap (PPM) or JPEG2000 conformance testing format (PGX) objects are available as Streams, it is possible to create BlkImgDataSrc objects using either of the following methods:

J2kImage.CreateEncodableSource(Stream);
J2kImage.CreateEncodableSource(IList<Stream>);

For PGM and PPM images, you would normally use the single Stream overload, whereas for PGX images, you may enter one Stream object per color component.

CoreJ2K NuGet-Release CoreJ2K.Skia NuGet-Release
NuGet Downloads
Commits per month
Build status
Codacy Badge
ZEC BTC

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CoreJ2K.Skia:

Package Downloads
LibreMetaverse

LibreMetaverse allows your code to read and work with data send across a SecondLife, Halcyon, OpenSimulator, or related connection.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4.21 274 11/1/2024
1.0.3.18 80 11/1/2024
1.0.2.13 584 8/22/2024
1.0.1.10 125 8/22/2024
1.0.0.5 121 8/21/2024