Hi all,
I have discovered ImageMagick today, and used it to delete metadata for a large number of png tiles, and save a lot of space.
I think this tool could help me for another issue I have to deal with.
I create the tiles every day for example. Instead of update mobile devices with all the new tiles, I would like to send just these ones which have really been modified. I cannot use the date of creation of course. For the moment i create a md5 and compare it, but maybe ImageMagick could do it better than me.
I have seen COMPARE but i do not want to create a third png.
Any ideas?
Thanks a lot.
Clément
Compare two png and save the second if different
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Compare two png and save the second if different
You do not need to save the output. Use null: in its place
Code: Select all
compare -metric rmse image1 image2 null:
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Compare two png and save the second if different
md5 compares the physical files, including metadata that may have file creation timestamps etc. IM's "compare" will examine just the images.
I use "compare" when updating my webpages, comparing new versions of images with a local mirror of the website. If the images are the same, I don't need to upload the new image. This works in a script that extracts the difference number: for "-metric RMSE", "0" means there is no difference.
I use "compare" when updating my webpages, comparing new versions of images with a local mirror of the website. If the images are the same, I don't need to upload the new image. This works in a script that extracts the difference number: for "-metric RMSE", "0" means there is no difference.
snibgo's IM pages: im.snibgo.com