Performs a lossless crop on a JPEG file.
Namespace:
FreeImageAPIAssembly: FreeImageNET (in FreeImageNET.dll)
Syntax
C# |
---|
public static bool JPEGCrop( string source, string destination, int left, int top, int right, int bottom ) |
Visual Basic (Declaration) |
---|
Public Shared Function JPEGCrop ( _ source As String, _ destination As String, _ left As Integer, _ top As Integer, _ right As Integer, _ bottom As Integer _ ) As Boolean |
Visual C++ |
---|
public: static bool JPEGCrop( String^ source, String^ destination, int left, int top, int right, int bottom ) |
Parameters
- source
- Type: System..::.String
Source filename.
- destination
- Type: System..::.String
Destination filename.
- left
- Type: System..::.Int32
Specifies the left position of the cropped rectangle.
- top
- Type: System..::.Int32
Specifies the top position of the cropped rectangle.
- right
- Type: System..::.Int32
Specifies the right position of the cropped rectangle.
- bottom
- Type: System..::.Int32
Specifies the bottom position of 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. |