Fred Weinhaus on  wrote...
| >Hi Fred,
| >Do you know how 2 / have a script to fix quality of a jpg image after it's
| >being enlarged (e.g. resizing a 100x100 image to 400x400) ?
| >Thanks,
| >S.
| 
| 
| Hello S.
| 
| Sorry, but I am not sure what problem you are having. When you have a 
| jpg image, it has already lost some quality, which cannot generally 
| be recovered. When you resize it, you lose some more quality 
| depending upon which filter option you have used. If you resize it to 
| another jpg, you lose even more quality depending upon the quality 
| setting. The best you can do is start with a non-compressed image 
| format, such as png. (It does not help at this point to convert from 
| your jpg to png, you need an original uncompressed image). Then when 
| you resize, use -filter lanczos (which I believe is the default), but 
| make the output format png or some other non-compressed image format.
| 
| That is the best that I can do to help. I know of no way to get back 
| the losses from a jpg compressed image.
| 
| 
Fred is perfectly correct.

I would add however that if the JPEG image is from a digital camera
you preserve and archive the exact original file from that camera.
And always process the image from that original image,  if posible.

If you need to save intermediate images, use PNG or the IM internal MIFF
format to prevent data loss.  MIFF can save images at a even higher
'bit quality'.

MIFF format is however not compressed by default so if disk space is
important, save images to "image.miff.gz"  IM will invoke the gzip
compressor automatically, and can read such a file too.

PNG is my recomendation.  You can also use Glenn Randers-Pehrson's
program "pngcrush" to compress PNG files optimially without data loss.

A newer version is "optipng".
  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
          Unix Security sat on the wall.
          Unix Security had a great fall.
          All the king's horses,
          And all the king's men,
          Couldn't get Security back together again.          -- Unix Haters
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to