Performs a lossless crop on a JPEG file.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static bool JPEGCrop(
	string source,
	string destination,
	Rectangle rect
)
Visual Basic (Declaration)
Public Shared Function JPEGCrop ( _
	source As String, _
	destination As String, _
	rect As Rectangle _
) As Boolean
Visual C++
public:
static bool JPEGCrop(
	String^ source, 
	String^ destination, 
	Rectangle rect
)

Parameters

source
Type: System..::.String
Source filename.
destination
Type: System..::.String
Destination filename.
rect
Type: System.Drawing..::.Rectangle
Specifies the cropped rectangle.

Return Value

Returns true on success, false on failure.

Exceptions

ExceptionCondition
System..::.ArgumentNullException source or destination is null.
System.IO..::.FileNotFoundException source does not exist.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also