Accusoft.ImagXpressSdk Namespace > ImageReduce Class > JpegReduce Method : JpegReduce(ImagXpress,String,String,Int32,TransformMode) Method |
Note: The default value is 22 for strong compression improvement while maintaining very good quality. The range is from 0-32, where 0 represents almost no compression improvement and 32 represents the most compression improvement with some quality loss.
Note: The default value is TransformMode.None.
When transformMode is TransformMode.None the output JPEG format will match the input JPEG format.
When transformMode is TransformMode.ToProgressiveJpeg, the output JPEG format will be progressive JPEG. Note: Transforming Sequential to Progressive may result in a small increase in size.
When transformMode is TransformMode.ToSequentialJpeg, the output JPEG format will be sequential JPEG. Note: Transforming Progressive to Sequential may result in a small increase in size.
'Declaration Public Overloads Shared Sub JpegReduce( _ ByVal imagXpress As ImagXpress, _ ByVal inputFileName As String, _ ByVal outputFileName As String, _ Optional ByVal qualityFactor As Integer, _ Optional ByVal transformMode As TransformMode _ )
'Usage Dim imagXpress As ImagXpress Dim inputFileName As String Dim outputFileName As String Dim qualityFactor As Integer Dim transformMode As TransformMode ImageReduce.JpegReduce(imagXpress, inputFileName, outputFileName, qualityFactor, transformMode)
public static void JpegReduce( ImagXpress imagXpress, string inputFileName, string outputFileName, int qualityFactor, TransformMode transformMode )
public: static void JpegReduce( ImagXpress* imagXpress, string* inputFileName, string* outputFileName, int qualityFactor, TransformMode transformMode )
public: static void JpegReduce( ImagXpress^ imagXpress, String^ inputFileName, String^ outputFileName, int qualityFactor, TransformMode transformMode )
Note: The default value is 22 for strong compression improvement while maintaining very good quality. The range is from 0-32, where 0 represents almost no compression improvement and 32 represents the most compression improvement with some quality loss.
Note: The default value is TransformMode.None.
When transformMode is TransformMode.None the output JPEG format will match the input JPEG format.
When transformMode is TransformMode.ToProgressiveJpeg, the output JPEG format will be progressive JPEG. Note: Transforming Sequential to Progressive may result in a small increase in size.
When transformMode is TransformMode.ToSequentialJpeg, the output JPEG format will be sequential JPEG. Note: Transforming Progressive to Sequential may result in a small increase in size.
Exception | Description |
---|---|
System.ArgumentNullException | Thrown when imagXpress is null. |
System.ArgumentNullException | Thrown when inputFileName is null. |
System.ArgumentNullException | Thrown when outputFileName is null. |
System.ArgumentOutOfRangeException | Thrown when qualityFactor is outside range [0, 32]. |
System.IO.FileNotFoundException | Thrown when inputFileName does not exist. |
System.ArgumentException | Thrown when inputFileName is an HTTP or FTP URL. |
System.ArgumentException | Thrown when outputFileName is an HTTP or FTP URL. |
ImagXpressException | Thrown when imagXpress is not licensed for this feature. |
ImagXpressException | Thrown when inputFileName refers to a damaged or incomplete JPEG. |
ImagXpressException | Thrown when inputFileName does not refer to a 8-bit grayscale or 24-bit color JPEG. |
System.UnauthorizedAccessException | Thrown when outputFileName cannot be created or modified. |
Note: Supports reading 8-bit grayscale and 24-bit color JPEGs.