Click or drag to resize

LosslessJpegTransform Method (String, String, JpegTransformType)

Perform a lossless transform on a JPEG image.
Perform a lossless transform on a JPEG image.

Namespace:  Atalasoft.Imaging.ImageProcessing
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public static void Transform(
	string source,
	string dest,
	JpegTransformType type
)

Parameters

source
Type: SystemString
The source image file.
dest
Type: SystemString
The destination image filename.
type
Type: Atalasoft.Imaging.ImageProcessingJpegTransformType
The transform type to apply.
Exceptions
ExceptionCondition
Thrown is the current license is not DotImage Photo Pro, or DotImage Document Imaging.
Thrown is the current license is not DotImage Photo Pro, or DotImage Document Imaging.
Remarks

This can be used to perform one of a set of simple transformations without decompressing the JPEG data. By not decompressing, you don't have to re-compress, thus avoiding adding additional JPG artifacts to the output image.

This works by rearranging the compressed data (DCT coefficients), without ever fully decoding the image. Therefore, its transformations are lossless: there is no image degradation at all, which is not the case if you were to read the image to RGB, transform, and save again as JPG.

The transpose transformation has no restrictions regarding image dimensions. The other transformations operate rather oddly if the image dimensions are not a multiple of the iMCU size (usually 8 or 16 pixels, though sometimes 32 or 48), because they can only transform complete blocks of DCT coefficient data in the desired way.

The default behavior is to discard these "extra" blocks. This prevents ugly strips of unmodified data along one edge. So, strictly speaking, these transformations are not lossless for all images: they are lossless only for images with dimensions that are multiples of 8 or 16. You can override this discarding the extra blocks, though it is not recommended.

Examples
LosslessJpeg Class
Examples
LosslessJpeg Class
See Also