This documentation is for the old version. Go to the latest Graphics Mill docs

LosslessJpegTransform.IsTrimmingRequired Method

Determines whether the image will be trimmed during the rotation or flipping.

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

Syntax

Visual Basic
Public Function IsTrimmingRequired ( _
	rotateFlipType As RotateFlipType _
) As Boolean
C#
public bool IsTrimmingRequired(
	RotateFlipType rotateFlipType
)

Parameters

rotateFlipType

Type: System.Drawing.RotateFlipType

RotateFlipType value specifying flip/rotate mode.

Return Value

true if the image will be trimmed; otherwise, false.

Remarks

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 to peform lossless rotation or flip: 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 and flip. They will be cropped during tranformation and width and height of the result image will be divisible by MCU size. If you need to know whether dimensions of your image will be changed after transformation or not, you can use the IsTrimmingRequired(RotateFlipType) method. This method returns whether dimensions will be changed taking into account the dimensions of the currently opened JPEG image and the desired type of transformation.

See Also

Reference