Helpful Posts Helpful Posts:  0
Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: "compressed bits/pixel" term in JPEG/EXIF data

  1. #1

    "compressed bits/pixel" term in JPEG/EXIF data

    Am I correct in assuming that the lower the number the better the image -
    where the line of Exif data indicates 'compression bits per pixel'?

    The reason I ask is, with the Fuji S5600 which I have, shooting an image
    at the 2MP setting results in 2.6 bits per pixel; at the 3MP setting this will
    reduce to 2 bits per pixel... and so I'd have assumed that the best possible
    setting for JPGs (5MP Fine) would offer a further reduction in compression.
    Far from it - this setting delivers 4 bits per pixel. Hence my question...

    So, if anyone can shed some light on what appears to be a rather absurd
    anomaly, I would be grateful.

    thanks
    B

  2. #2
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,113
    Real Name
    Dave Humphries :)

    Re: Compression question

    Hi Bunter,

    Firstly, welcome to the CiC forums

    I have to say you've lost me

    For best quality; just shoot with the highest pixel count and the "Fine" setting and don't worry about dividing file sizes by MP (if that's what you are doing) - what good does it do? I'm not sure what you think it is telling you.

    My Fuji S6500 (6MP), when shooting fine jpgs, produced files of about 3MB, the exact size depends on picture content.

    One aspect of jpg working that is significant though, is this:
    Once you work on an image in an image editor and Save As, the jpg quality setting dialog in there usually runs from 1 to 12, where 1 is the lowest quality and 12 the highest. However, it is a fairly commonly held understanding that visible differences between 9 and 12 are very hard to spot, but the file size gets significantly bigger. Most people I know use 9 (like me) or 10.

    Cheers,

  3. #3

    Join Date
    Apr 2009
    Location
    Epsom, uk
    Posts
    186
    Real Name
    Will

    Re: Compression question

    I think (s)he is refering to the bit in the exif that is labeled 'compressed bits/pixel', my guess is that this is just the effective number of bits used to describe each pixel. A raw, uncompressed rbg 8bit image would be 24bits/pixel (8bits per colour channel x 3 colour channels). So it just describes the level of compression in the image, where a lower number is a greater level of compression. However that does not mean it neccecerily have much to do with image quality, and is certainly independant of the # of megapixles in your photo. A photo of something with alot of fine detail (e.g. trees) can take much less compression before significantly reducing the information in the image, so will have a higher bits/pixel value. An image with little fine detail (e.g with alot of sky) does not neccecerily need alot of data to describe the image, so will manage a much lower bit/pixel value. If you believe you are seeing a difference based on image size, i suggest you look at the images and see how much fine detail there is in each of them. To investigate it fully (if you so desired) you should take several images of scenes with different levels of fine detail at the same camera resolutions and compare the bits/pixel, and then take several images of the same scene at different camera resolutions. I suspect you will see large variations in the first case, and very little variation in the second case in the compressed bits/pixel value.

    Of course this is just an educated guess, so i could be talking out of my ass, have a play and let us know.

  4. #4

    Re: Compression question

    Thanks for the responses - although it would seem that something (at least) has been lost in translation.

    I'm quite happy with the camera, and not assuming there is a difference based on image size - only puzzled when I noticed the details of 'compression bits per pixel' data. I'm aware that an image of foliage will result in more data than a sky shot, yet regardless of the subject-matter the 'compression bits per pixel' appears to be dictated (on this camera at least) by the choice of resolution - which leads me to be even more puzzled by this increasing if the best setting is selected; however, Will states that a lower number indicates a greater level of compression - so my original assumption that the lower the number the better the image is wrong, yes?

    This was only ever curiosity on my part, rather than particularly critical... so perhaps I should just forget about it, and concentrate on something simple - like peace in the Middle East? :-)

  5. #5
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,113
    Real Name
    Dave Humphries :)

    Re: Compression question

    Ah yes, there's me going off on a tangent again!

    Stick; wrong end of, sorry

    As to which way round to think of the bits/pixel figures, that's more tricky.
    I haven't turned up anything helpful yet

    Regards,

  6. #6

    Re: Compression question

    That's fine, Dave - I quite often do a pretty good tangent myself! :-)

    Thanks for thinking about this.

    cheers
    B

  7. #7
    Davey's Avatar
    Join Date
    Sep 2008
    Location
    UK
    Posts
    530

    Re: Compression question

    if you're really concerned about the compression then perhaps shooting in raw format (.raf on the s5600) and converting to jpeg in computer is worth considering. Obviously there is the downside of slightly longer save to card time to consider, less available space (but it's around 189 something pics on a 2Gb card if I remember which is plenty for most), and the loss of high speed shooting modes. Up side is you can process the images more without the usual 8bit jpeg processing issues, you get a bit more dynamic range recorded and you can use more complex compression algorithm meaning your jpeg is higher quality and better compressed. Might not be useful but worth considering.

  8. #8

    Join Date
    Oct 2009
    Location
    USA - California
    Posts
    445

    Re: Compression question

    Quote Originally Posted by Bunter View Post
    Am I correct in assuming that the lower the number the better the image -
    where the line of Exif data indicates 'compression bits per pixel'?
    You are correct. That EXIF data isn't really EXIF data - it's from the JPEG headers in the file. It actually represents the compression ratio. So your 2.6 is really a 2.6:1 compression ratio. Higher numbers indicate more compression, lower numbers indicate less compression.

    As to why your compression ratio goes up (more compression) when you shoot in the highest MP setting your camera offers - it is because two pixels side-by-side are very similar. This allows the compression to represent both pixels with a single (or fewer in multi-channel terms) value. You are still going up in quality, but allowing the compression algorithm to work better at the same time.

    For example, open MSPAINT (start->run->"mspaint"->ok -- no quotes), and create a rather large image using random solid color rectangles. Save this image as a BMP (uncompressed). Then save the same image as a PNG. Notice the size of the PNG -- it's a heck of a lot lower than one would think! It's able to do this because it creates regions of the image that it can compress better - even though it retains perfect quality.

    JPEG is a great format for photos, it's compression happens in YCbCr color space (very similar to YUV/LAB). Humans are very sensitive to luminance (black/white), so that 'channel' is compressed the least. On the other hand, humans are not very sensitive to color, so those channels get compressed (and blocky) the most. If you want to send a photo to someone to look at, or even print, JPEG is great. If you are looking to do photo editing - the colors become extremely important and JPEG is the last format you would want to use -- if you still want compression use compressed TIFFs or PNG (both are lossless).

    I hope that explains it for you

    I strongly recommend shooting in RAW if you plan to do post processing with your images (or if your flash card has enough room on it). JPEGs will tolerate slight modifications -- but please save the photoshop file, do not keep reopening the same JPEG making modifications then saving it again, there will be a very noticable loss of quality after only a few saves.

  9. #9

    Re: Compression question

    Many thanks to Davey, and particularly KentDub, for the explanations and advice -
    that's clarified things for me.

    Davey - yes, I did try some RAW files on the Fuji, but when I looked at them... and
    this is pure ignorance of course, for some reason I expected them to appear in a
    'pristine' state (untouched by the camera's software) and was disappointed when
    I saw a less than 'attractive' image - realised later it was (quite literally) RAW! :-))
    However, after the advice etc. I may just summon enough courage to have another
    shot at it... although messing about for ages via the PC has very little appeal, and
    I think that is what is deterring me. (also there is this hangup about the integrity of
    a 'manipulated' image - a fairly treasonable statement on a forum such as this!!)

    As to RAW files etc. - do TIFF files have less info? I understood they were also an
    uncompressed file, and as they are more commonly 'accepted' by image editors etc
    I'd have thought it would be more convenient if camera manufacturers offered this
    as an uncompressed format... clearly, I am missing something here (again!).

    I do find that mostly the JPG results are OK for me, although I have to confess that
    the best size resolution on the camera merely produces larger files with the option
    of cropping the best part - there doesn't 'seem' to be any great improvement...


    Thanks again for the responses.


    cheers
    B

    PS - KentDub, sorry, I initially missed the nice satirical line you dropped in there:
    "On the other hand, humans are not very sensitive to color..." :-))
    Last edited by Bunter; 9th October 2009 at 03:27 PM.

  10. #10

    Join Date
    Oct 2009
    Location
    USA - California
    Posts
    445

    Re: Compression question

    Quote Originally Posted by Bunter View Post
    As to RAW files etc. - do TIFF files have less info? I understood they were also an
    uncompressed file, and as they are more commonly 'accepted' by image editors etc
    I'd have thought it would be more convenient if camera manufacturers offered this
    as an uncompressed format... clearly, I am missing something here (again!).

    I do find that mostly the JPG results are OK for me, although I have to confess that
    the best size resolution on the camera merely produces larger files with the option
    of cropping the best part - there doesn't 'seem' to be any great improvement...
    TIFFs are uncompressed*/lossless, and are a very widely accepted format (thus ideal for archiving). The compression ratio for TIFF files is nowhere near JPEG, as JPEGs intent is to save a perceptually matching image, not the image its self. TIFF files will hold up much better to PP workflows - especially when dealing with colors/saturation.

    The TIFF format also allows for basic imaging features, such as layers and alpha channels. In addition (though probebly less used) it supports several types of pixel format (such as 8bpp, 16bpp, 32bpp, and lots you've never heard of).

    Here's the kicker. TIFFs are lossless -- but they are processed. What does this mean? Your camera pulls the image off of its sensor in a raw format (this data, in it's raw state becomes a RAW file if you chose that format). It then applies some curves, contrast, saturation, white balance, and sharpening (plus any "special" camera features you have turned on). This process happens in the cameras image processor. Once complete, the image is encoded to TIFF (uncompressed) or JPEG (compressed) - (whichever your camera supports and is enabled). There is a tutorial on CiC that explains this better here: http://www.cambridgeincolour.com/tut...ile-format.htm.

    Why would you want to shoot RAW? All of those processing passes the camera does contain many parameters. In the RAW format you have the ability to control all of them rather than letting the camera choose for you (ex. Ever get a yellow-ish or blue-ish image? Your white ballance if off. RAW makes it very easy to fix it)**.

    I have seen some P&S cameras offer a TIFF file format option, though they didn't offer RAW format. I have not seen a camera capable of RAW that allows you to save in TIFF.

    I don't remember off of the top of my head - but I would imagine that RAW files would not be much larger than TIFF files. Disk space is so cheap and abundant these days I find it really hard to justify not shooting in the highest quality mode your camera has to offer.

    So what is TIFF good for? Well lets say you capture an image (either RAW or JPEG) and so some basic post processing (PP) on it (levels, saturation, cropping, etc.). You want to send it to a print shop -- the format you would want to send them is a TIFF. Why? There won't be any (possibly double) compression on the image, and the colors stay intact. Again, keep the TIFF around for archival reasons (there are alternatives too).

    Hope this helps Bunter,

    Kent

    * There is a compression option for TIFF files, however you drop about 50% of application support if you use it
    ** I know you can adjust white balance with a JPEG using a RAW converter, however its at the expensive of massive color fidelity loss

  11. #11

    Re: Compression question

    Kent

    That's really useful - appreciate you taking the time etc. - and er, yes -
    it could be argued that with storage being so cheap why not shoot only at
    the best option? Have just been reading the 'Editing' thread - and I could
    relate to some of the comments there... have a preference for trying/hoping
    to get it as right as possible in camera.

    I do think I have a definite 'film hangover'!! - still catch myself thinking;
    "oh, that's not going to be any good" - then another voice appears:
    "it's on a card, you idiot!" well, something similar... :-))

    Hope it's a pleasant day in California - I'm off to listen to some music ,
    before zzzzzzzzzzzzzzz.

    Thanks again,
    B

  12. #12

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,662
    Real Name
    Have a guess :)

    Re: Compression question

    Quote Originally Posted by KentDub View Post
    I don't remember off of the top of my head - but I would imagine that RAW files would not be much larger than TIFF files.
    RAW files are a lot smaller than uncompressed TIFFs for 2 reasons:

    1. They're compressed (losslessly), and

    2. Each pixel captured is a luminance record of only a single red, green, or blue pixel (ie in the RAW state, it's incomplete colour information) - it's the RAW converter that (amongst many other things) takes a look at the surrounding pixels and determines what the full RGB colour should be (requiring a full 6 bytes per pixel).

    @ Bunter

    Hi Bunter,

    Shooting RAW is great because it gives YOU full control over the process - your not left with an image thats baked to someone elses recipe (a JPEG image from a camera already has a LOT of information thrown away leaving far less scope for further changes to the image).

    Think of it as being a bit like cooking your own meal (a RAW shot) -v- a trip to McDonalds (JPEG). With a trip to McDonalds sometimes the burger tastes great and the fries are crisp and tasty (a "Good JPEG") but on other occasions the fries are soggy & over-salted - the coke has too much ice - and the cheese is 1/2 on the burger & 1/2 on the wrapping (a "bad JPEG"). When YOU do the cooking (a RAW shot) YOU get to salt the fries the way you like them - YOU get to decide how much ice goes into the drink, and YOU place the cheese where ever you want it (and even have two slices if you want).

    The "down side" of RAW is that you have to do these things - but - it doesn't take long to learn how (we can help) and is very rewarding. After all, the camera is just a computer - it knows nothing about composition, your intentions, asthetics etc - why give it total control over how your image comes out? I'd be quite happy if JPEG capability was removed from my camera all together (I NEVER use it).

  13. #13

    Join Date
    Oct 2009
    Location
    USA - California
    Posts
    445

    Re: Compression question

    Now I'm hungry......

  14. #14

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,662
    Real Name
    Have a guess :)

    Re: Compression question

    Quote Originally Posted by KentDub View Post
    Now I'm hungry......
    My daughter is making me breakfast as we speak!

  15. #15

    Re: Compression question

    Hi Colin

    Thanks for your input - although I must say that was an awful analogy...
    you couldn't pay me to enter a McPoo store - I'm a "Nigella" man :-)
    However, just don't ask me to tell you what she does - I'm somewhat
    distracted while she's in view...

    Have always thought that one of the better photo jobs would be working
    on one of her books... well, you couldn't let all that go to waste afterwards,
    could you? (I'm referring to the food...)

    OK - RAW... while I take your point(s) I think it may also be argued that
    there is a considerable amount of experience going into the software etc
    by the people at Canon, Fuji etc - and it is a very competitive market, so
    they need to get it as right as possible when processing those JPGs.

    I accept that this will in no way convince you (& wasn't intended to!) - just
    my humble, flawed opinion. :-)

    One of the problems - as I see it - is once you begin with RAW processing,
    where do you stop... where does it end? Judging by the various threads on
    this forum, the answer to that would seem to be... 'never'!
    Which is fine for those good people with the patience, inclination, expertise
    etc. - and ultimately, the TIME. :-)

    Just to reassure you - no, you haven't put me off! (curiosity will no doubt
    get the better of me...)

    Trust you enjoyed your breakfast? Er - bit rich mentioning that, after your
    glowing recommendation for doing one's own 'cooking' wasn't it?! :-)))


    cheers
    B

  16. #16

    Join Date
    Oct 2009
    Location
    USA - California
    Posts
    445

    Re: Compression question

    Bunter --

    May I make a suggestion? Your camera most likely has a RAW+JPEG option, in which case it will save both formats to your memory card. I havn't found a person who hasn't eventually moved over to RAW. If you store both you can use your JPEGs for now, and when you eventually make the switch you'll have the RAWs for all of your older images

    Keeping with the food analogy: You can have your cake and eat it too!
    Last edited by KentDub; 10th October 2009 at 05:41 PM.

  17. #17

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,662
    Real Name
    Have a guess :)

    Re: Compression question

    Quote Originally Posted by Bunter View Post
    Thanks for your input
    You're welcome

    OK - RAW... while I take your point(s) I think it may also be argued that
    there is a considerable amount of experience going into the software etc
    by the people at Canon, Fuji etc - and it is a very competitive market, so
    they need to get it as right as possible when processing those JPGs.
    For sure, but the problem is, the makers have no way of knowing how you want it to turn out. Classic example would be a scene with back lighting (say someone standing in front of a window); the camera has no way of knowing if you're an experienced shooter who WANTS to show silhouetted person in the foreground (and have what's visable through the window showing), or if you're a novice who really wanted the face of the subject to expose properly. In such a situation the camera has to make a choice - and whatever it chooses your stuck with becuase a JPEG file won't retain enough dynamic range to be able to do much with afterwards, whereas a RAW shot will contain up to about 6 stops more range to dig out the detail if required.

    Basically JPEGs are optimised for small size; they're fine as a final output form when you've finished editing, but absolutely hopeless if you have to make large adjustments, as is often the case with backlit landscape (eg sunrise/sunset shots).

    Also, I've never seems a JPEG shot straight out of the camera that I couldn't improve in post-processing!

  18. #18

    Re: Compression question

    Hi Kent

    Nice idea - but this modest machine doesn't allow that... furthermore one of it's
    idiosyncracies is that RAW is buried away in the menus, eliminating the possibility
    of quickly switching from one format to the other.
    However, having said that, there aren't many cameras at this level which offer RAW...



    Hi Colin

    Don't disagree with anything you say - just that my modest attempts at using the
    camera are most of the pleasure - seeing, thinking & composing.
    And I'm afraid I don't find the prospect (at least at this stage...) of multiple software
    adjustments all that enticing. Especially as almost everything I've ever read about it
    indicates there's a distinct (& endless!) learning curve...

    I know you haven't been doing this for only a few weeks/months but frankly, Colin,
    I'm astonished at the knowledge you, Kent & the others have to offer.
    And very reassuring that you are all so willing to share this too - even with someone
    as vague & ignorant as myself. Appreciate it.


    I'll get around to it one day - then you'll all be sorry! :-)

    cheers
    B

  19. #19

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,662
    Real Name
    Have a guess :)

    Re: Compression question

    Quote Originally Posted by Bunter View Post
    Don't disagree with anything you say - just that my modest attempts at using the camera are most of the pleasure - seeing, thinking & composing. And I'm afraid I don't find the prospect (at least at this stage...) of multiple software adjustments all that enticing. Especially as almost everything I've ever read about it indicates there's a distinct (& endless!) learning curve...
    Unfortunately, post-processing is very much part of the process of getting the final result. It's not so much an issue with day to day "snaps" (although I can still improve most of them), but it really kicks in when shooting difficult scenes.

    I know you haven't been doing this for only a few weeks/months but frankly, Colin, I'm astonished at the knowledge you, Kent & the others have to offer. And very reassuring that you are all so willing to share this too - even with someone as vague & ignorant as myself. Appreciate it.
    No worries - teaching is something I enjoy doing when I'm not shooting or doing other things.

  20. #20
    New Member
    Join Date
    Mar 2017
    Posts
    1

    Re: Compression question

    Is it possible to edit the Compressed bit per pixel?
    I try to use exiftool to add certain details in Compressed bit per pixel, but I don't get the right command to edit it.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •