Google Answers Logo
View Question
Q: Software shrinking my jpg files ( Answered 5 out of 5 stars,   0 Comments )
Subject: Software shrinking my jpg files
Category: Computers > Software
Asked by: pocketdora-ga
List Price: $5.00
Posted: 14 Jun 2006 14:52 PDT
Expires: 14 Jul 2006 14:52 PDT
Question ID: 738189
I have a flickr pro account and have been uploading my original jpg
photo files there for permanent safekeeping. They are taken on a 5
megapixel camera (a Casio Z55), and they tend to be about 2mb each.
Until recently, I uploaded the files directly from windows, but I just
started using the photo organizing software Picajet FX (v2.5). This
allows me to add tags and perform simple edits such as rotation and
brightness. It also incorporates good flickr upload functionality. So
far so good. But because it keeps your changes in a database rather
than writing them to the files, when I upload the pictures, I have
only two options. Either I upload the untouched files, which are not
even correctly rotated, or I select an option to create a new jpg on
upload. When I do the latter, though, the file that gets uploaded to
flickr is of a dramatically different size - even if I've made no
changes to the image at all. If I select a jpg quality of 9, the file
size increases to over 3mb. If I select a jpg quality of 8, the file
size halves to about 1mb. I want to retain the full quality of my
files, as I sometimes like to print 20"x30". But then again, the
photosites seem to base their recommendation about how large you can
print your pictures on number of pixels, and according to Picajet that
remains unchanged, at 2560x1920. My question is: What am I losing when
I let Picajet archive my 2mb files in the form of 1mb files, and does
it really matter? I'd love to be able to chill out and just go with
it, but I'm nervous about losing my original files and discovering
that my flickr back up files are compromised. And surely if the files
could be half the size without compromise, the camera would save them
that way in the first place?
Subject: Re: Software shrinking my jpg files
Answered By: eiffel-ga on 15 Jun 2006 05:24 PDT
Rated:5 out of 5 stars
Hi pocketdora-ga,

You are correct in saying that if jpeg compression could cut the file
size without degrading the quality, the camera would save photos that
way in the first place. There is, and must inevitably be, some
degradation of the image when using jpeg, as jpeg is an inherently
lossy format. The degradation increases as the jpeg quality setting is

However, the JPEG algorithm is rather good at compressing an image by
discarding detail that we are unlikely to notice. Jpeg can provide
rather good compression with only minor visual degradation, but if you
are printing photos at 20"x30", you are more likely to notice the
degradation than someone who is printing at 4"x6".

When a photosite makes a recommendation based on pixels, this is a
simplification which assumes jpeg compression as "typically" provided
by the camera. A camera may use different amounts of jpeg compression
according to how many pixels you have asked it to save. I would
generally trust the camera manufacturers to choose appropriate amounts
of compression for the kind of users their camera targets.

For the best results, of course, you need to tell your camera to store
the photos in a raw format, without any jpeg compression. This leads
to very large file sizes, and for many purposes it is visually
acceptable to use jpeg compression with a high quality setting.

The jpeg algorithm breaks up the image into blocks of 8x8 pixels.
Within each of these blocks, it looks not at the individual pixels but
at whether there are color gradients across the pixels. A color
gradient across the pixels can be encoded quite compactly. For each
8x8 block the algorithm calculates multiple color gradients (at
different frequencies) that, when added together, approximate the
original image. The quality factor affects just how many of these
color gradients are used - the less visually significant ones can be

Well, that's a pretty hokey "quick summary" of the idea behind jpeg
compression. A much more precise description (with worked example) can
be found here:

"Wikipedia: JPEG"

So just how severe is the image degradation for any specific quality
level? It depends on the nature of the image. Images with
gently-changing gradients and soft edges (such as rainbows and clouds)
compress to small sizes without obvious visual degradation. Images
with sharp edges and bold color contrasts compress much less without
degradation - or alternatively, show much more degradation for a given
amount of compression.

There's a great jpeg quality browser here:

"JPEG Compression Errors Evaluation"

It shows a test image with a grid of color squares, plus a face. Wait
for the page to load completely, then click the buttons below the
image and watch how the image changes. As you reduce the quality, the
first noticeable degradation is in the text. As you reduce the quality
further, the color squares start to show artifacts, then with further
quality reduction the face becomes visually degraded too.

On this sample, you can reduce the quality quite a lot before the
degradation becomes objectionable. That's because you are viewing it
on a screen, with its limited resolution, On photographic paper you
would notice the degradation sooner, and at 20"x30" you would notice
the degradation much sooner.

I realise this doesn't provide you with a clear solution to your
dilemma. It depends on your own personal perception of the image
degradation. But I am absolutely sure what I'd do in this situation.

I would upload the high quality images. After I had printed off a
dozen or so at 20x30, and was familiar with the image quality this
produces, I'd upload a few of those same images at a lower quality and
print them off. Only if I was perfectly happy with the lower quality
printouts would I start uploading my backups at the lower quality.

I hope this addresses the issues that you raised in your question. If
not, please request clarification.


Google search strategy:

"jpeg compression" artifacts

Request for Answer Clarification by pocketdora-ga on 15 Jun 2006 07:19 PDT
Thanks, this is great. One more thing though - if I choose to let
Picajet convert to the maximum quality jpegs (that is, turing my 2mb
files into 3mb files), can I rest assured that I'm not losing quality?
Or could I still be losing something even though it is making the
files bigger? It's a bit annoying to have my software bloat the files,
if the quality is as good it might be preferable to having to use a
whole different editing program.

Clarification of Answer by eiffel-ga on 15 Jun 2006 08:07 PDT
Hi pocketdora-ga,

If you edit a jpeg-compressed image, the editing program must first
uncompress the original image, apply the edit, then recompress the
modified image. This can cause additional image degredation. Although
this degradation should be small if you are saving at a high quality
setting, if you do this repeatedly then the loss of degradation would
soon become significant.

Presumably that's why your application keeps a list of the changes in
a database - so that it only needs to recompress once when you export
your image, rather than every time you edit the image. That's good!

Having said that, certain kinds of changes can be made to a jpeg file
without the need to uncompress and recompress the image. I see from
the PicaJet website
that they claim to be able to "crop and rotate JPEG images without
recompressive files". That's great, although possibly it may only
apply to 90 degree rotations (check your documentation to be sure).
You can also edit metadata (e.g. IPTC fields) without needing to
recompress the image data.

To summarise: If you restrict your editing to crop, rotate and edit
metadata, there should be no image degradation. Other editing will
necessarily entail recompression of the image, with a slight image

pocketdora-ga rated this answer:5 out of 5 stars and gave an additional tip of: $2.00
It was good to receive not just information but also some advice.


There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy