Page 1 of 1

"Only Shrink Larger Images" also modifies smaller images"

Posted: 2008-04-09T23:57:52-07:00
by inigomena
Hi
What do you think about this?:
http://redux.imagemagick.org/discourse- ... =1&t=10996
I think the convert or mogrify commands should not rewrite the file if they are not modifying the image.

Re: "Only Shrink Larger Images" also modifies smaller images"

Posted: 2008-04-10T07:26:05-07:00
by magick
Some users may only change image metadata such as a comment or color profile, for example, and still want the image written even though the pixels have not been modified. Or perhaps they may want the image file timestamp updated. We could introduce an option to permit either behavior and add a bunch a code to track to see if any of the hundreds of image properties or pixels have changed and ensure if the image is part of a sequence that none of the images in the sequence have been modified. However, we think the right thing to do is to reserve these forms of specialized workflow for shell scripts (e.g. bash) or one of the many scripting language (e.g. IMagick for PHP) or programming languages (.e.g. MagickWand for C) that interface with ImageMagick.

Re: "Only Shrink Larger Images" also modifies smaller images"

Posted: 2008-04-11T13:49:40-07:00
by inigomena
Hi, I agree that the program rewrites the file, but I think it should only recompress the picture if it is necessary, so, in your example, if you are going to change the metadata you should not have a quality loss.
I have used a program named jhead to remove the metadata, it rewrites the file but the picture remains untouched (it is not decompressed and recompressed, so there is no quality loss). I think imagemagick should have a similar behaviour, so if it is not necessary to modify the picture, the jpeg part of it should not be altered.