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

LosslessJpegTransform.WriteRotated Method (Stream, RotateFlipType)

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

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


Visual Basic
Public Sub WriteRotated ( _
	stream As Stream, _
	transform As RotateFlipType _
public void WriteRotated(
	Stream stream,
	RotateFlipType transform



Type: System.IO.Stream

The stream where you want to save the result.

Type: System.Drawing.RotateFlipType

RotateFlipType value specifying flip/rotate mode.


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