Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Digital Photography > jpeg file comparision software?

Reply
Thread Tools

jpeg file comparision software?

 
 
james
Guest
Posts: n/a
 
      10-22-2009
Are there any GUI software for windows that compares two jpeg file and
report if they are the same?

I need to verify the photo browser's lossless rotate is indeed lossless. I
can use photoshop to do this compare but it takes a lot of steps.

 
Reply With Quote
 
 
 
 
tony cooper
Guest
Posts: n/a
 
      10-22-2009
On Thu, 22 Oct 2009 07:50:39 -0700, "james" <> wrote:

>Are there any GUI software for windows that compares two jpeg file and
>report if they are the same?
>
>I need to verify the photo browser's lossless rotate is indeed lossless. I
>can use photoshop to do this compare but it takes a lot of steps.


The free FastStone Viewer
http://www.faststone.org/FSViewerDownload.htm will allow you to view
two or more images side-by-side. I use it to compare multiple shots
of the same subject to pick the best one. (If there is a "best") You
can zoom in on the images.


--
Tony Cooper - Orlando, Florida
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      10-22-2009
"james" <> wrote:
>Are there any GUI software for windows that compares two jpeg file and
>report if they are the same?


Do you mean binary identical?
Then just use diff or cmp, much easier than any GUI stuff for this task.
They are standard with unixoid OSes and are available for others from
many sources for free, including e.g. Microsofts own System Tools for
Unix

jue
 
Reply With Quote
 
Gordon Freeman
Guest
Posts: n/a
 
      10-23-2009
"james" <> wrote:

> Are there any GUI software for windows that compares two jpeg file and
> report if they are the same?
>
> I need to verify the photo browser's lossless rotate is indeed lossless.
> I can use photoshop to do this compare but it takes a lot of steps.



this is a bit tricky because even if it's lossless the jpeg data may
change, since the same data can be packed in different ways (e.g. Huffman
optimised to reduce the file size). For instance if you take a jpeg made by
photoshop (even an "optimised" one) then run it through Irfanview's
lossless optimiser (or use its lossless rotation) the file will get
significantly smaller (around 5% IME) due to Irfanview packing the data
more efficiently.

In the end I think the only way to do it is to make a bitwise comparison of
the decompressed bitmaps, which would be simplest to do by subtracting one
from the other using layers in photoshop or a similar program.

Another way that might work is to rotate the image back and forth a few
times and see if the file size stays exactly the same. After the first time
round it should stabilise at an identical file size whereas if it's being
recompressed it will probably drift progressively.
 
Reply With Quote
 
Better Info
Guest
Posts: n/a
 
      10-23-2009
On Thu, 22 Oct 2009 12:12:45 -0700, Jürgen Exner <>
wrote:

>"james" <> wrote:
>>Are there any GUI software for windows that compares two jpeg file and
>>report if they are the same?

>
>Do you mean binary identical?
>Then just use diff or cmp, much easier than any GUI stuff for this task.
>They are standard with unixoid OSes and are available for others from
>many sources for free, including e.g. Microsofts own System Tools for
>Unix
>
>jue


That won't work. The binaries will be very different. He's asking if the
pixels after a rotation will convey identical values in their new X,Y
positions.

Keep in mind that many so-called "lossless" rotation algorithms must
truncate an image on 8x8 pixel-block boundaries. So while the image data in
the main portion of the image might be identical, the lossless routine will
slighly crop your image if its original dimensions are not multiples of 8.
You can't even use file-sizes to determine if they are identical images.

What you can do though is make sure your image has X,Y dimensions that are
multiples of 8. Save a copy of that image. Then rotate it 90-degrees 4
times. Save that image using identical JPG compression settings as the
first one. Do a binary compare.

If on the other hand you are looking for a truly lossless JPG rotation
utility, then you'll have to use Photoline editor. It's the only one I know
that is 100% lossless when dealing with resaving edited (cropped or
rotated) JPG data. It even recreates the less-than 8 pixel borders
faithfully on 90-degree rotations.

Surprisingly, even if you alter the pixel data on part of your image with
Photoline, it doesn't put the whole image through the JPG compression
algorithm again when resavng it. It only re-compresses the part you
specifically edited and adds that back into the original JPG data. You can
change, for example, 27 pixels, rotate the whole image if you want, resave
that JPG file, and only those 27 pixels that you specifically edited will
be different in your new file. The rest of the image data being an exact
duplicate of the original. Surprised the hell out of me the first time I
extensively tested this. I didn't think it was possible. It is possible. It
works. It's the only editor I know of that has this advanced 100% lossless
JPG editing capability.
 
Reply With Quote
 
Martin Brown
Guest
Posts: n/a
 
      10-23-2009
Better Info wrote:
> On Thu, 22 Oct 2009 12:12:45 -0700, Jürgen Exner <>
> wrote:
>
>> "james" <> wrote:
>>> Are there any GUI software for windows that compares two jpeg file and
>>> report if they are the same?

>> Do you mean binary identical?
>> Then just use diff or cmp, much easier than any GUI stuff for this task.
>> They are standard with unixoid OSes and are available for others from
>> many sources for free, including e.g. Microsofts own System Tools for
>> Unix
>>
>> jue

>
> That won't work. The binaries will be very different. He's asking if the
> pixels after a rotation will convey identical values in their new X,Y
> positions.


The answer to that in general is *NO*.

A typical digital camera image is 2x1 chroma subsampled and after
rotation it will be 1x2 chroma subsampled. Several codecs do not handle
the latter case (which never occurred in practice until lossless rotate
was implemented) in the same way so there are small differences when the
image is decoded eg by the IJG codec. Photoshop uses pixel replication
for chroma decode and so the resulting images are the same. The lossless
JPEGtrans rotate is truly lossless though as rotating through +90 and
then rotating -90 should give a file that decodes to an identical image.

There are options to remove EXIF and other guff that may prevent binary
compare from seeing the resulting file as identical.
>
> Keep in mind that many so-called "lossless" rotation algorithms must
> truncate an image on 8x8 pixel-block boundaries. So while the image data in
> the main portion of the image might be identical, the lossless routine will
> slighly crop your image if its original dimensions are not multiples of 8.
> You can't even use file-sizes to determine if they are identical images.


Most will not permit you to do odd sizes for lossless crop or lossless
rotate. It is a weakness in the original JPEG spec.
>
> What you can do though is make sure your image has X,Y dimensions that are
> multiples of 8. Save a copy of that image. Then rotate it 90-degrees 4
> times. Save that image using identical JPG compression settings as the
> first one. Do a binary compare.


There are no JPEG compression settings to set in the lossless rotate.
The image orientation is altered by shuffling the quantised JPEG
coefficients in the DCT space.
>
> If on the other hand you are looking for a truly lossless JPG rotation
> utility, then you'll have to use Photoline editor. It's the only one I know
> that is 100% lossless when dealing with resaving edited (cropped or
> rotated) JPG data.


Several image processing programs do fully lossless JPEG rotates subject
to the usual limitaions on dimensions being a multiple of 8 using the
IJG transcoder. A full list of them is online at JPEGcrop is the
canonical one.

http://sylvana.net/jpegcrop/losslessapps.html

> It even recreates the less-than 8 pixel borders
> faithfully on 90-degree rotations.


That is impossible without an extension to the JPEG spec.
>
> Surprisingly, even if you alter the pixel data on part of your image with
> Photoline, it doesn't put the whole image through the JPG compression
> algorithm again when resavng it. It only re-compresses the part you
> specifically edited and adds that back into the original JPG data. You can
> change, for example, 27 pixels, rotate the whole image if you want, resave
> that JPG file, and only those 27 pixels that you specifically edited will
> be different in your new file. The rest of the image data being an exact
> duplicate of the original. Surprised the hell out of me the first time I
> extensively tested this. I didn't think it was possible. It is possible. It
> works. It's the only editor I know of that has this advanced 100% lossless
> JPG editing capability.


That is actually quite cunning but it will not work if the changes made
are global like altering brightness or contrast.

Regards,
Martin Brown
 
Reply With Quote
 
Better Info
Guest
Posts: n/a
 
      10-23-2009
On Fri, 23 Oct 2009 08:48:54 +0100, Martin Brown
<|||newspam|||@nezumi.demon.co.uk> wrote:

>
>> It even recreates the less-than 8 pixel borders
>> faithfully on 90-degree rotations.

>
>That is impossible without an extension to the JPEG spec.


I suggest you test all this by yourself before you claim what is and is not
possible by some online specs and preconceived theory.

Some easily to discern vector graphics drawn on a document not of 8-pixel
block multiples, all converted to a raster image, saved as JPG to HDD,
reloaded, then taken through various rotations, resave, reload, resave,
rotate, reload, edit a few pixels, resave, reload, rotate, resave, reload,
... usually suffices to convince one's self that what you are seeing goes
beyond online specs and theory. Doing something similar is how I tested it
myself.

 
Reply With Quote
 
chrisj.doran@proemail.co.uk
Guest
Posts: n/a
 
      10-23-2009
On 22 Oct, 16:50, "james" <nos...@nospam.com> wrote:
> Are there any GUI software for windows that compares two jpeg file and
> report if they are the same?
>
> I need to verify the photo browser's lossless rotate is indeed lossless. I
> can use photoshop to do this compare but it takes a lot of steps.


You prompted me to get around to playing with Blink Comparator, free
at:

http://wareseeker.com/Home-Education...zip/3b506ea3e4

I did 4 lossless 90deg rotations of colour and monochrome images in
IrfanView and compared with the originals. The only difference was
slight jumping between images, probably because my originals weren't
exact multiples of 8 pixels. One downside is that Blink Comparator
doesn't accept JPEGs, so I had to convert to BMPs, but this shouldn't
invalidate the test. But I realise this may still be too many steps if
you want to do a lot of images.

Chris
 
Reply With Quote
 
Martin Brown
Guest
Posts: n/a
 
      10-23-2009
Better Info wrote:
> On Fri, 23 Oct 2009 08:48:54 +0100, Martin Brown
> <|||newspam|||@nezumi.demon.co.uk> wrote:
>
>>> It even recreates the less-than 8 pixel borders
>>> faithfully on 90-degree rotations.

>> That is impossible without an extension to the JPEG spec.

>
> I suggest you test all this by yourself before you claim what is and is not
> possible by some online specs and preconceived theory.


I understand the internals of the JPEG stream format. What you claim is
not possible losslessly without either adding a new escape code for a
crop of 1..7 pixels off the top and left borders of a DCT JPEG or
encoding the image in the misleadingly named Lossless JPEG format
published at the same time but largely unused outside of medicine.

PSPro put that cat among the pigeons by allowing users to save .JPG
files with true lossless JPEG data in (but they are nothing to do with
the DCT based JPEG method). No other codec I know of will decode them -
largely due to patent issues.
>
> Some easily to discern vector graphics drawn on a document not of 8-pixel
> block multiples, all converted to a raster image, saved as JPG to HDD,
> reloaded, then taken through various rotations, resave, reload, resave,
> rotate, reload, edit a few pixels, resave, reload, rotate, resave, reload,
> .. usually suffices to convince one's self that what you are seeing goes
> beyond online specs and theory. Doing something similar is how I tested it
> myself.


Sorry but you don't know what you are talking about.

Post an odd sized colour image say 55 x 31 and its allegedly losslessly
rotated version and I will examine them. But it cannot be done within
the confines of the published JPEG standard.

Regards,
Martin Brown
 
Reply With Quote
 
Martin Brown
Guest
Posts: n/a
 
      10-23-2009
bugbear wrote:
> wrote:
>> On 22 Oct, 16:50, "james" <nos...@nospam.com> wrote:
>>> Are there any GUI software for windows that compares two jpeg file and
>>> report if they are the same?
>>>
>>> I need to verify the photo browser's lossless rotate is indeed
>>> lossless. I
>>> can use photoshop to do this compare but it takes a lot of steps.

>>
>> You prompted me to get around to playing with Blink Comparator, free
>> at:

>
>
> I would suggest overlaying the two images as layers,
> using subtract, and using autoenhance.
>
> (in other words, get a binary difference, and make
> it visible).


Image arithmetic - difference and then count colours used.

If two images when rendered are bit for bit identical you will have a
perfect black image with just one colour used. If not then histogram
adjust will let you make the difference visible.

Regards,
Martin Brown
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nikon D70 RAW converted to JPEG - jpeg file size 3MB ? 5 MB? Amit Digital Photography 3 03-17-2006 10:40 AM
Raw file processors comparision kctan Digital Photography 4 03-13-2006 10:22 AM
string comparision in a file rakesh C++ 6 07-22-2004 07:21 AM
Exiff-jpeg and jpeg certsnsearches Digital Photography 2 01-07-2004 08:13 PM
huge jpeg files show as very small thumbnails (canon 300d, JPEG) kl Digital Photography 6 11-12-2003 08:11 PM



Advertisments