When I convert any file type to a jpeg using Progressive Compression and RGB or Grayscale I encounter the following error:"Index was outside the bounds of the array."
Hi Michael,
- IMAGING-34468: ImageSaveException: “Index was outside the bounds of the array.”, while exporting GIF to JPEG with ColorType as RGB & CompressionType as Progressive.
- IMAGING-34469: ImageSaveException: “The method or operation is not implemented.”, while exporting GIF to JPEG with ColorType as Grayscale & CompressionType as Progressive.
The issues you have found earlier (filed as IMAGING-34468) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
@MHohlios,
Please try using below sample code using Aspose.Imaging for .NET 17.11 on your end for shared requirement.
string sourcePath = @"c:\aspose.work\IMAGINGNET\1842\src.png";
string outputPath = @"c:\aspose.work\IMAGINGNET\1842\out.jpg";
JpegOptions jpegOptions = new JpegOptions()
{
ColorType = JpegCompressionColorMode.Grayscale,
CompressionType = JpegCompressionMode.Progressive,
Quality = 100, // make the output image bigger to observe progressive scanning :)
};
using (Image image = Image.Load(sourcePath))
{
image.Save(outputPath, jpegOptions);
}
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.