Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Better JPEG program - minimized JPEG degredation

3 views
Skip to first unread message

Paul D. Sullivan

unread,
Jan 26, 2007, 7:46:56 AM1/26/07
to
I was following the discussion and started doing some searching.

I found this app called Better JPEG that says it does some key
operations in a method that absolutley minimizes recompression.

http://www.betterjpeg.com/

Has anyone heard about this? It seems a smart way to do things,
but I'm not sure if it is BS or if it is real.

If you have any experience on this app, please share some
feedback if you would.

Thanks


David J Taylor

unread,
Jan 26, 2007, 9:36:17 AM1/26/07
to

With the right software, you can perform cropping and 90-degree step
rotations on JPEG images /without/ incurring any extra loss due to
re-compression. E.g. Jpegcrop:

http://sylvana.net/jpegcrop/

David


Mike Fields

unread,
Jan 26, 2007, 10:50:14 AM1/26/07
to

"David J Taylor"
<david-...@blueyonder.co.not-this-bit.nor-this-part.uk> wrote in
message news:Blouh.1487$9S5...@text.news.blueyonder.co.uk...

Irfanview (FREE) also supports "lossless" jpg rotations.

mikey

HEMI-Powered

unread,
Jan 27, 2007, 7:54:55 AM1/27/07
to
Today, David J Taylor made these interesting comments ...

adept cropping and 90 deg rotates can indeed result with no image
degradation but how does one then save the image without incurring
at least some loss, unless you've figured out an algorithm for
altering the compression factor, chroma subsampling, etc. that
minimizes damage? I've always been taught that as soon as you re-
save at least some damage is done, but NOT necessarily enough to be
concerned about or to even see

--
HP, aka Jerry

Paul D. Sullivan

unread,
Jan 27, 2007, 8:24:43 AM1/27/07
to

I was impressed by their language on their site in way of
explanation. They say they optimize it so only the actual pixels
that have changed are re-saved. It does not process any other
blocks of pixels. Sounds quite smart.

I think I'm going to try that program out more in-depth. Red Eye
Reduction with almost no hit in quality sounds quite good indeed.


HEMI-Powered

unread,
Jan 27, 2007, 8:34:15 AM1/27/07
to
Today, Paul D. Sullivan made these interesting comments ...

Can't comment on a specific program which may have been written
to minimize image damage under certain well-defined situations as
I haven't tried it/them. I was talking in general terms using my
knowledge - or lack thereof - of who the JPEG spec was designed
and how it is implemented in software.

For me, I try never to re-edit the same image, if I can, I will
go back to the original unedited camera image which I always
save. However, both the 80/20 Rule and the Law of Diminishing
Returns get in the way of that rigid a rule, so I do re-edit my
own or others images. However, I carefully examine the image to
see what damage is already there - it may be slight or
considerable - and usually go to a lower compression rate and/or
alter chroma sub-sampling to achieve best possible results.

Depending on the types of damage I may see, such as jaggies,
posterization, artefacts, noise, etc. etc., I may apply mild-to-
agresssive corrective action before re-saving. But, one thing I
ALWAYS do, no matter if it is a first-time save or a multiple
edit/save/edit/save cycle, is immedately open the just saved (or
re-saved) image an relook for damage. Sometime I see considerable
damage even on a 1st time save, for which I alter my technique as
described above.

Since I am not a pro nor do I print to large sizes, I can afford
compromizes that others may find to be unacceptable. Thus, unless
I am specifically saving proprietary items such as layers vector
data, I usually don't save to a non-compressed format.

Just one man's opinion, YMMV ...

--
HP, aka Jerry

Paul D. Sullivan

unread,
Jan 27, 2007, 8:49:25 AM1/27/07
to
Good points you make. What with data storage being so cheap
compared to the old days, I can get 7 meg JPG into 14 meg PSP and
store 'em in that native Paint Shop Pro format without much
trouble.

HEMI-Powered

unread,
Jan 27, 2007, 9:46:48 AM1/27/07
to
Today, Paul D. Sullivan made these interesting comments ...

> Good points you make. What with data storage being so cheap

> compared to the old days, I can get 7 meg JPG into 14 meg PSP
> and store 'em in that native Paint Shop Pro format without
> much trouble.

Since I seldome use vector data or extensive layering, PSPimage
isn't that important to me, nor have the many advantages of RAW
been enough to overcome the steep learning curve.

For your example of a 7 MB JPEG into an 8MB PSP, that seems
extreme. What pixel size was used in this comparo? When I do
that, the ratio is more like 10:1 in favor JPEG.

--
HP, aka Jerry

David J Taylor

unread,
Jan 27, 2007, 10:35:20 AM1/27/07
to
HEMI-Powered wrote:
[]

> adept cropping and 90 deg rotates can indeed result with no image
> degradation but how does one then save the image without incurring
> at least some loss, unless you've figured out an algorithm for
> altering the compression factor, chroma subsampling, etc. that
> minimizes damage? I've always been taught that as soon as you re-
> save at least some damage is done, but NOT necessarily enough to be
> concerned about or to even see

In programs such as JPEGcrop, although the image is presented to the
viewer in an uncompressed form for examination and selection of the
cropping region (i.e. as 24-bit RGB), internally the 8 x 8, or 16 x 16
blocks comprising the original JPEG are retained, and the rotation or crop
are made on these blocks, and /not/ on the RGB data.

So, for example, crop simply consists of writing out only the blocks you
need, and altering the file headers to reflect the new number of pixels.
The content of the blocks - the compressed JPEG data - is not altered, so
no new compression loss is incurred because there is no recompression.

Lossless rotation (only at 90 degree angles) is achieved by similar
mathematical operations on the data in the blocks, but again without any
decompression and re-compression.

It's a neat idea which works very well.

David


Paul D. Sullivan

unread,
Jan 27, 2007, 10:57:24 AM1/27/07
to
> Since I seldome use vector data or extensive layering, PSPimage
> isn't that important to me, nor have the many advantages of RAW
> been enough to overcome the steep learning curve.

I use tons of layers, so it's a very convenient format for me.


dnha...@aol.com

unread,
Jan 27, 2007, 6:04:27 PM1/27/07
to

I checked out the free trial for a few months (on multiple computers)
and finally purchased it last month. Anyone interested in making
changes while keeping jpg compression to the bare minimum will
appreciate what Better Jpeg does (it's able to re-save jpeg files but
only change a few select 8x16 blocks, leaving the other 95% of the
picture's pixels unchanged, and not recompressing the entire
picture). It's a good compact program and I hope they keep developing
it. I've used Jpegcrop for years; this program builds on it and adds
functionality and versatility.

I haven't tried the redeye feature yet - mainly I want to quickly be
able to:
- Crop to fixed aspect, such as 4x6, before taking the pictures in for
printing.
- And rather than crop at just any old location (i.e. in the middle of
an 8x16 block, jumbling and shuffling the pixels over and creating jpg
artifacts such as the halo effect, among other things), it can 'snap-
to' the nearest 8x16 block boundary for the new top left corner start
point.
- Add text/watermark with various effects, again with only a small
block of pixels getting recompressed rather than the entire file.
- Extend a photo from a 4x3 aspect camera so it fits a 3/2 or 4x6
aspect, by adding a blank white area on one side. This allows it to
be printed out properly at 4x6 inches without cutting off anything
(i.e. so the photo developing service won't automatically cut a strip
off the top and bottom to force the 3x4 aspect image to fit across a
4x6 print). It can be automated for doing multiple photos, in batch
process.
- If you only need to fix a small area of the photo (carpet stain, a
single pimple, etc), you can select that area (draw a box around it)
in Better Jpeg, Copy the selection, Paste it into Photoshop, fix it,
then Paste it back into the picture with Better Jpeg. (Because this
feature works so well, I went with the stand-alone version rather than
the Photoshop plug-in when deciding which version to purchase.)
- Another useful enhancement on the basic Jpegcrop is the Explorer-
like 2 pane window, this lets you move through directories easily
rather than having to open and close each file individually. You can
advance through the folder contents by clicking on the thumbnails in
the left pane.

FWIW my routine for nearly a decade is to use Irfanview as a viewer to
quickly scroll through directories, and for crude editing (resize to
half size, lighten dark pictures), and for batch renaming and
resizing. I use Jpegcrop for lossless rotation and cropping, and have
it in my Irfanview's menu item 'Open with external editor'. Even
after purchasing Better Jpeg, I still use Guido's Jpegcrop for dealing
with single images, or whenever going thru the photos with Irfanview.
I have Photoshop for retouching, but don't use it for simple cropping
and viewing; the other programs are so much smaller and less 'resource
hoggish' and probably do a better job anyway.

I stumbled onto Better Jpeg last year while checking out Jpegcrops, a
separate good free program that also builds on the basic Jpegcrop
jpegtran algorithm. If you're not inclined to fork over $25 for
Better Jpeg, then this is the next best thing. http://ekot.dk/
programmer/JPEGCrops
There's another free program designed to insert text, and change only
specific 8x16 blocks without recompressing the entire jpeg.
(Jdatestamp) I haven't tried it. http://jdatestamp.sourceforge.net
The venerable Exifer can add text/annotation, but it's not 'lossless'
AFAIK. I use Exifer when I want to add a name or keywords to the Exif
and IPTC data, or to fix time/date errors.

On my camera I've been using a wide prime lens (non-zooming), so many/
most of my pictures can use some cropping! Sorry about any mangled
terminology, just wanted to report good experience with the
program.

HTH dh
www.pbase.com/dh

Paul D. Sullivan

unread,
Jan 27, 2007, 7:47:23 PM1/27/07
to
Great info! Thanks much.

mr...@gmx.net

unread,
Jan 29, 2007, 2:12:24 PM1/29/07
to

On 27 Jan., 18:04, "dnharr...@aol.com" <dnharr...@aol.com> wrote:
> The venerable Exifer can add text/annotation, but it's not 'lossless'
> AFAIK. I use Exifer when I want to add a name or keywords to the Exif

> andIPTCdata, or to fix time/date errors.

If you speak about EXIF and IPTC data, then I'm quite sure that Exifer
is lossless. A JPEG consists of different sections, one for the image
data, one for EXIF, one for IPTC, .... There is absolutely no need to
alter the image data section in any way if the EXIF or IPTC section
are changed. In fact it is even easier to implement and faster in
execution, so I doubt that any meta data tool will recompress the
image data in that case.
And I'm completely sure that Mapivi, ExifTool and
Image::MetaData::JPEG don't change the image data when editing EXIF
and IPTC.

In my opinion the whole JPEG quality discussion is a little bit
overrated. Of course, everybody should be aware that a recompression
can reduce the quality of a JPEG, but if you consider some simple
rules nobody will ever notice. I guess that a lot of pictures are
never printed at all and about 90% of all prints are in the size of
4x6 inch. So, even if you save a JPEG two or three times with a high
quality setting there is no real visible difference to the original.

Here are some rules of thumb:
- Do as much as possible in a lossless way (rotating, cropping, adding
meta data, e.g. with Mapivi)
- Keep the quality level (NOT compression level!) at 95%. This gives a
reasonable file size, and according to the JPEG developers a higher
level would just add to the file size not to the quality!
- Keep the number of recompressions as small as possible
- Do not overwrite the original file (you may need it later)

For special tasks and big prints other strategies (RAW, 16bit, TIFF,
PNG, XCF, ...) may be worth considering, but I guess for most people
and tasks staying with JPEG and applying the above rules is a very
good choice.

I edit some of my pictures in GIMP and add a frame to some of these
pictures later (using Mapivi).
So at a maximum I recompress a JPEG two times with quality level 95%.
I made prints up to 16x24 inch and I'm happy with the quality, but of
course everybody has different demands.

Everybody who is uncertain about JPEG quality should try this (it
takes only five minutes):
1) Take a JPEG picture from the camera, open it in GIMP or Photoshop
and save it with 95% under a new file name
2) Repeat the last step
3) Compare the original with the new version (as two prints or on the
monitor; maybe in 100% zoom)
4) Decide if you can see a difference, and if you can tolerate it

Just my 2 cents.

Regards
Martin

dnha...@aol.com

unread,
Jan 30, 2007, 2:07:09 AM1/30/07
to

On Jan 29, 1:12 pm, m...@gmx.net wrote:
> On 27 Jan., 18:04, "dnharr...@aol.com" <dnharr...@aol.com> wrote:
>
> > The venerable Exifer can add text/annotation, but it's not 'lossless'
> > AFAIK. I use Exifer when I want to add a name or keywords to the Exif
> > andIPTCdata, or to fix time/date errors.

> If you speak about EXIF and IPTC data, then I'm quite sure that Exifer
> is lossless. A JPEG consists of different sections, one for the image

> data, one for EXIF, one for IPTC, (clip)


Agreed, Exifer modifies EXIF and IPTC data in a lossless manner. For
the record, I was focussing on operations that change the image
itself, in this case by stamping text, date or other annotation onto
part of the picture. Sorry I wasn't so clear.

E.g., the sentence immediately preceding this one in my original full
post - I was saying "There's another free program designed to insert

text, and change only specific 8x16 blocks without recompressing the

entire jpeg..."

You make good points (and I should take a look at the Mapivi software
you mentioned later) but in my own defense, I certainly didn't "diss"
Exifer! Under "Image --> Insert Watermark", Exifer can do this, but
it isn't lossless - when you Save it, the whole photo is changed (not
just the affected blocks, as with Better Jpeg and Jdatestamp). As to
whether the cumulative jpeg degradation hurts the image, I dunno.

mr...@gmx.net

unread,
Jan 30, 2007, 2:34:06 PM1/30/07
to

On 30 Jan., 02:07, "dnharr...@aol.com" <dnharr...@aol.com> wrote:
> the record, I was focussing on operations that change the image
> itself, in this case by stamping text, date or other annotation onto
> part of the picture. Sorry I wasn't so clear.

No problem!

> E.g., the sentence immediately preceding this one in my original full
> post - I was saying "There's another free program designed to insert
> text, and change only specific 8x16 blocks without recompressing the
> entire jpeg..."
>
> You make good points (and I should take a look at the Mapivi software
> you mentioned later) but in my own defense, I certainly didn't "diss"
> Exifer!

I know, this wasn't my impression either, I wrote my post just to
clarify for other readers that the "main" functionality of Exifer is
lossless.

> Under "Image --> Insert Watermark", Exifer can do this, but

Sorry, I didn't know about this function.

> it isn't lossless - when you Save it, the whole photo is changed (not
> just the affected blocks, as with Better Jpeg and Jdatestamp).

You are absolutely right!

BTW, there is also a free command line tool for lossless JPEG drop
available (jpegtran with drop patch), see "Lossless crop 'n' drop (cut
& paste)" on this page:
http://sylvana.net/jpegcrop/jpegtran/

With that tool it is possible to add a lossless frame or watermark to
a picture.
Example:
jpegtran -drop +10+50 watermark.jpg -outfile pic-watermark.jpg pic.jpg

+10 = x coordinate
+50 = y coordinate
watermark.jpg = small watermark picture
pic.jpg = original picture
pic-watermark.jpg = new picture with watermark

I will integrate this feature - at least the lossless framing - in the
next release of Mapivi.

Regards
Martin

0 new messages