[filmscanners] RE: JPEG Lossless mirror?

2002-02-11 Thread Mark Otway

>> FWIW the following is from 
>> http://www.jpg.com/products/wizard.html   It
>> implies that normally you would introduce artifacts when 
>> doing a mirror and re-saving, but I think is claiming that 
>> with this technology you won't degrade the image at all.

Yes, this is what the jpegtran command-line utility does too, which I
posted about all those moons ago (Friday). :-)

JpegTran can also do lossless cropping and rotation too, although I've
not tried it yet.

>> My guess is that it does have to clip to nearest 8 x 8 pixel 
>> block to do this because the boundaries of these blocks 
>> would have to change following a mirror, but this could be wrong.

There is an option with all utilities which do this to tidy up the
'ragged' pixels that remain as a result of the lossless transformation.


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] Re: JPEG Lossless mirror?

2002-02-10 Thread Julian Robinson

FWIW the following is from http://www.jpg.com/products/wizard.html   It
implies that normally you would introduce artifacts when doing a mirror and
re-saving, but I think is claiming that with this technology you won't
degrade the image at all.

My guess is that it does have to clip to nearest 8 x 8 pixel block to do
this because the boundaries of these blocks would have to change following
a mirror, but this could be wrong.

Julian

RECOMPRESSION WITHOUT LOSS!* Recompress your JPEG files again and again
without introducing generational image loss normally associated with
recompressing JPEG files! Because of the underlying Pegasus technology, you
can recompress, rotate or mirror JPEG images without introducing
recompression artifacts!


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] Re: JPEG Lossless mirror?

2002-02-09 Thread Robert Meier


---  <[EMAIL PROTECTED]> wrote:
> I believe you are not correct, here. I have read in several accounts,
> both
> from people who have tried this experimentally and from people who
> understand the theory of JPEG compression

Well, then it's probably because these people don't know how to do an
experiment or they only know the theory. Do the following:

1) Open i.e. a *.tiff file in PS.
2) Save it as jpeg at quality 12 -> *1.jpg
3) Close the file.
4) Reopen the jpeg file (*1.jpg)
5) Save this file as jpeg at qulity 12 ->*2.jpg (If does actually
compress it again although it could just copy the original file and
rename it since no alteration took place. But that would be streching
it a bit)
6) Close the jpeg file (*2.jpg)
7) Open both jpeg file (*1.jpg and *2.jpg)
8) Go to Image->Calulations
9) Chose *1.jpg as source 1 (background and red, blue or red channel)
10) Chose *2.jpg as source 2 (background and same channel as for
*1.jpg)
11) Chose Difference for Blending, Opacity 100%
12) Chose New Document for Result
13) Since the error is very small you have to adjust the levels. The
easiest to just use 'Image->Adjust->AutoLevels' = 'Shift-Ctrl-L'

If you wish you can also do the following additional experiment:
14) Open the original *.tiff file
15) Calculate the difference but know between *.tiff and *1.jpg (step
8-12)
16) Do Shift-Ctrl-L to adjust the levels.

You will see that in the second case the error is bigger. You start
seeing contours of your object and that although you stored the image
at the highest jpeg compression. You actually can look at the jpeg file
in a hex monitor and figure out the quantization coefficients PS uses.
Now if you had chosen a lower jpeg compression you would see an even
bigger error (because the quantization coefficients are bigger).
Now in the first experiment you see only a small error. You don't see
any contours which is why I said it's noise like. Now, I am not sure if
for each consecutive saving of the image the same amount of loss would
occur. Maybe not. It's possible that the loss will gradually decrease
until there is no loss anymore at all. Not sure about that.

> (Though
> why you would want to open a JPEG and then resave it unchanged, at
> the same
> compression ratio, rather than simply closing it, is an open
> question.)

Well, you might want to change only a small part of the jpeg image,
i.e. to remove a person etc. After the change obviously you have the
actually save the image. But now not only the area where you have made
the change but the whole image will be affected. Again there would be a
way to keep the rest of the image as it was and just recompress the
changed part (with a max of an additional 7 neighbour pixels in each
direction) but that would be asking too much.

Robert

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] Re: JPEG Lossless mirror?

2002-02-09 Thread Pat Cullinan, jr.



Robert Meier wrote:

> --- "Pat Cullinan, jr." <[EMAIL PROTECTED]> wrote:
> > I had been a believer in the proposition that multiple jpeg saves
> > would
> > degrade an image, but after reading a notice to the contrary in one
> > of the
> > trade mags, I did my own trials and now I save and resave jpegs which
> > aren't even maximum quality without any qualms.
>
> The trade magazine is wrong at least for the following common scenario.
> If you save a picture as jpeg in PS, close the image, reload the image
> and save the image again in jpeg you will lose data.

That's the conventional wisdom, but I just can't a difference.  I opened the
image, edited it (a little), saved it, closed it, opened it, etc...twenty times, and
I couldn't see a diference.

> The difference
> noise like and very small. For a normal picture you won't see any
> difference. Also it might be the additional loss gets smaller and
> smaller with many additional savings (without editing) upto a point
> where there is no change anymore. I have no mathematical proof for
> that, though.
> Now if you start with an image in PS, edit it, save it, edit it, save
> it, etc. you are not losing any data. The reason is that PS only writes
> the compressed image to a file but keeps the uncompressed image in
> memory. So it does not compress it and then reload the compressed image
> back into memory. In the later case you would lose data with each save
> and it would be awfully slow.

That's correct.

>
> One thing I wonder is if it is possible to do a lossless flipping of an
> image that has not a multiple of 8 pixels in the direction you flip it.
> Does anybody know about that?
>
> Robert
>
> __
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
>


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] RE: JPEG Lossless mirror?

2002-02-09 Thread

I believe you are not correct, here. I have read in several accounts, both
from people who have tried this experimentally and from people who
understand the theory of JPEG compression far better than I do, that opening
a JPEG, and then resaving it without making any changes to the file, at the
same compression ratio as it was originally saved, does not further degrade
the image. The degradation happens when the file is first saved as a JPEG,
and further degradation is likely to happen if you make changes to the
contents of the file and then resave it, but it won't degrade if you merely
open the file, make no changes, resave it, open it again, and resave it
making no changes, no matter how many times you repeat this process. (Though
why you would want to open a JPEG and then resave it unchanged, at the same
compression ratio, rather than simply closing it, is an open question.)

- David

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert Meier
Sent: Friday, February 08, 2002 9:31 PM
To: [EMAIL PROTECTED]
Subject: [filmscanners] Re: JPEG Lossless mirror?



--- "Pat Cullinan, jr." <[EMAIL PROTECTED]> wrote:
> I had been a believer in the proposition that multiple jpeg saves
> would
> degrade an image, but after reading a notice to the contrary in one
> of the
> trade mags, I did my own trials and now I save and resave jpegs which
> aren't even maximum quality without any qualms.

The trade magazine is wrong at least for the following common scenario.
If you save a picture as jpeg in PS, close the image, reload the image
and save the image again in jpeg you will lose data. The difference
noise like and very small. For a normal picture you won't see any
difference. Also it might be the additional loss gets smaller and
smaller with many additional savings (without editing) upto a point
where there is no change anymore. I have no mathematical proof for
that, though.
Now if you start with an image in PS, edit it, save it, edit it, save
it, etc. you are not losing any data. The reason is that PS only writes
the compressed image to a file but keeps the uncompressed image in
memory. So it does not compress it and then reload the compressed image
back into memory. In the later case you would lose data with each save
and it would be awfully slow.
One thing I wonder is if it is possible to do a lossless flipping of an
image that has not a multiple of 8 pixels in the direction you flip it.
Does anybody know about that?

Robert

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com



Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe
filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title
or body


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] Re: JPEG Lossless mirror?

2002-02-09 Thread Robert Meier


--- [EMAIL PROTECTED] wrote:
> Re-encoding *unchanged* data at the same compression setting
> gives
> no additional loss.

It does give an additional loss. Nevertheless, the additional loss is
very small, much smaller then what you lose when you store a tiff image
with the highest jpeg quality in PS.

> The question is whether flipping constitutes
> changing,
> and I think it probably doesn't, but I don't know the JPEG spec well
> enough
> to be sure. I am sure someone will.

To flip an image you do not have to decode and code it again. You just
re-arrange the DCT coefficients. Considering the jpeg algorithm I
believe it will work only on images with a multiple of 8 pixels in the
flipping direction.

Robert

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] Re: JPEG Lossless mirror?

2002-02-08 Thread Robert Meier


--- "Pat Cullinan, jr." <[EMAIL PROTECTED]> wrote:
> I had been a believer in the proposition that multiple jpeg saves
> would
> degrade an image, but after reading a notice to the contrary in one
> of the
> trade mags, I did my own trials and now I save and resave jpegs which
> aren't even maximum quality without any qualms.

The trade magazine is wrong at least for the following common scenario.
If you save a picture as jpeg in PS, close the image, reload the image
and save the image again in jpeg you will lose data. The difference
noise like and very small. For a normal picture you won't see any
difference. Also it might be the additional loss gets smaller and
smaller with many additional savings (without editing) upto a point
where there is no change anymore. I have no mathematical proof for
that, though.
Now if you start with an image in PS, edit it, save it, edit it, save
it, etc. you are not losing any data. The reason is that PS only writes
the compressed image to a file but keeps the uncompressed image in
memory. So it does not compress it and then reload the compressed image
back into memory. In the later case you would lose data with each save
and it would be awfully slow.
One thing I wonder is if it is possible to do a lossless flipping of an
image that has not a multiple of 8 pixels in the direction you flip it.
Does anybody know about that?

Robert

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] Re: JPEG Lossless mirror?

2002-02-08 Thread TonySleep

On Fri, 8 Feb 2002 08:54:22 -  Mark Otway ([EMAIL PROTECTED]) wrote:

> I know the encoding only takes place when the image is saved in PS (as
> opposed to when it's manipulated). But since the act of re-encoding
> results in some data loss, if I can perform these simple tranformations
> (flip) without doing so then it's obviously preferable.

Convert to TIFF, flip, save as JPEG shouldn't leave you with a worse file
than when you started. But I'm not convinced merely flipping the JPEG would
either. Re-encoding *unchanged* data at the same compression setting gives
no additional loss. The question is whether flipping constitutes changing,
and I think it probably doesn't, but I don't know the JPEG spec well enough
to be sure. I am sure someone will.

Regards

Tony Sleep
http://www.halftone.co.uk - Online portfolio & exhibit; + film scanner info
& comparisons

Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] Re: JPEG Lossless mirror?

2002-02-08 Thread Pat Cullinan, jr.



Mark Otway wrote:

> >> This isn't so, Mark.  While you're editing an image is PS,
> >> no jpeg processing is performed. Your'e perfectly safe.  The
> >> jpeg processing occurs only when you save the image to a jpg
> >> file, and even then virtually no further degradation takes
> >> place, believe it or not (you can test this yourself).
>
> I know the encoding only takes place when the image is saved in PS (as
> opposed to when it's manipulated). But since the act of re-encoding
> results in some data loss, if I can perform these simple tranformations
> (flip) without doing so then it's obviously preferable.

Hi Mark,

Oh, I get it.  All the same, if the act of re-encoding results in data loss,
I've never noticed it. I've taken a jpeg image and subjected it to 20 edits
and re-encodings, and was unable to detect any image degradation.
It's kind of counteintuitive, but you can try it for yourself.

I had been a believer in the proposition that multiple jpeg saves would
degrade an image, but after reading a notice to the contrary in one of the
trade mags, I did my own trials and now I save and resave jpegs which
aren't even maximum quality without any qualms.

Thanks for raising the issue.  I'm exploring Guido's Tech Site.  It's a good turn-on.


>
>
> Mark
>


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body



[filmscanners] RE: JPEG Lossless mirror?

2002-02-08 Thread Mark Otway


Just to follow this post up, I've found that the Independent JPEG Group
have developed a utility called 'jpegtran' which performs lossless
transformations on JPEG images. This webpage:

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

contains a very long list of the various apps which support this
functionality either directly by calling jpegtran or indirectly by using
code based on jpegtran.

HTH

Mark


Unsubscribe by mail to [EMAIL PROTECTED], with 'unsubscribe filmscanners'
or 'unsubscribe filmscanners_digest' (as appropriate) in the message title or body