Options

Questin that I don't understand and need help!

HackboneHackbone Registered Users Posts: 4,027 Major grins
edited January 8, 2012 in People
A question in Bryce's thread with the 30x40 box started me thinking about an old question I've had for years but never understood. If anyone can help thanks in advance.

If I take a photo with a 21 meg camera and then work the file up in photoshop say 16x20 @ 300 dpi, why is the file only 1 to 2 meg?

Why even is there a difference in file size between high key and then low key after working up in photoshop?

Comments

  • Options
    DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited January 7, 2012
    The camera is 21 megapixels and the file is 2 megabytes. Apples and oranges, right?

    Or is that not your question?
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • Options
    Bryce WilsonBryce Wilson Registered Users Posts: 1,586 Major grins
    edited January 7, 2012
    Hackbone wrote: »
    A question in Bryce's thread with the 30x40 box started me thinking about an old question I've had for years but never understood. If anyone can help thanks in advance.

    If I take a photo with a 21 meg camera and then work the file up in photoshop say 16x20 @ 300 dpi, why is the file only 1 to 2 meg?

    Why even is there a difference in file size between high key and then low key after working up in photoshop?

    All you ever wanted to know and more....

    http://www.techsoup.org/learningcenter/software/page6045.cfm
  • Options
    HackboneHackbone Registered Users Posts: 4,027 Major grins
    edited January 7, 2012
    OK, so I had a blond moment for several years]!!
    I actually stopped reading at mega and never read the rest. Honestly I never read bytes and pixels.
  • Options
    NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited January 7, 2012
    Hackbone wrote: »
    A question in Bryce's thread with the 30x40 box started me thinking about an old question I've had for years but never understood. If anyone can help thanks in advance.

    If I take a photo with a 21 meg camera and then work the file up in photoshop say 16x20 @ 300 dpi, why is the file only 1 to 2 meg?

    Why even is there a difference in file size between high key and then low key after working up in photoshop?

    Charles,
    the file size of JPEG files are primarily based (apart form the image size) on how much noise there is in.
    It's highly likely that your low key images are "noisier" than your high keys.
    Typically in HK images you simply blowout a lot of BG, making large areas an even FFFFFF, and then JPEG compression algorithm chews all those areas down to mere bytes.
    In low-key scenario it also a common practice to NOT wipe out everything to a pure black. Thus you have most of you BG "fibrillating" with some fairly low, but *different* values, one pixel being 010201, another 010301, third 020201, etc. From a compression standpoint, those values are different and as such the whole image does not compress as good as the one with the large areas of the same values.

    Hope it makes sense.
    "May the f/stop be with you!"
  • Options
    HackboneHackbone Registered Users Posts: 4,027 Major grins
    edited January 7, 2012
    Nikolai, thanks for the info as it does make sense to me. Since day one of digital I've never educated myself on the how and why of the actual digital file. I'm an ADD child to some extent and my attention span is very short. I've always had to work hard to keep on one task. Not being an engineer or computer geek but a band geek and only having to count to 4 did not help either. I've cursed the day Brubeck came out with "Take Five" and the rest of the group that followed him!!!!!
  • Options
    D3SshooterD3Sshooter Registered Users Posts: 1,187 Major grins
    edited January 8, 2012
    Ok most has been stated already, however I will give it a try.

    I think that the confusion here is the pixel size in pixels versus the file size in bytes.

    First a 21Mpx RAW file from a camera will not be necessarily 21MByte. For every pixel the appropriate color information is required. Hence a single pixel can have up-to 14 bits per base color. How exactly the RAW format is worked out is in most cases proprietary information and hard to find.
    But what we need to remember is that Pixel seize is not the same as file size.

    I assume that the 21M file is a RAW file with 21Mpx , I can not tell how many MBytes that would be.
    But you can check it on your PC (RAW file seize)

    Once imported in CS the file will be converted to either a RGB, LAB, PROFHOTO or YMCK color profile depending on how you have set-up the preferences. If you used the S-RGB or A-RGB colorspace then each original RAW pixel value will be converted to 3 times 8 bits (typical). In binary that is for Red=00000000 to 11111111, Green=00000000 to 11111111 and Blue=00000000 to 11111111 . What the exact values are depend on the actual color of that pixel. The value for the pixel is mostly written in hex or decimal such as 0-254,0-254,0-254 or 00-FF,00-FF,00-FF. The pixel value can be between 0 to 254.

    Although the typical operating mode is 8 bits ( 8bits per channel (Red or Green or Blue)). You can change it to 16 bits per channel. Note that this doubles the file seize in bytes but not the pixel count !

    Changing the picture format (size) to a 16x20 @ 300 DPI happens as follows:

    16*300=4800 pixels and 20*300=6000 pixels. CS enlarges the picture through interpolation of the target pixel by creating a pseudo pixel around the original pixel that leans towards it neighbor pixel. So the picture pixel size is now 28M pixels.

    Once you export the file as a JPEG or any other format, the color values of each pixel are passed through an algorithm. The algorithm will look for sequences and patterns that are receptive while consecutive zero and ones do not need to be repeated. Anyhow, some sort of summarization and compression is been performed to reduce the file size in bytes (pixels remain the same). Note that some of the compression ratio's can be very high leading to small file sizes(bytes) but also loss of quality.

    Based on the above, and for the same pixel size picture we can say that:

    - A gray or B&W picture will have a smaller file (bytes) size .
    - A color picture with a fully spread histogram will have a much larger file (bytes) size.
    - A HK or LK picture will have a smaller file (bytes) size.

    In other words, the content and color richness of the picture will determine the file size (bytes) and not the pixel size. Secondly, the algorithm and compression depth will further reduce the final file size (bytes).

    I hope that this helped a bit....ne_nau.gif
    A photographer without a style, is like a pub without beer
  • Options
    HackboneHackbone Registered Users Posts: 4,027 Major grins
    edited January 8, 2012
    Thanks all, much there to digest.
Sign In or Register to comment.