|
Icons are overweight. How do I reduce them?
I like to paste custom icons on files, in Finder. I recently updated to OS X Sonoma (14.2.1) from Big Sur, and now custom icons add about 1.5 to 2 MB to the file. That's insane.
I pulled out an older mac that still has High Sierra, and the custom icons there only add 50KB max. Actually, now that I think about it the enormous icons were probably in Big Sur too. I want to be able to add 50KB custom icons using my current mac. How do I do it? I tried to google this, and I found that I can use the cli app iconutil to create a .icns file (29KB, with a more-than-adequate 256x256 png image). But if I use Finder to copy this icon to a new file, the new file grows by 2MB, and if I copy the icon back out, into Preview, it has all these (superfluous) extra resolutions, which is probably why it's 2MB. Thank you in advance |
long ago I would have checked the iconfactory for their handy icon app. but it seems they have moved on to bigger and brighter things.
|
I used to apply custom picture icons. So they'd all render immediately in Finder when you open a pics folder. Today, those old pic files all show low-res icons. And most of the utilities I once used for adding or removing custom icons were lost after Mojave. They all seemed to be 32-bit.
I mostly let Finder generate icons on the fly now, and I could remove old custom icons one-at-a-time in the info dialog. Or I could do batches from Mojave. The problem hasn't annoyed me enough to do either. Yet. If anyone knows of a 64-bit batch utility for generating / removing picture icons, I'd appreciate it. None of my old standbys are being maintained. |
Thanks for the replies. Still pursuing...
In so doing, I also learned you can get a "merged" info window even with few items, with cmd-opt-i. Then while writing this comment, I learned that the File menu options in Finder change as you hold down modifier keys :eek:
|
So I made some progress. Various sites say you can set icons with NSWorkspace in cocoa, and I didn't muster the trust to download and run someone's arbitrary app, I did write my own, and tentatively it works! It runs in Sonoma, and it creates file icons that only add KB not MB to the file size.
Here is my code: Code:
#import <Foundation/Foundation.h> |
But why, I wonder, have the sizes embiggened?
|
Retina displays.
also, our eyesight may not be what it used to be |
It's because the modern icns format contains one 1024x1024 image, two 512x512 images, two 256x256 images, as well as all the 128x128 and smaller image sizes that were available way back in Mac OS X 4K78. The reason there are two of so many of these is because there's two sets of images; one for HiDPI mode and one for standard. So for example, one of the 512x512 images is actually a double-resolution version of the 256x256 for use on Retina displays, whereas the other one is a 512x512 version for standard displays, for anyone insane enough to have their icon size set that high. ;) All those images take up space.
If it makes you feel any better, the maximum size of a Mac resource fork is 16 MiB, so they won't be able to grow the sizes bigger than that (unless, of course, they finally move the custom icons out of the resource fork and into an extended attribute like they honestly probably should have done years ago). |
^this guy icons.
|
All times are GMT -4. The time now is 07:00 AM. |
|
Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.