ORIGINAL POST:
Mis dos centavos.
Better hope it's in BMP format, then your brute-force method would be sufficient, except you have to figure out the "parameters" for each image such as its dimensions and its being 24-bit or 32-bit. Palette could be a pain... but I don't know that much about binary file formats. :/
Otherwise with JPEG and PNG, this could be impossible. Because anything that creates eg. PNG, has to dither which is something I can't comprehend away from its needing to compress to a small size. Check out the main restrictions for having an avatar in a forum like this one -- no BMP file will do, but not because there is hate for M$, because most of the time they are too big!
Especially for a photograph, many computer viewports haven't yet reached the DPI (I'm ignorant of the term to use in place of this) to take up the fantastic real-life detail. Therefore even JPEG has to compromise itself with "blending" and other mind-boggling algorithms so that it looks realistic enough zoomed at any level. Although zooming in too closely could cause any algorithm to fall apart. This is the same with music: set the sampling rate and/or bit rate too low and eventually you're going to hear either silence or glitches; setting it too high could produce ugly anti-aliasing or sound that only dogs could enjoy (like an image that is zoomed out toward "SCREEN 13" or smaller dimensions LOL).
There are applications that cost money that could compare one picture file to another, even if they're different formats. What the user is looking for about comparing is left to another discussion.
(11-18-2022, 07:51 PM)madscijr Wrote: Is there a fast way to test whether 2 images are exactly the same?
Mis dos centavos.
Better hope it's in BMP format, then your brute-force method would be sufficient, except you have to figure out the "parameters" for each image such as its dimensions and its being 24-bit or 32-bit. Palette could be a pain... but I don't know that much about binary file formats. :/
Otherwise with JPEG and PNG, this could be impossible. Because anything that creates eg. PNG, has to dither which is something I can't comprehend away from its needing to compress to a small size. Check out the main restrictions for having an avatar in a forum like this one -- no BMP file will do, but not because there is hate for M$, because most of the time they are too big!
Especially for a photograph, many computer viewports haven't yet reached the DPI (I'm ignorant of the term to use in place of this) to take up the fantastic real-life detail. Therefore even JPEG has to compromise itself with "blending" and other mind-boggling algorithms so that it looks realistic enough zoomed at any level. Although zooming in too closely could cause any algorithm to fall apart. This is the same with music: set the sampling rate and/or bit rate too low and eventually you're going to hear either silence or glitches; setting it too high could produce ugly anti-aliasing or sound that only dogs could enjoy (like an image that is zoomed out toward "SCREEN 13" or smaller dimensions LOL).
There are applications that cost money that could compare one picture file to another, even if they're different formats. What the user is looking for about comparing is left to another discussion.