GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / JPEGLosslessCrop Method
The source JPEG image.
The destination JPEG image.
The left position, in pixel, of the area to crop.
The top position, in pixel, of the area to crop.
The width, in pixel, of the area to crop.
The height, in pixel, of the area to crop.
Example





In This Topic
JPEGLosslessCrop Method (GdPictureImaging)
In This Topic
Performs a lossless crop on a JPEG image.
Syntax
'Declaration
 
Public Function JPEGLosslessCrop( _
   ByVal SrcFile As String, _
   ByVal DstFile As String, _
   ByVal Left As Integer, _
   ByVal Top As Integer, _
   ByVal Width As Integer, _
   ByVal Height As Integer _
) As GdPictureStatus
public GdPictureStatus JPEGLosslessCrop( 
   string SrcFile,
   string DstFile,
   int Left,
   int Top,
   int Width,
   int Height
)
public function JPEGLosslessCrop( 
    SrcFile: String;
    DstFile: String;
    Left: Integer;
    Top: Integer;
    Width: Integer;
    Height: Integer
): GdPictureStatus; 
public function JPEGLosslessCrop( 
   SrcFile : String,
   DstFile : String,
   Left : int,
   Top : int,
   Width : int,
   Height : int
) : GdPictureStatus;
public: GdPictureStatus JPEGLosslessCrop( 
   string* SrcFile,
   string* DstFile,
   int Left,
   int Top,
   int Width,
   int Height
) 
public:
GdPictureStatus JPEGLosslessCrop( 
   String^ SrcFile,
   String^ DstFile,
   int Left,
   int Top,
   int Width,
   int Height
) 

Parameters

SrcFile
The source JPEG image.
DstFile
The destination JPEG image.
Left
The left position, in pixel, of the area to crop.
Top
The top position, in pixel, of the area to crop.
Width
The width, in pixel, of the area to crop.
Height
The height, in pixel, of the area to crop.

Return Value

This method requires the Image Documents component to run.

A member of the GdPictureStatus enumeration.
Remarks

This method requires the Image Documents component to run.

Example
Cropping a jpeg image without loss of information.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // Cropping a jpeg image without loss of information.
    gdpictureImaging.JPEGLosslessCrop("image.jpg", "cropped.jpg", 0, 0, 100, 100);
}
See Also