compare and imagehosting sites

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
dav1988
Posts: 19
Joined: 2018-01-07T13:18:56-07:00
Authentication code: 1152

compare and imagehosting sites

Post by dav1988 »

I tried to use compare for 2 photos: the first one was the original image and the second one was the same image uploaded on a imagehosting site. The two images have the same pixels (600x576 for example) but imagemagick shows differences between these pics. How is it possible there is a difference if the 2 photos have the same pixels?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: compare and imagehosting sites

Post by fmw42 »

Has the site changed the image format, such as converting it to jpg. If your images are JPG and you uploaded it, then the site might read and write it and thus change the JPG compression, which is lossy and can never be recovered exactly.

Use

identify -verbose yourimage

and then review the information from both images and you should see how they differ statistically and format and meta data.
dav1988
Posts: 19
Joined: 2018-01-07T13:18:56-07:00
Authentication code: 1152

Re: compare and imagehosting sites

Post by dav1988 »

ok i understand ! just one more thing,is that a way using imagemagick to know if the imagehosting site change the ratio width/height of a pic? so to exclude that the uplodaded image is deformed?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: compare and imagehosting sites

Post by fmw42 »

Unless you know what it should be (by putting the proper size in the meta data such as the comment field), you would not know if the image was deformed. But I doubt that width and height get changed by hosting services unless you happened to download a thumbnail preview rather than the original size image. The main thing that I have found is that just the format gets changed.
dav1988
Posts: 19
Joined: 2018-01-07T13:18:56-07:00
Authentication code: 1152

Re: compare and imagehosting sites

Post by dav1988 »

if the uploaded image and the original one are both (for example) 600x576 pixels, is it enough to say that the uploaded one is not deformed?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: compare and imagehosting sites

Post by fmw42 »

Not necessarily, but it would be something that is not very likely to happen. You can apply distortions and keep the same image size. But this is quite complicated and would not likely happen by accident. That would be very bad for the hosting company to intentionally or accidentally distort or even change the dimensions of the image. If that happened, then no one would use that hosting site.
Post Reply