This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, May 9, 2007 7:59:36 AM(UTC)
Groups: Registered
Posts: 2
Hello,
I am trying to use the Jpeg2000SaveOptions in order to compress and save the Raster Image using the following method:
private byte[] Compress(byte[] imageData, int qualityFactor)
{
RasterImage image = LoadRasterImage(imageData);
m_Codecs.Options.Jpeg2000.Save.CompressionControl = CodecsJpeg2000CompressionControl.QualityFactor;
m_Codecs.Options.Jpeg2000.Save.CompressionRatio = qualityFactor;
MemoryStream stream = new MemoryStream();
m_Codecs.Save(image, stream, RasterImageFormat.J2k, 0);
return stream.ToArray();
}
No matter what qualityFactor I use, the image compression doesn't seem to be working. Am I doing something wrong out here? Any help would be highly appreciated.
Thank You
Anup
#2
Posted
:
Thursday, May 10, 2007 1:37:53 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Anup,
You should not pass the QualityFactor value to the "CodecsJpegSaveOptions.CompressionRatio"
property, you should pass it to the "CodecsJpegSaveOptions.QualityFactor"
property instead.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.