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

LosslessJpegTransform.WriteRotated Method (String, RotateFlipType)

Writes the JPEG file to the specified file rotated or/and flipped (without recompression).

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

Syntax

Visual Basic
Public Sub WriteRotated ( _
	fileName As String, _
	transform As RotateFlipType _
)
C#
public void WriteRotated(
	string fileName,
	RotateFlipType transform
)

Parameters

fileName

Type: System.String

The name of the file where you want to save the result.
transform

Type: System.Drawing.RotateFlipType

RotateFlipType value specifying flip/rotate mode.

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