Class Ts4TranslucentJointPhotographicExpertsGroupImage
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
pngDataReadOnlyMemory<byte>The data for a PNG
Returns
Exceptions
- InvalidDataException
pngDatais 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
pngDataReadOnlyMemory<byte>The data for a PNG
cancellationTokenCancellationTokenThe token to monitor for cancellation requests
Returns
Exceptions
- InvalidDataException
pngDatais 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
translucentJpegDataReadOnlyMemory<byte>The data for a Maxis Translucent JPEG
Returns
Exceptions
- FormatException
translucentJpegDatais 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
translucentJpegDataReadOnlyMemory<byte>The data for a Maxis Translucent JPEG
cancellationTokenCancellationTokenThe token to monitor for cancellation requests
Returns
Exceptions
- FormatException
translucentJpegDatais 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