Home All Groups Group Topic Archive Search About

resave a jpg with same compression

Author
16 Nov 2006 9:01 PM
Daniel
hi i have made a program that modifies jpgs.  the problem is when i resave
the new jpg, the compression ratio has changed.  i need a way to read the
compression ratio and save it back with the same ratio.  do you think this
will keep recompressing the data ?

Thanks,
Daniel

Author
16 Nov 2006 10:46 PM
Spam Catcher
=?Utf-8?B?RGFuaWVs?= <Dan***@discussions.microsoft.com> wrote in
news:6A6EAD1C-624C-4200-948D-D4BDF91BC7F2@microsoft.com:

> hi i have made a program that modifies jpgs.  the problem is when i
> resave the new jpg, the compression ratio has changed.  i need a way
> to read the compression ratio and save it back with the same ratio.
> do you think this will keep recompressing the data ?

Yes, each time you save a JPEG, it will be recompressed. Also note that the
ratio is abitrarily defined by the JPEG algorithm (i.e. Max Quality in one
implementation is not the same as Max Quality in another).


However, certain operations can be lossless - like cropping or rotation.