OSX stores GIF/JPG 10 times bigger than Win98 does?

Discussion in 'Mac Apps and Mac App Store' started by SittingBull, Apr 10, 2005.

  1. SittingBull macrumors newbie

    Joined:
    Apr 10, 2005
    Location:
    Europe
    #1
    Hi all,

    I'm relatively new to Mac OSX (I love it) -- coming from Win98. (I've never worked on a version higher than Win98; so, what I'm telling now may refer to Win XP as well).

    As far as I can see, the 64-bit file system in Mac OSX splits files in 8 kB harddisk sectors (while Windows 32-bit, for example, uses 1 kB sectors for that matter). Am I right?

    I'm doing web design in Photoshop CS (and ImageReady CS). Obviously, small JPG and GIF file sizes are essential for me. On Mac OSX and Photoshop I seem to be unable to save JPGs and GIFs at the file size Photoshop predicts as shown in its "save as" preview. E.g. a GIF with a solid one colour area is not really as indicated 4 kB in size when stored, but 40 kB! The same happens to JPGs. The "save as" preview says 10 kB, whereas Finder says, when stored, 100 kB! This is unacceptable for web design.

    Well, as I said, I've noticed that file sizes are rounded up to the next 8 kB sector. But I don't understand why this should make the file size approx. 10 times bigger. And why can Mac OSX -- vice versa -- read the file sizes of Win98 generated GIFs and JPGs correctly? For a GIF 4 kB in size Finder and Photoshop correctly indicates 4 kB. But loading and saving this file turns it into an (approx.) 40 kB file. Why?

    I don't store colour profiles, colour proofs, layers or any other additional data in the files. They are as raw as they get.

    GraphicConverter (included in Mac OSX) can't make them smaller either.

    Photoshop has (with the integrated ImageReady software) a wonderful professional tool for web designers. But for generating the final file sizes I have to go back to Win98 (horror), then return to the Mac for the upload. This is ridiculous. I hope I'm doing something wrong. What's the trick? I have checked all Mac OSX and Photoshop documents, manuals, help archives. No info found on this topic.

    Any help is greatly appreciated. Thank you!

    Cheers.
     
  2. stoid macrumors 601

    stoid

    Joined:
    Feb 17, 2002
    Location:
    So long, and thanks for all the fish!
    #2
    Depending on how you are saving the file, Photoshop may be generating a custom icon for it based on a thumbnail of the image. The icon is stored in the file and may be 32 kB or something. Also double check that you are using the exact same settings on each system.

    I don't think that the bitness (32/64) has anything to do with block size, but rather it is just the file system configuration. And AFAIK Mac OS X's HFS+ implementation uses 4 kB blocks.
     
  3. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #3
    I don't know the cause of your problem, but it is not the MacOS X file system. MacOS X uses HFS+, which is perfectly capable of storing 4 KB files. Currently, I have numerous 4 KB JPEG files on my system. Without knowing anything at all about your system, I can't say why you don't have the same.
     
  4. CanadaRAM macrumors G5

    CanadaRAM

    Joined:
    Oct 11, 2004
    Location:
    On the Left Coast - Victoria BC Canada
    #4
    The sector size depends on the formatting method and the size of the hard disk. You are probably comparing a Mac 160 or 250 Gb hard drive to a Windows 98 6 GB hard drive with a 1 Gb sector size.

    The size that the Finder reports them as occupying on the hard drive is immaterial. The real question is: What size are they when you upload them to the Web server?

    The other thing you can do is to choose the file in the Finder and do a Get Info (Command-I) I just did on one of my Photoshop JPGs, it reports 4 Kb on disk, (772 bytes)

    If your byte sizes are persistently inflated, you will need to look harder at your Photoshop settings -- it's not a "Mac" thing.
     
  5. unfaded macrumors 6502

    Joined:
    Dec 12, 2002
    Location:
    Seattle, WA
    #5
    You're sure you're not saving thumbnails?

    Saving the picture with thumbnail greatly increases the size, as the resource fork of the file (resource forks are not found in windows, as a side note) can get quite large and would disappear when sent to a Windows machine.

    Either way, happens to me as well. I think it's data in the resource fork. When I upload to a server the files get much smaller.
     
  6. aplasticspork macrumors regular

    Joined:
    May 27, 2004
    Location:
    Seattle Wa.
    #6
    i ha d a problem like that in graphicconverter yesterday, an image that it said would be 6 kb turned out to be 56 kb, you can fix the problem by going to preferences->save->general, and uncheck the box that says add resource fork. hope that helps. :)

    --andrzej
     
  7. Lacero macrumors 604

    Lacero

    Joined:
    Jan 20, 2005
  8. SittingBull thread starter macrumors newbie

    Joined:
    Apr 10, 2005
    Location:
    Europe
    #8
    Wow, thanks all, for your quick replies!

    Sorry, forgot to mention: Yes, this "save with thumbnail"-thingy is off and confirmed off by comparing before/after -- and by checking that really no thumbnail is displayed. Still 10 times too big.
     
  9. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #9
    No, you're way off and other posts are just increasing the disinformation.

    HFS+ uses 32 bit allocation mapping, and although block size is allowed to vary I'm pretty sure that it has been fixed in MacOS for a long time at 4K. On my mac the block size is 4K and I'm running the latest revision of Panther.

    More importantly, the block size is fixed in HFS+ so that it doesn't matter how large your hard drive is...all reasonable drives today will still use 4K blocks.

    When you get info, the size attribute will have 2 sizes listed, the second one in parentheses. This is the actual size of the file, not how much disk space it uses. Is this value too high?

    GIF and JPG compression algorithms are just as good in Mac software as they are in Windows software, and each file system stores the same exact data for an image. If the file sizes are off then you're either changing settings between the two platforms or adding something to the mac files. Did you try uploading them and seeing if the file sizes drop? Your FTP server probably uses either NTFS or UFS, neither of which would recognize data in a resource fork.
     
  10. SittingBull thread starter macrumors newbie

    Joined:
    Apr 10, 2005
    Location:
    Europe
    #10
    (This forum is really fast! Faster than I can type! Great! :))

    Ok, I just learned something new:

    I just copied an apparantly 24 kB GIF (saved with Photoshop) to my Win98 laptop (via USB card reader plugged in/out/in...). Now, in Win98 I see that infamous "invisible" stuff: A thumbnail(?) file with a leading "._" (17 kB) and the original file (1 kB) -- (not to forget that mac-invisible ".DS_Store" file on this SmartMedia card).

    You're right, guys.

    (By the way, the "resources" option in GraphicConverter is switched to WWW-ready.)

    Two problems remain:

    1. How can I get *reasonable* info? Finder's "Get Info" window neither informs me about the fact that the file is actually a two-file package, nor does it inform me about the real file size of the "main file". Whatever I do, it says 24 kB instead of 2 kB. I found no tool in Panther nor in Photoshop which would show me the actual file size. But I need this detailed info to calculate my web resources, of course.

    2. Option "save with thumbnails" is off in Photoshop, but it still stores one additional file with each GIF. Perhaps this additional file isn't a thumbnail? The file symbol is displaying a GIF icon only, rather than a thumbnail. I'm really confused now. Heck, I have switched from Win98 to Mac in order to see what my computer does, and not to wonder what it can hide. Well, this is probably my user error and a matter of Photoshop.

    By the way, do I really need an add-on to show "invisible" files in Panther? A few minutes ago I read about something called "TinkerTool". If I don't have this add-on, and, say, if I rename a file accidently to a name with a leading period, then there would be no chance to make this file visible again (unless one is computer literate and has coincidentally read something about a "TinkerTool" add-on)? Also, I've been wondering for a while where I can find stuff like that famous "/private" folder and those "/etc" subfolders in order to make cron mods etc. Obviously they all have a leading period. Actually I expected to have a simple preferences option called "show/hide invisibles" directly in Panther's Finder.

    Thank you for your help! :)
     
  11. whocares macrumors 65816

    whocares

    Joined:
    Oct 9, 2002
    Location:
    :noitаɔo˩
    #11
    This has been asked before but,

    Are you using the "Save for Web" option in the File menu? This saves the files without any thumbnails or ressource forks, and create files on average 30k smaller.




    Concerning invisible files:

    If you're not allergic to Terminal.app (the command line interface) you can view the content off a folder with the "ls" command. To get invisible files, append the '-a' (all) option:

    Code:
    ls -a
    To get the file sizes append '-sk' (for size, kilobytes):

    Code:
    ls -ask

    (these command are for the current folder ;) )
     
  12. SittingBull thread starter macrumors newbie

    Joined:
    Apr 10, 2005
    Location:
    Europe
    #12
    Savar, thanks. Ok, 4 Kb blocks, not 8 kB. Obviously that 8 kB increase I saw was pure coincidence and got something to do with those additional hidden files (while I at that time thought it was just one file).

    The actual size indicated in parentheses is nearly the same as the harddisk relevant size indicated on the right hand side. I understand this principle. So, no problem in this area. The problem now is how I can get rid of those additional hidden files. The respective "save with thumbnail" options etc. are all switched off already. What else could I switch off?

    I would be happy if I could at least SEE those invisible files. Should I download TinkerTool or something? Is it free?
     
  13. SittingBull thread starter macrumors newbie

    Joined:
    Apr 10, 2005
    Location:
    Europe
    #13
    Oh my goodness!

    "Save for web"! I missed that one completely! Sorry! :)

    Now, "Get Info" correctly says 4 kB -- and in parantheses 156 Byte! Bingo.

    Also, thank you for the command line tips! Cheers.
     
  14. whocares macrumors 65816

    whocares

    Joined:
    Oct 9, 2002
    Location:
    :noitаɔo˩
    #14
    Happy we could all help :)


    One last tip: if you need information about a terminal command, look at it's manual pages. For example for ls (list):

    Code:
    man ls

    (a few usefull commands: cd (change directory), pwd (show current folder hierarchy), cp (copy), mv (move/rename), rm (remove = delete))
     
  15. SittingBull thread starter macrumors newbie

    Joined:
    Apr 10, 2005
    Location:
    Europe
    #15
    More news ...

    There were actually three things involved in my problems (which are solved now):
    a) Photoshop in fact did not save a hidden file, but really just one file.
    b) That huge file size did not come from a hidden file, but partially from what Photoshop embedded when not using the "save for web" feature.
    c) The card reader/writer, too, added some bytes.

    I just made two GIF files of the same pixel and palette size: green.gif and red.gif:

    ----------------------------------------------------------

    Photoshop "save as" (not "for web") green.gif on harddisk -- Result:

    Terminal ls -a (and Get Info) shows one file (not two):

    green.gif -- 20 kB (16486 B)

    ----------------------------------------------------------

    Photoshop "Save for web" as red.gif on harddisk -- Result:

    Terminal ls -a (and Get Info) shows one file (not two):

    red.gif -- 4 kB (156 B)

    ----------------------------------------------------------

    Ok, where do those hidden files come from if not from Photoshop? It's the USB card reader/writer.

    Copy green.gif from harddisk to USB card.
    Copy red.gif from harddisk to USB card.

    Terminal ls -ask shows four files on USB card (still only two on harddisk):

    green.gif -- 16 KB
    ._green.gif -- 32 KB
    red.gif -- 16 KB
    ._red.gif -- 16 KB

    (The fact that only ._green.gif is 32 KB in size is not a typo.)

    The little sucker sits only in that card reader/writer. Naughty, naughty.

    Cheers.
     

Share This Page