Page 1 of 1

compare and imagehosting sites

Posted: 2018-01-07T17:28:38-07:00
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?

Re: compare and imagehosting sites

Posted: 2018-01-07T18:32:33-07:00
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.

Re: compare and imagehosting sites

Posted: 2018-01-07T19:31:24-07:00
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?

Re: compare and imagehosting sites

Posted: 2018-01-07T20:08:51-07:00
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.

Re: compare and imagehosting sites

Posted: 2018-01-07T20:40:47-07:00
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?

Re: compare and imagehosting sites

Posted: 2018-01-07T20:45:42-07:00
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.