Contains methods and properties used to apply lossless operations on JPEG images.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public sealed class LosslessJpeg : IDisposable
This class is intended to operate with JPEG images without recompression. It is useful if you need to modify metadata only (without modifying the image), rotate or/and flip recompression, or recompress only a part of an image. For example, if you add a text caption on the image, it makes sense to recompress only the part of image where the caption is placed and leave all the rest of image intact.
The following lossless operations are supported:
According to JPEG specification an image is represented by blocks of pixels so-called JPEG Minimum Coded Units (MCU). Typically MCU size is a number divisible by 8. That fact allows performing lossless rotation: MCU blocks are rearranged in new order as well as the order of pixels is changed inside each MCU. Examine the situation when width or height of an image is non-divisible by MCU size, it means that the last column or row contains partially-filled MCU blocks. Such images do not support some types of rotation. They will be cropped during transformation and width and height of the resulting image will be divisible by MCU size. If you need to know whether dimensions of your image will be changed after a transformation, you can use the IsTrimmingRequired(RotateFlipType) method. This method indicates whether dimensions will be changed taking into account the dimensions of currently opened image and the desired type of transformation.