Repeatable transformations?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
samuel
Posts: 2
Joined: 2012-07-11T11:12:27-07:00
Authentication code: 13

Repeatable transformations?

Post by samuel »

If I use mogrify to scale down an image, will the output always be the same? I would like to compare the image later with diff to see which ones have changed or even put them in a repository.

So if I use the same version of mogrify, will I always get the same result with the same parameters and input file?

Tahnks, Sam
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Repeatable transformations?

Post by fmw42 »

I don't know why not if you are using the same version of IM each time and don't change the mogrify command or the images

Perhaps you care to explain further what you are worried about?
samuel
Posts: 2
Joined: 2012-07-11T11:12:27-07:00
Authentication code: 13

Re: Repeatable transformations?

Post by samuel »

My concern is getting some random results, lets say exif tags with the creation/modification date or tiny differences in the output files, because the jpeg compression chooses a different approach/startingpoint on each run, stuff like that.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Repeatable transformations?

Post by anthony »

That would depend on changes to the JPEG delegate library, which is typically installed separately to IM.
In fact I know their ware at least 3 JPEG libraries that can be used interchangably, storing data in different ways (for various reasons).
Mostly because JPEG is a losy image file format, that loses some color data wheneve rthe image is saved.

Added to this that some people like to play with the tables of the JPEG compression algorithm, you can not make any gurantees you will get exactly the same data when reading the same image! Similarly with different quality setting meaning slightly different things with different libraries (linux/windows versions for example).

JPEG is a poor choice for repeatable performance!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply