Table of Contents

Class Ts4TranslucentJointPhotographicExpertsGroupImage

Namespace
LlamaLogic.Packages.Formats
Assembly
LlamaLogic.Packages.dll

Provides methods for dealing with Maxis Translucent JPEGs

public static class Ts4TranslucentJointPhotographicExpertsGroupImage
Inheritance
Ts4TranslucentJointPhotographicExpertsGroupImage
Inherited Members

Methods

ConvertPngToTranslucentJpeg(ReadOnlyMemory<byte>)

Converts the data for a PNG the data for a Maxis Translucent JPEG

public static ReadOnlyMemory<byte> ConvertPngToTranslucentJpeg(ReadOnlyMemory<byte> pngData)

Parameters

pngData ReadOnlyMemory<byte>

The data for a PNG

Returns

ReadOnlyMemory<byte>

Exceptions

InvalidDataException

pngData is not a PNG, could not be decoded, or has more than 67,108,864 (8,192 by 8,192) pixels, or its alpha channel compresses to more than 65,525 bytes

ConvertPngToTranslucentJpegAsync(ReadOnlyMemory<byte>, CancellationToken)

Converts the data for a PNG the data for a Maxis Translucent JPEG asynhronously

public static Task<ReadOnlyMemory<byte>> ConvertPngToTranslucentJpegAsync(ReadOnlyMemory<byte> pngData, CancellationToken cancellationToken)

Parameters

pngData ReadOnlyMemory<byte>

The data for a PNG

cancellationToken CancellationToken

The token to monitor for cancellation requests

Returns

Task<ReadOnlyMemory<byte>>

Exceptions

InvalidDataException

pngData is not a PNG, could not be decoded, or has more than 67,108,864 (8,192 by 8,192) pixels, or its alpha channel compresses to more than 65,525 bytes

ConvertTranslucentJpegToPng(ReadOnlyMemory<byte>)

Converts the data for a Maxis Translucent JPEG the data for a PNG

public static ReadOnlyMemory<byte> ConvertTranslucentJpegToPng(ReadOnlyMemory<byte> translucentJpegData)

Parameters

translucentJpegData ReadOnlyMemory<byte>

The data for a Maxis Translucent JPEG

Returns

ReadOnlyMemory<byte>

Exceptions

FormatException

translucentJpegData is not a JPEG

InvalidDataException

The ALFA PNG APP0 marker is missing or malformed, the JPEG or the PNG could not be decoded or has more than 67,108,864 (8,192 by 8,192) pixels, or their dimensions differ

ConvertTranslucentJpegToPngAsync(ReadOnlyMemory<byte>, CancellationToken)

Converts the data for a Maxis Translucent JPEG the data for a PNG asynhronously

public static Task<ReadOnlyMemory<byte>> ConvertTranslucentJpegToPngAsync(ReadOnlyMemory<byte> translucentJpegData, CancellationToken cancellationToken = default)

Parameters

translucentJpegData ReadOnlyMemory<byte>

The data for a Maxis Translucent JPEG

cancellationToken CancellationToken

The token to monitor for cancellation requests

Returns

Task<ReadOnlyMemory<byte>>

Exceptions

FormatException

translucentJpegData is not a JPEG

InvalidDataException

The ALFA PNG APP0 marker is missing or malformed, the JPEG or the PNG could not be decoded or has more than 67,108,864 (8,192 by 8,192) pixels, or their dimensions differ