Author | Thread |
|
06/13/2007 12:32:26 PM · #1 |
Maybe it's a mental block or a lack of common sense (or combination of the two) but the mighty pixel is giving me a brain freeze.
My 8MP camera, image size = 3,456 x 2304 pixels
Each pixel in an image can ONLY contain one color, one shade or hue, being a hexadecimal value in the binary world. The image will contain 7,962,624 pixels. When I shoot in jpeg highest resolution, the image dimensions don't change, is recorded in 8-bit, and average somewhere in the 3MB file size. When I shoot in RAW, the same number of pixels again, this time in 16-bit, each pixel being only capable of one color, one shade, one hexadecimal value, but now jumps to nearly 8MB per image. When I convert from RAW to jpeg, the file size jumps nearly 2MB from when I shoot in jpeg mode to begin with, but still, each pixel can only report a hexadecimal value. The mighty pixel can't have a changing shade or gradient or detail, it's still one block, one color.
This leaves compression.
An image is compressed and takes up less space. But each pixel still contains only one hexadecimal value. Where do all the extra MB come from? The binary code added on to assemble it with exacting info from each neighboring pixel in the case of no compression or 16/24/32/48 bit colors versus averaging a lot of it together in the case of compressing it maybe?
A pixel is still a pixel after all.
(scratches head still)
|
|
|
06/13/2007 12:35:11 PM · #2 |
|
|
06/13/2007 12:37:18 PM · #3 |
When you go from 8-bit to 16-bit you increase the number of possible colors -- and therefore the number of digits (hexidecimal or otherwise) needed to express it. It takes three bytes of data to represent each pixel in 7-bit (one for each RGB value) and six for a 16-bit pixel. |
|
|
06/13/2007 12:39:41 PM · #4 |
It makes perfect sense to me, now i fi could explain it in any kind of terms lmao.
But for one when colors are defined by 8 bits 10110110 they take up 1 byte per definition. When defined by 16 bits its 2 bytes per color. There for up to double the space.
8 million Pixels X 1 Byte per pixel (8bit) = 8mb uncompressed
8 Million Pixels x 2 bytes per pixel (16 bit) = 16mb uncompressed.
Message edited by author 2007-06-13 12:43:35. |
|
|
06/13/2007 12:40:58 PM · #5 |
I think what you are asking is: Why is the JPEG-from-RAW bigger than the JPEG-from-camera, right?
I've noticed the same thing and my theory is two-fold, that 1) the in-camera compression is higher than the level of compression you are performing in the raw converting, and 2) that you are possibly applying a higher amount of sharpening to the image in the raw conversion step than what the camera did.
|
|
|
06/13/2007 12:43:58 PM · #6 |
You may want to consider that you have 3 channels, each having the same amount of data in your raw image. you will get the exact number of pixel if save from raw uncompressed. |
|
|
06/13/2007 01:19:32 PM · #7 |
Originally posted by fotomann_forever: OUCH, my brain :-/ |
Yeah....stop doing that Brad.
|
|
|
06/13/2007 01:25:09 PM · #8 |
I thought that RAW was actually 12 bit. where did I read that? Am I on crack again? |
|
|
06/13/2007 01:27:29 PM · #9 |
Originally posted by wavelength: I thought that RAW was actually 12 bit. where did I read that? Am I on crack again? |
It's supposedly recorded in 12bit (or so I've read), but the file is 16bit. It's just not using the extra space. |
|
|
06/13/2007 01:31:33 PM · #10 |
The difference is as people mentioned - compression.
An 8MP JPEG where every pixel is a different color would be 8MP. An 8MP image where every pixel is the same color could be no more than a few KB. When you convert from raw you're applying different color manipulation, sharpening, and compression levels. This causes several things to occur:
Even if the files were identical, pixel-wise, different compression would change the filesize.
Changing the colors and sharpening and other settings which effect the pixels creates more unique pixel blocks which are harder to compress. This means that even if you used the same compression level, the file would end up larger.
When you merge the two of those, you get a significantly larger image. |
|
|
06/13/2007 03:10:46 PM · #11 |
Ya, ouch. I think I've recovered from that enough to type. And I thought I was geeky.
Shut up and just shoot (F8 and be there). |
|
|
06/13/2007 03:27:55 PM · #12 |
funny about the little pixel.
Even with sharpening, which is none other than enhancing contrast between a light and a dark pixel, when it's all said & done, that darned itty bitty pixel is still but one color or hex value.
Looking through Sunday's RAW files, one highly-detailed image clocked in over 10MB, and another that had little detail (lots of blue sky) was only 6.6MB, and but both have 7,962,624 of those little tiny square thingies in them. (I counted them)
;)
|
|
|
06/13/2007 03:33:17 PM · #13 |
my raw files are always 13 megs... if its all black, all white, or a image, its 13 megs... |
|
|
06/13/2007 03:34:28 PM · #14 |
I think Canon RAW files are compressed losslessly.
And thanks Brad for breaking my brain :-/
Message edited by author 2007-06-13 15:34:53.
|
|
|
06/13/2007 03:50:14 PM · #15 |
...computer geek by heritage and profession. The amount of computer minutia I contain is staggering. Just think what I could do if any of it were useful... |
|
|
06/13/2007 03:55:04 PM · #16 |
Originally posted by fotomann_forever: I think Canon RAW files are compressed losslessly. |
Yeah, that's one of the biggest points about RAW. It's lossless, as opposed to JPEG, which is lossy.
For those who might not know:
Lossy = compression or format which will actually lower the quality of something in order to preserve space. JPEG is lossy, MP3 is lossy, etc. Primarily used for situations where the loss of some data doesn't completely ruin a format. In images and audio you can lose a significant amount of data, which will reduce the quality, but still leave the end result understandable.
Lossless = A compression or format where no quality or data is lost, ever. ZIP, RAR, etc. are not lossy, because the entirety of the data is critical. |
|
|
06/13/2007 11:19:12 PM · #17 |
I thought RAW was one color per pixel (except for Foveon sensors?) but JPG had three colors per pixel, at 8 bits per color.
RAW files sometimes also include a JPG.
There are many levels of JPG compression, your camera may support two quality levels of compression(normal and find) and photoshop lets you dial in a number (I think by 1% steps).
Compression is easy on smooth areas that don't change color or tone. A solid white image (or black or blue or ...) will probably give the maximum compression. The more detail in the picture, the more information you need to describe it.
So if you have a noisy picture and save it at 100% quality, and then run neatimage or noiseninja and again save it at 100% quality, the denoised image will have a smaller JPG file.
Message edited by author 2007-06-13 23:23:36. |
|
|
06/13/2007 11:21:42 PM · #18 |
1 pixel = 1 dot
how big a size for each pixel is a different story. |
|
|
06/13/2007 11:37:11 PM · #19 |
Isn't what the computer/camera stores in any image file the information about how to put together pixels on a screen or printer or whatever, not the pixels themselves? The header has info on what type of file it is and how many pixels need to be represented, and then sequentially defines each pixel. More bits means a finer level of definition (e.g., the possibility of more colors). I think ... |
|
|
06/13/2007 11:39:14 PM · #20 |
Originally posted by MaryO: Isn't what the computer/camera stores in any image file the information about how to put together pixels on a screen or printer or whatever, not the pixels themselves? The header has info on what type of file it is and how many pixels need to be represented, and then sequentially defines each pixel. More bits means a finer level of definition (e.g., the possibility of more colors). I think ... |
But a Pixel defined by 8 bit color has 8 bits (8 0's and 1's equaling a mathematic number)
a Pixel defined by 16 bit color has 16 bits (16 0's and 1's equaling a mathematic number)
1011011011010011 takes up twice as much space as 10110110
1 single 16 bit pixel versus an 8 bit defined one. |
|
|
06/13/2007 11:40:53 PM · #21 |
You can read the file format spec's at jpeg.org. |
|
|
06/13/2007 11:43:27 PM · #22 |
Originally posted by RainMotorsports: Originally posted by MaryO: Isn't what the computer/camera stores in any image file the information about how to put together pixels on a screen or printer or whatever, not the pixels themselves? The header has info on what type of file it is and how many pixels need to be represented, and then sequentially defines each pixel. More bits means a finer level of definition (e.g., the possibility of more colors). I think ... |
But a Pixel defined by 8 bit color has 8 bits (8 0's and 1's equaling a mathematic number)
a Pixel defined by 16 bit color has 16 bits (16 0's and 1's equaling a mathematic number)
1011011011010011 takes up twice as much space as 10110110
1 single 16 bit pixel versus an 8 bit defined one. |
Yes, I get that. But it's the *definition* of the pixel that's taking up filespace, not the pixel itself. |
|
|
06/13/2007 11:46:48 PM · #23 |
Originally posted by MaryO: Yes, I get that. But it's the *definition* of the pixel that's taking up filespace, not the pixel itself. |
Right, the more 0's and 1's a pixel records, the more accurate the color will be rendered. Similar to the fact that 1.34857348573948573948573948 is much more accurate than 1.35. Downside to both examples is that they take up more memory with the additional data.
|
|
|
06/13/2007 11:47:28 PM · #24 |
Originally posted by dwterry: I think what you are asking is: Why is the JPEG-from-RAW bigger than the JPEG-from-camera, right?
I've noticed the same thing and my theory is two-fold, that 1) the in-camera compression is higher than the level of compression you are performing in the raw converting, and 2) that you are possibly applying a higher amount of sharpening to the image in the raw conversion step than what the camera did. |
Terry is correct. JPEG is a compression scheme that takes into account more than single pixels.
You could read about it, but I'll try to paraphrase based on my understanding:
I believe it takes 8x8 or 16x16 blocks of pixels and applies functions of increasing complexity as you turn the compression level up. JPEG file format does not store pixels, it stores the numbers necessary to retrieve those functions, and the image software reconstructs the image from those functions.
That's why there's a compression slider: you can make it as small as you want (few simplistic functions, can't well describe the image, bad looking image) or as big as you want (lots more complex functions, image is reconstructed *almost* perfectly - lossy) to reconstruct the image.
That's also why a sharpened image gets larger - it's more complex and harder to describe using the functions.
You can't simply compare pixels (bits, bytes or otherwise) to JPEG filesize (terms of functions). It's apples and oranges!
Did that make any sense? =)
Message edited by author 2007-06-13 23:50:55. |
|
|
06/13/2007 11:47:46 PM · #25 |
Originally posted by MaryO: Originally posted by RainMotorsports: Originally posted by MaryO: Isn't what the computer/camera stores in any image file the information about how to put together pixels on a screen or printer or whatever, not the pixels themselves? The header has info on what type of file it is and how many pixels need to be represented, and then sequentially defines each pixel. More bits means a finer level of definition (e.g., the possibility of more colors). I think ... |
But a Pixel defined by 8 bit color has 8 bits (8 0's and 1's equaling a mathematic number)
a Pixel defined by 16 bit color has 16 bits (16 0's and 1's equaling a mathematic number)
1011011011010011 takes up twice as much space as 10110110
1 single 16 bit pixel versus an 8 bit defined one. |
Yes, I get that. But it's the *definition* of the pixel that's taking up filespace, not the pixel itself. |
As an example a 4 bit pixel say 0110 = the number would equal 3. SO whatever the 3rd shade of that particular color is.
However a RGB pixel is gonna be defined by 3 sets of numbers. So you might have 16 red 8 blue 4 green and that equals a particular color. SO it actuall goes deeper.
Down to the Magnetic level of a file there are high and low charges what we represent as 0's and 1's.
ALL FILES are like this there is no sound there is no color to anything. 8 bit sound versus 16 bit sound is the same deal.
Message edited by author 2007-06-13 23:48:22. |
|
Home -
Challenges -
Community -
League -
Photos -
Cameras -
Lenses -
Learn -
Help -
Terms of Use -
Privacy -
Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 08/29/2025 05:22:00 PM EDT.