« Return to Thread: How to do JPEG Compression Save at 10
HI all,
To whom it may concern - I just wanted to point out that I just did quality setting and measurement.
Use the "getQuality" of MagickImage.
Use the "setQuality" of MagickInfo.
I tried using "getQuality" of MagickImage but it returned me 0 all the time, But the combination i wrote at the top is working.Eric Yeo wrote:On Mon, 2005-09-12 at 14:44 +0530, Prasad TV wrote:
> Hi All,
>
> I am using JMagick to resize JPG images. I am able to resize to any
> specified size. The problem is, I want to save the generated image
> using JPEG Compression "10". By default JMagick saves the images in
> JPEG Compression "12". But I want to save the generated image using
> JPEG Compression "10" and JPEG Compression "5" also. Please let me
> know any body has solution for this.
>
> It will be great help for me, if some one helps on this...
>
> I am using the following code to resize:
>
> ImageInfo info = new ImageInfo();
>
> MagickImage blobImage = new MagickImage(info, srcImageData);
>
> blobImage.setFilter(FilterType.HermiteFilter);
>
> MagickImage scaled = blobImage.zoomImage(imgWidth, imgHeight);
>
> processedImageData = scaled.imageToBlob(info);
>
> scaled.setFileName("F:\\imagestoprocess\\GeneratedImages\
> \shd0112l.jpg");
>
> scaled.writeImage(info);
Before calling writeImage, use the setQuality method in ImageInfo, e.g.
info.setQuality(XX);
scaled.writeImage(info);
Please note that the quality value range from 1 to 100 (I think).
Someone please confirm.
Regards,
Eric
_______________________________________________
JMagick mailing list
JMagick@yeo.id.au
http://www.yeo.id.au/mailman/listinfo/jmagick
« Return to Thread: How to do JPEG Compression Save at 10
| Free embeddable forum powered by Nabble | Forum Help |