Save for Web Frustration

Discussion in 'Photoshop Tutorials' started by pixel_a_ted, Feb 2, 2008.

  1. pixel_a_ted

    pixel_a_ted Guest

    I am using PS 7 on a Mac. I have some JPEG images (800 pixel maximum
    dimension) that I need to reduce to a maximum size of 75 KB for
    posting on a web site. So I open an image, display using 2-Up, and use
    the Optimize to File Size feature. To be safe I set the Desired File
    Size to 74 K. (In case it matters, for Start With I have Current
    Settings checked and for Use I have Current Slice checked). So it does
    its thing and decides to use Quality 38. At the bottom of the image on
    the right hand side it says 73.09 K. All well and good until after I
    save it and look in the folder the file is 76 K in size. This is
    confirmed by Get Info.

    Why is the saved file larger than the indicated size in Save for Web
    and larger than I asked it to be? There was room for further
    compression below Quality 38 if it were needed.

    Thanks.
     
    pixel_a_ted, Feb 2, 2008
    #1
    1. Advertisements

  2. pixel_a_ted

    Guest Guest

    I sympathize, and think the web site people should lighten up on that
    requisite. 76 is close enough.

    Here is why. Photoshop's reading of the file size does not, or cannot
    factor in what is called a 'cluster factor' of the hard drive. In lay terms,
    cluster size is the 'chunks' allocated to a file's storage. The larger the
    disc, the larger the cluster size. Every file is given 'n' amount of space,
    rounded UP to the next step (cluster size).

    So your file on a tiny 20mb disk of the old days would be 73k. It gains an
    extra, slop factor on the big drives.

    All you can do is lower the quality further.
     
    Guest, Feb 3, 2008
    #2
    1. Advertisements

  3. pixel_a_ted

    pixel_a_ted Guest

    Thanks. I set Optimize to File Size to 70 KB and that did the trick
    for all the files.

    Another question, please. I would like to create an action to do this.
    If I record an action it stores the operations as an item called
    Export. Within Export, it says Quality 28, which I guess was the
    specific quality needed for the image that I used to create the
    action. It does say With Optimized, but there is no 70 KB listed
    anywhere. I also notice that each time I manually did the steps to
    Save for Web, I had to open the Optimize to File Size window, which by
    default had the 70 KB size loaded, but and hit okay before it
    optimized for 70 KB.

    Thanks again.
     
    pixel_a_ted, Feb 3, 2008
    #3
  4. pixel_a_ted

    Guest Guest

    Unfortunately I do not have PS version 7, so I cannot answer.
     
    Guest, Feb 3, 2008
    #4
  5. There is no need to do that. Even if the file takes a little more space
    on a certain hard disk, that doesn't mean it has really grown in size.
    Look at the size in bytes, not at that 'XXX KB on Disk' in front of it.
    If the file was smaller than 75 KB, it will still be smaller than 75 KB
    when you upload it, even if it takes 76 KB on *your* disk because of
    those blocks.
     
    Johan W. Elzenga, Feb 3, 2008
    #5
  6. pixel_a_ted

    pixel_a_ted Guest

    Thanks for your reply, but how do you look at the size in bytes other
    than to see it's file size in the Finder window or use Get Info which
    appears to give the same size? Also, since I am trying to meet a web
    sites maximum image size requirement, wouldn't that site also see the
    "XXX KB on Disk" size and use that to determine whether to apply
    further compression, which is what I am trying to avoid?
     
    pixel_a_ted, Feb 3, 2008
    #6
  7. If you use 'Get Info', you will see the size on disk and then the true
    file size in bytes. The latter is what counts, not the first. What that
    remote site sees depends on how the upload process works, but usually it
    will see the file as it is sent, so the true size. If not, your file
    will probably be rejected because it is too large, so it's simply a
    matter of trying.
     
    Johan W. Elzenga, Feb 3, 2008
    #7
  8. pixel_a_ted

    tacit Guest

    Correct. To understand what is happening, you must first understand how
    hard disks work.

    When you save a file on a hard disk, the file takes up more space on the
    disk than its size would make you think. Space on a hard disk is
    allocated in chunks. In Mac OS X, the size of a chunk is 4 K.

    If you save a file that is one byte long, it will take up 4 K on disk.
    If you save a file that is two bytes long, it will take up 4 K on disk.
    Space on disk is always allocated in 4 K chunks.

    If you save a file that is 5 K, it will take up 8 K on disk. The size of
    the file is 5 K, but the amount of disk space it needs is 8 K, because
    space on the disk is always allocated in 4 K chunks.

    The JPEG you are saving is 73.9 K. It will work on your Web site. Get
    Info says it is taking up 76 K because space on the disk is always
    allocated in 4 K chunks.

    Use the Get Info command and look more closely at the Get Info window.
    You will see TWO sizes. One size is in bytes and is the true size of the
    file, which will be 73 K. The other size listed is the size it takes on
    disk, which will always be a multiple of 4 K.

    There is nothing wrong. Your file is 73.09 K. You're just getting
    confused because it takes up more space on the disk.
     
    tacit, Feb 3, 2008
    #8
  9. pixel_a_ted

    Guest Guest

    Well, it's a good idea for him to just go ahead and try - to see how much
    space it takes on the host drive, but keep in mind that the trend is to
    larger discs, therefore larger cluster factors. Perhaps the host measures
    the file size as other than size+cluster factor.
     
    Guest, Feb 3, 2008
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.