This is how bad JPEG compression is: (imagesize warning)

Discussion in 'Digital Discussion & Q&A' started by Garbz, Nov 20, 2007.

  1. Garbz

    Garbz No longer a newbie, moving up!

    Joined:
    Oct 26, 2003
    Messages:
    9,713
    Likes Received:
    203
    Location:
    Brisbane, Australia
    Can others edit my Photos:
    Photos NOT OK to edit
    Those of you who have been paying attention to the Equipment subforum will know I have been bored and decided to find out once and for all how bad filtes are on lenses. http://www.thephotoforum.com/forum/showthread.php?t=100830

    Well I'm extending this to another hot topic. Lots of people here talk about storing of RAW files or TIFF files (better idea IMO), or my own personal favourite Large JPEGs. I work with RAWs and PSDs and finally archive in JPEG, and in the true sense of the word they are finished files stored for long term use. I.e. I will never re-open them and edit them for anything other than making a compressed version for email or web posting.

    That is me. Others however may wish to re-edit their files in the future. Some people just can't put a file down and it gets constantly played with. I thought I'd have a look at how bad lossy JPEG compression really is:

    Method and assumptions:
    Firstly I would like to point out I did this test with the intention to break it. The image I chose for it was a sugar glider I photographed recently. Bokeh doesn't compress well with JPEG, the slight noise makes matters worse, the image has a lot of detail in the centre, is sharp, and above all it is mostly blue. Those of you who know how JPEG works and how the eye perceives colours may also know that the blue channel suffers the worst quality hit in JPEG compression.
    An action was made in photoshop which opened the file and saved it as a Quality 12 (max possible) standard JPEG. I apologise about the colour the result ended up in my working colour profile ProPhoto so the colours look entirely out of whack on a web browser, but the detail is what we are after here. Those who want to see the image with it's proper colours simply save it and open it in photoshop or another ICC profile aware software, or get a mac and use Safari.
    The open and save action was repeated, a lot.

    1st Save from RAW, followed by 2,3 and 4:
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    At around the 5th you start noticing some of the gradients are no longer smooth:
    [​IMG]
    The 10th is starting to look ugly:
    [​IMG]
    The 25th shows severe compression artefacts:
    [​IMG]
    Now at this point it starts getting really problematic. The compression artefacts are starting to eat into the detail on the sugar gliders coat. Image 50:
    [​IMG]
    Finally 99:
    [​IMG]

    Conclusion:
    I started this test with JPEG at Quality 3 and Quality 5, but after seeing the full Quality 12 results there's no need to even post the others. It's known gradients don't compress well, but I was expecting more form a maximum quality JPEG after only 5 saves. It becomes unbearable at 10. If you're inclined to edit your images in the future, JPEG no matter how high quality is simply not the format for you. That said after only 1-2 saves the JPEG looks every bit as good as the RAW original.
     
  2. domromer

    domromer TPF Noob!

    Joined:
    Aug 11, 2007
    Messages:
    878
    Likes Received:
    0
    Location:
    Eugene, Oregon
    Can others edit my Photos:
    Photos NOT OK to edit
    Thanks for the cool demo. If you opened and closed without making any changes you would not lose any quality right?
     
  3. fido dog

    fido dog TPF Noob!

    Joined:
    Nov 14, 2006
    Messages:
    143
    Likes Received:
    0
    Can others edit my Photos:
    Photos OK to edit
    Thanks for the test results! I open and then save in psd to work on. I only use the jpeg for prints.

    Would this be considered "Animal Testing"??? ;)

    Cute Sugarglider.... :)
     
  4. Garbz

    Garbz No longer a newbie, moving up!

    Joined:
    Oct 26, 2003
    Messages:
    9,713
    Likes Received:
    203
    Location:
    Brisbane, Australia
    Can others edit my Photos:
    Photos NOT OK to edit
    Of course it wouldn't impact the quality if you don't save. So far there is no such thing as something which deteriorates when you only open it. Mind you the movie and record industry have been trying to do that for years... and failed every time.

    The sugar glider was a reject photo. It doesn't look right bright. The photo I kept had the flash down -2EV was very dark yet looked much more natural.
     
  5. Payt

    Payt TPF Noob!

    Joined:
    Aug 26, 2007
    Messages:
    51
    Likes Received:
    0
    Location:
    Buffalo, NY
    Can others edit my Photos:
    Photos OK to edit
    Thanks for sharing your findings. This is an interesting subject, as I have always wondered to what extent a jpeg deteriorates over time.

    I, too, would like to know whether the simple opening and viewing of the file causes any sort of malicious effects.

    EDIT: thought so :)
     
  6. Sw1tchFX

    Sw1tchFX TPF Noob!

    Joined:
    May 3, 2006
    Messages:
    7,500
    Likes Received:
    478
    Can others edit my Photos:
    Photos NOT OK to edit
    I work everything in TIFF's. More data never hurt nobody and HD's are cheap anyway.
     
  7. RKW3

    RKW3 TPF Noob!

    Joined:
    Apr 30, 2007
    Messages:
    1,716
    Likes Received:
    0
    Location:
    So Cal
    Can others edit my Photos:
    Photos OK to edit
    Wow very interesting to say the least. So just re-saving a Jpeg image 25 times gets you worse quality?

    For some reason I used to use PNG-24 to save my pictures after I photoshopped them. I never noticed a loss of quality or anything, and I realized logos and such actually come out better saved as PNG.

    Since my compact camera can't save images in TIFF or RAW format, just jpeg, after I photoshop them would it be a good idea to save them as a PNG like I used to? Will that prevent compression if I feel like re-editing them multiple times?

    Thanks for the test Garbz!
     
  8. RKW3

    RKW3 TPF Noob!

    Joined:
    Apr 30, 2007
    Messages:
    1,716
    Likes Received:
    0
    Location:
    So Cal
    Can others edit my Photos:
    Photos OK to edit
    First off, sorry for editing your picture Garbz, this is only for further research. (hope you don't mind)

    I was curious if saving the image as a PNG-24 was a better alternate than JPEG in 100 quality, to avoid compression. Here are the results.

    Original JPEG compared to Original PNG-24 (after being resaved off of the web only once)
    Jpeg: (still looks fine)
    [​IMG]
    PNG: (still looks fine)
    [​IMG]

    JPEG compared to PNG-24 after 5 Saves
    Jpeg: (you can notice some loss of quality now)
    [​IMG]
    PNG: (looks good as the first save)
    [​IMG]

    JPEG compared to PNG-24 after 10 Saves
    Jpeg: (looks pretty bad now)
    [​IMG]
    PNG: (looks good as first save)
    [​IMG]

    Jpeg compared to PNG-24 after 20 Saves
    Jpeg: (looks horrible now)
    [​IMG]
    PNG: (looks exactly like first save still)
    [​IMG]


    I think these results prove that saving your images as PNG-24 can be a better alternate than saving your photo as a JPEG with 100 quality at times. The png still retains quality from the upload to the internet too. The only downsides I can see about saving your image as a PNG is that some photography websites/ galleries won't let you upload PNG's there, just JPEG, etc.

    Overall I couldn't find a significant difference between the PNG saved ten times compared to the ones saved once.

    If any of you smarter people want to add to this or tell me if this is flawed somehow please do. This was just out of curiosity for me and I decided to share. (BTW, I'm not trying to steal your spotlight at all garbz, just trying to experiment more.) And maybe a different save type can produce the same results as the PNG too? I don't know, but for now I am going to save my photos as PNG-24. :wink:
     
  9. willia4

    willia4 TPF Noob!

    Joined:
    Oct 8, 2007
    Messages:
    20
    Likes Received:
    0
    Location:
    Charleston, SC
    Can others edit my Photos:
    Photos OK to edit
    PNG is lossless so saving it a million times won't affect its quality.

    I'm not certain (and WAY too lazy to test right now), but I bet each save will be bit-for-bit identical (until you start editing it, of course!).
     
  10. RKW3

    RKW3 TPF Noob!

    Joined:
    Apr 30, 2007
    Messages:
    1,716
    Likes Received:
    0
    Location:
    So Cal
    Can others edit my Photos:
    Photos OK to edit
    That's my point. If PNG is lossless why aren't people saving their photos as that? I seem to be the only person I know of that ACTUALLY saves their photos as a PNG. (well recently I haven't been, but I have in the past for a reason I don't know, now I am going to for sure)

    I know some people won't save their photos as a PNG because they have RAW or TIFF files, so I understand, but maybe some people that don't have that option should try resorting to PNG?

    The only downside I have found with a PNG is that some sites/ galleries won't allow you to upload/ display them, but that's all.
     
  11. [JR]

    [JR] TPF Noob!

    Joined:
    Apr 7, 2007
    Messages:
    281
    Likes Received:
    0
    Location:
    Campbellton, NB, Canada
    Can others edit my Photos:
    Photos NOT OK to edit
    I thought PNGs were for small web graphics and animations... I may be wrong.
     
  12. RKW3

    RKW3 TPF Noob!

    Joined:
    Apr 30, 2007
    Messages:
    1,716
    Likes Received:
    0
    Location:
    So Cal
    Can others edit my Photos:
    Photos OK to edit
    I believe that's what it was meant for, hence the name "Portable Network Graphics" but I believe it can have other uses. I mean if the quality comes out this good in photographs why can't they be used for this too?
     

Share This Page

Search tags for this page

bad jpeg

,

bad jpeg compression

,
bad things about jpeg
,
is it bad to edit jpeg
,
what is bad about jpeg
,
whats bad about jpeg
,

why are jpegs bad

,
why is jpeg bad
,
why jpeg is bad
,
worst jpeg compression