GdPicture.NET Reference Guide
TransformJPEG Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : TransformJPEG Method
The path of the image to transform.
The path of the transformed image.
The JPEG transformation to apply. A member of the JPEGTransformation enumeration.
Applies transformation to a JPEG image without loss of information. When a JPEG image is compressed, some of the information in the image is lost. If you open a JPEG file, modify the image, and save it to another JPEG file, the quality will decrease. This method allows to opening / modifying / saving JPEG images, without loss of information.
Syntax

Parameters

InputFile
The path of the image to transform.
OutputFile
The path of the transformed image.
Transformation
The JPEG transformation to apply. A member of the JPEGTransformation enumeration.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
The image's width and height have to be divisible by 16, otherwise, and Invalid Parameter will be returned.
Example
Rotating the JPEG file 180 degress without loss of information.
Dim oGdPictureImaging As New GdPictureImaging
If oGdPictureImaging.TransformJPEG("input.jpg", "output.jpg", JPEGTransformation.JPEGTransformationRotate180) <> GdPictureStatus.OK Then
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members