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