JpegAlignToSampleSizeMode Enumeration

Contains possible values for JPEG sample size alignment.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)


public enum JpegAlignToSampleSizeMode


Member name Description

Only coordinates of the upper-left corner will be aligned. Width and height will not be aligned. Should be used for WriteCropped(String, Rectangle) if no consequent WritePatched(String, Point, Bitmap) is implied. Width and height still may be changed to preserve right and bottom position of the input rectangle. However it will not be aligned.


The entire rectangle is aligned. You should use this value if you are preparing a rectangle (offset and bitmap dimensions) for the WritePatched(String, Point, Bitmap) method.


This enumeration is used in the AlignToMCUSize(Rectangle, JpegAlignToSampleSizeMode) method of the LosslessJpeg class. It specifies whether to align only coordinates of the upper-left corner, or width and height also.

If you need just to crop an image and you do not want to use it as patch for another image, you can use the Crop value. In this case the width and height of the cropping rectangle can be arbitrary.

However if you are going to put this image onto another (i.e. patch it), the width and height of this image must be aligned. In this case you should use Patch value.

See Also