REALLY small jpeg... how did they do this!?

Discussion in 'Digital Discussion & Q&A' started by tangoking, Apr 9, 2010.

  1. tangoking

    tangoking TPF Noob!

    Joined:
    Oct 1, 2009
    Messages:
    3
    Likes Received:
    0
    Location:
    New Jersey
    Hi folks,

    How is file size of this image so small? It's 162x162 pixels, RGB, at a resolution of 150 pixels per inch... and a file size of 4.86KB!?

    http://www.miklas.org/images/guy_at_desk.jpg

    How is this so small? If I open it in Photoshop, make NO changes, and simply try to save a copy, the file size it pops up to about 26k on the lowest quality/highest compression level!

    :confused:

    Thoughts?

    tyvm!

    Love,
    ~tangoking
     
  2. KmH

    KmH Helping photographers learn to fish Supporting Member

    Joined:
    Apr 9, 2009
    Messages:
    38,229
    Likes Received:
    5,005
    Location:
    Iowa
    Can others edit my Photos:
    Photos OK to edit
    On the web or a monitor, all that counts is the pixel dimensions 162x162.

    The 150 ppi is meaningless until it's going to be printed, and then this image will be just a tick over 1 inch square.

    If we do the math: 162 x 162 = 26244 pixels, but pixels isn't file size: 4.978 Kb.

    JPEG tosses nearly 80% of the color data on compression (20% of the image data remains).

    Again, we do the math: 26244 x 0.20(20%) = 5248.8 bytes.

    Strip all the metadata (EXIF and whatnot, 270.8 bytes) and voila, you have a final file size of 4978 bytes.
     
  3. Dwig

    Dwig TPF Noob!

    Joined:
    Mar 11, 2009
    Messages:
    1,261
    Likes Received:
    0
    Location:
    Key West FL
    Can others edit my Photos:
    Photos NOT OK to edit
    There's more to digital images than just images...

    When you "save" a JPEG, and most other formats, from Photoshop, or most other image editing programs, there is a block of data recorded in the file in addition to the actual image. This additional data contains information about the file. Some is required by the format and some is additional, optional information like the standardized EXIF data fields and ICM color profiles.

    Doing a conventional "Save..." in PS can add significant additional information. In addition to EXIF data and color profiles, PS stores some PS specific data which can include editing items like guides. This is the reason the file saved from PS is larger, despite the high level of compression you applied to the image data (this compression does nothing to non-image data).

    For the last four or five versions PS has included a separate "Save for Web..." or "Save for Web & Devices ..." option. If you use this function to save your file PS will strip out any unnecessary non-image data. Only the bare minimum of data required by the file format will be included. All camera and editor information, all of the IPTC data, any color profile, and any PS specific data will be omitted from the file. The resulting file sizes can be significantly smaller, particularly with small files where the non-image data can be over half of the data in the file.
     
  4. tangoking

    tangoking TPF Noob!

    Joined:
    Oct 1, 2009
    Messages:
    3
    Likes Received:
    0
    Location:
    New Jersey
    tyvm!

    I wasn't aware that PS adds a bunch of header information. I tried the "Save for Web" option and the filesize was correct.

    I've been hired to create Flash banners, and the requirements call for < 50k file size. There are two JPEGs in the design; at 30k each, I was over the limit before I entered a single line of ActionScript!

    :irked:

    Thanks again.
     

Share This Page