« Return to Thread: How to do JPEG Compression Save at 10

RE: How to do JPEG Compression Save at 10

by prasadtv :: Rate this Message:

Reply to Author | View in Thread

Hi Eric,

As you said I tried by setting quality for info object before write to file.
But when I open that new image in photo shop it allways shows saved as 12.
But I want to save the file as 10. I tried with different values for quality
between 1 to 100.

One more Quick Question, How do I set the DPI while saving an image?

I have an image with 800 dpi, I want to resize to 285x431 with 72 DPI using
JMagick api.

It will be more helpful, if you can provide some code...

Help me on this at an earliest, becz I am stucked on this...need urzent help
on this...

Thanks & regards
Prasad T.V


-----Original Message-----
From: Eric Yeo [mailto:ttey@...]
Sent: Wednesday, September 14, 2005 2:36 PM
To: Prasad TV
Cc: jmagick@...
Subject: Re: [Jmagick] How to do JPEG Compression Save at 10

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




-----------------------------------------------------------------------------------------------------------------------------
Disclaimer
-----------------------------------------------------------------------------------------------------------------------------

"This message(including attachment if any)is confidential and may be privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If you have received this message by mistake please notify the sender by return  e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.  Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission."

-----------------------------------------------------------------------------------------------------------------------------
_______________________________________________
JMagick mailing list
JMagick@...
http://www.yeo.id.au/mailman/listinfo/jmagick

 « Return to Thread: How to do JPEG Compression Save at 10