Performs a lossless crop on a JPEG file.
Namespace:
FreeImageAPIAssembly: 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
Exception | Condition |
---|---|
System..::.ArgumentNullException | source or destination is null. |
System.IO..::.FileNotFoundException | source does not exist. |