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
Repeatable transformations?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Repeatable transformations?
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?
Perhaps you care to explain further what you are worried about?
Re: Repeatable transformations?
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Repeatable transformations?
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!
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/
https://imagemagick.org/Usage/