Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Reduce image file size prior to sending System
Mac OS X devotes a huge amount of disk space to custom icons and previews. It can be as much as 120K per file. This overhead is substantial for for small .jpg files.

This is a big problem if you are storing thousands of .jpg files or if you are just trying to email a .jpg file to someone. Mail.app has a bug in it that makes it send the icon and preview as well as the file. If you're using Mail.app, it's a good idea to delete the resources of .jpg files before sending the file to someone else.

The easiest way to delete icons, previews, and other file resources from a bunch of .jpg files is to install Grim Ripper. Select some files, Control Click and choose Delete Resource Fork.

So you don't believe these numbers? Try this: View Mac OS X Hints with Internet Explorer. Look at the logo at the top of the page. Click and drag the Mac OS X Hints logo to the desktop. The file name should be logo393ss1.jpg. Select the file and pull down File -> Show Info. The file takes up 132 KB. But the real file size is only 12 KB! To see the real file size, open up Terminal.app. Once there type these commands (sorry they're scary Unix commands, but stay with me):
 % cd desktop
% cp logo393ss1.jpg logo.jpg
% exit
Note that the 'cp' command is the normal Unix copy command. It copies the file only, not the Mac OS X icons and other resources. Select the new file on the desktop, logo.jpg. Pull down File -> Show Info. The file size is only 12 KB! Double click the file and it shows up in Preview just fine. That means that the preview and icons take up 120 KB for a 12 KB file!

[Editor's note: For the sake of my bandwidth, how about everyone test this with an image from somewhere else, such as Dell, Gateway, or Intel :-) (or your own hard drive, of course) ... and you won't see this effect in Mozilla; only IE seems to somehow download a 132K image from a 12K image! I'm not sure, but I think this is also something of a glitch in IE; copying a 248K JPEG on my local machine reduced it by 40K, not 120K.]
    •    
  • Currently 1.50 / 5
  You rated: 1 / 5 (4 votes cast)
 
[19,513 views]  

Reduce image file size prior to sending | 11 comments | Create New Account
Click here to return to the 'Reduce image file size prior to sending' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
file size
Authored by: liquid stereo on Oct 30, '02 11:27:34AM

I tried this using Chimera (0.5) and the file sized showed up as 12k using Show Info.
Maybe its a IE thing.



[ Reply to This | # ]
IE trying to be smart
Authored by: pathfinder on Oct 30, '02 12:09:49PM

This is just a bug in IE. IE decides to create a huge icon that takes up too much space, too bad it can't be turned off.
If I remember correctly it did the same thing in classic versions of MacOS.



[ Reply to This | # ]
Omniweb
Authored by: mdzorn on Oct 30, '02 12:11:37PM

Omniweb 4.1 also shows only a 12k file (with 9200 bytes).



[ Reply to This | # ]
IE creates the preview
Authored by: raster on Oct 30, '02 12:41:12PM

I believe IE creates the preview when it downloads the file to disk.

It's IE's way of trying to be 'Mac-like' in how it functions.



[ Reply to This | # ]
What browsers do what?
Authored by: paulio on Oct 30, '02 01:16:45PM
Some browsers make the previews and the icons. They will make the large 132 KB files. Some browsers just make the icons. These are smaller files. Some browsers don't make any resources at all. These browsers will make the small 12KB files.

If you want to create the icons and previews but your browser doesn't make them, you can paste an icon into ShowInfo. You can also install DropIcon. Once you download it, drop the icon into the DropIcon application and it will create all the icons and previews.

[ Reply to This | # ]

One day too late...
Authored by: jbouklas on Oct 30, '02 03:43:00PM

One day too late! This happened to me yesterday (I have 1.2a of Mozilla, by the way). I basically clicked on that damn thing until it expanded (took 5 minutes). The ugly and half-assed solution!

-Jim



[ Reply to This | # ]
Internet Explorer has done this since at least MacOS 9 (IE 4.5)
Authored by: a1291762 on Oct 30, '02 04:58:01PM

I used to use Explorer all the time and it has been doing this for a long time. I always got around it by Using MacZIP to compress the files and Stuffit to expand the archive. MacZIP puts resources in the ZIP file but Stuffit doesn't restore them so it allowed me to remove the resources from lots of files. At least for MacOS 9.

I use Mozilla/Chimera in MacOS X so it's not a problem anymore :)



[ Reply to This | # ]
No bandwidth problem
Authored by: JJ on Oct 30, '02 06:57:26PM

The Editor [wr|n]ote:
>For the sake of my bandwidth, how about everyone test
>this with an image from somewhere else

People reading the above have already downloaded the gif file, so don't worry about the bandwidth...



[ Reply to This | # ]
Stripping forks
Authored by: eno on Oct 30, '02 08:38:31PM
See here (" Strip resource forks from image (and other) files").

[ Reply to This | # ]
It's not just your browser
Authored by: mrmacs on Oct 30, '02 08:52:30PM

I just got done setting up the web site for my wedding which took place last month. During the process of shrinking image files from 1.4Mb to about 20-30K, I noticed the problem of huge file sizes. I would look at a list of .jpg files, and it might show 20K, but when I clicked on it for a preview, it would jump to 120K. I had created the images in GraphicConverter, and had turned off Create Resource Fork. If I used Terminal, and did an ls -l on the directory, they showed the smaller, correct size. When I FTP'ed the files to my ISP, they were also only the small size. Strange behavour, and a nuisance when trying to set up a site with lots of pix, and limited amount of space.
Happily married (for just over a month)
MrMacs



[ Reply to This | # ]
Case-sensitivity
Authored by: owain_vaughan on Oct 31, '02 10:47:16AM

Of course you should cd to 'Desktop', not 'desktop' as the latter will only work on case-insensitive filesystems - a bad practice!!!



[ Reply to This | # ]