Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

.jpg files compressible by 50%!

  • 20-06-2005 6:25pm
    #1
    Closed Accounts Posts: 4,943 ✭✭✭


    Is there something wrong here? I take pictures on my old digital camera (a 2MP one @1024x768), which results in 500kb sized pictures. I then resize em to about 640x480 and apply slightly higher compression to them in Adobe Photoshop, so as to make em a bit smaller for emailing around.

    350 photos typically takes up about 20megs. However, if i then create a .rar of em using Winrar, i can get a further compression of about 50% on em! This can't be right! jpg's are a compressed format, it can't be that inefficient, can it?


Comments

  • Registered Users, Registered Users 2 Posts: 999 ✭✭✭cregser


    That's surprising. Normally compression formats such as ZIP and RAR are not very good with pictures and sound files (hence the need to actually develop JPEG and MPEG). Unless I'm completely missing out on something.

    My initial guess would have been that you were not compressing the images alot (since JPEG has various levels of compression). But when you fit 350 photos in 20MB that's about normal.

    My other guess would be that if you were to compress 350 photos into a single .rar file you would get some compression. But definatly not 50%.

    I studied JPEG in college. It uses discrete cosine tranform and other Fancy Sh*t Maths (TM) to get images really small. It's actually very efficient. Something has to be up


  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    I'll host a few photos on my ftp, both before and after re-compression. I'd really like to know whats going on with this! Its quite odd.

    Before i recompress, winrar has no affect. After i recompress, winrar can further reduce the pics by an average of about 45%. They reduce from 21.3megs to 12.7megs for 347 photos.

    Linky is about 3.5megs, has 6 photos.

    LINKY

    The thing with JPEG is that it does have various levels of compression, but even at a low level of compression, winrar should have little to no affect on filesize. Just as zipping an MP3 should have little to no affect on filesize, no matter what bitrate you choose, as the encoder should be intelligent enough to not waste bits.


  • Registered Users, Registered Users 2 Posts: 3,977 ✭✭✭mp3guy


    I done my young scientist project on this. You know how JPEGs work? It is very possible that they can be compressed that much. Run your images through 7z with the PPMd compression algorithm, the best compression for images. Ultra compression


  • Registered Users, Registered Users 2 Posts: 3,977 ✭✭✭mp3guy


    Oh, and If it treats all 347 images as 1 big chunk of data, lets say theres 2 pics with a 100x100 square of black in each of them, instead of saying "100x100 black square" twice it would say "[100x100 black square]x2" saving 20 characters, or a few bytes. It all adds up.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,563 Mod ✭✭✭✭Capt'n Midnight


    photoshop isn't great at compressing at least one file format - and it may well be .jpg

    oddly enough MsPaint in XP is pretty good ! (based on file size I did not look at the quality.)

    Bottom line you need to use a different app to generate the jpg's
    have a look at infraview (does batch conversions) and/or gimpshop


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 999 ✭✭✭cregser


    I don't like the quality of MsPaint jpegs. It gets a good file size because of that quality.

    Using GIMP, I was able to compress the 481KB portacabin pick down to 52KB which looked slightly better than your 62KB compressed one. But that's probably a matter of opinion. In my experience, GIMP is excellent with JPEG and gives you loadsa options. The only problem is the interface is not very user friendly at all, but I'm used to it now.

    mp3guy, I agree that 7zip is the dogs dangly bits but I wasn't aware that RAR had advanced image archive compression techniques.

    And thanks for the REM pics btw :D
    I know someone who'll appretiate them.

    [EDIT:] BTW, I'm getting the same 50% "re-compression" on those pics even when I use ZIP. I could spend a while explaining this but in the end it would only be a best guess and I'm kinda sleepy now anyway... :cool:

    [EDIT EDIT] The "re-compression" doesn't work on "mine.jpg". So eh, yeah... I don't know!


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,563 Mod ✭✭✭✭Capt'n Midnight


    cregser wrote:
    GIMP is excellent with JPEG and gives you loadsa options. The only problem is the interface is not very user friendly at all, but I'm used to it now.
    Gimpshop ;)


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    It's not actually suprising that a digital camera produces not terribly well compressed images. The compression will be done either by a dedicated chip or a general (but slow) processor; either way there's a four-way tradeoff between speed, quality, space consumed and power used. Since people want high quality fast photos, and since memory is crazily cheap and batteries crazily bad, compression won't be the greatest priority. (Either lossy JPEG compression or lossless compression subsequently applied).

    Those camcorders that record onto cd-rs or dvd-rs suffer from much the same design problem, but they usually compromise on quality.


  • Registered Users, Registered Users 2 Posts: 999 ✭✭✭cregser


    Gimpshop ;)
    Yes I just noticed that after I made the post and looked it up. Looks good :) Ah well, too late now, I've been using GIMP for over a year now.

    [EDIT] Re: 50% Re-Compression Madness
    Even though I said I was sleepy I decided to look this up but all I've found is that this really shouldn't be happening.
    http://www.photo.net/learn/jpeg/
    Note that a Jpeg cannot be compressed further using Zip or any other process of lossless compression, since this is already done as the last step of the Jpeg encoding.

    This is generally the case and correct for practical purposes, but I thought I would point out that from a theoretical standpoint, it is not really true. Unless the lossless compression done in the last stage of the algorithm produced encodings with zero stochastic redundancy between the bits, then it still would allow for further compression, although Zip or other compressors one is likely to have available likely would not have the ability to squeeze the last bit of redundancy out to compress further.
    To OP, I suggest seeing what settings you have in Photshop that made this happen and Google them for an explaination. If nothing turns up then you might have a discovery on your hands ;)


  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    It's not actually suprising that a digital camera produces not terribly well compressed images.
    Look at the compressioln ratio in the .rar file. The original's (i.e. ones straight from the camera) only get compressed by 1% ish, what i would usually expect. However the "recompressed ones" that i ran through photoshop can be rar'ed up to about half the size they were beforehand. This is the odd part.

    Camera images are uncompressible, Photoshop images are compressible, and by a large amount!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,268 ✭✭✭hostyle


    did you run any cleaning filters on the photos in photoshop? to remove excess noise? would photoshop have done this automagically? i haven't looked at the images so this may not be applicable.

    EDIT:
    Now that I think about this again - the above doesnt make that much sense :) sorry.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,563 Mod ✭✭✭✭Capt'n Midnight


    cregser wrote:
    Yes I just noticed that after I made the post and looked it up. Looks good :) Ah well, too late now, I've been using GIMP for over a year now.
    It's still gimp under the bonnet - they have just tarted up the interface.


Advertisement