numberzuloo.blogg.se

Automatic image optimization with hazel and imageoptim
Automatic image optimization with hazel and imageoptim





automatic image optimization with hazel and imageoptim

Image run through ImageOptim, reducing size by another 22% And if I deployed the image and discovered it needs a few more colors, I could re-run the process to use 64 colors: the final size, in that case, is 73KB, still enormous savings. That’s a weight savings of about 85%, just by lowering the color depth. My script looks as below and from functional point of view it does exactly what I want: for dir in mydir// do sudo jpegoptim -strip-all -t 'dir'. It took me quite some time to learn rudimentary bash scripting to able to optimize all images in all my first level directories. And that’s just at the export time: once I run them through ImageOptim, the optimized sizes are 359KB and 48KB. I am using imageOptim to optimize images on my server.

automatic image optimization with hazel and imageoptim

Restricted to a palette of 32 colors, it’s 61KB. That PNG at full-color depth is about 379KB. (Again, these aren’t photographs I’m talking about.) In many cases, I’ve cut image weight 80% or more by indexing colors to a palette of 256 or fewer values, with no loss of visual fidelity.

automatic image optimization with hazel and imageoptim

So in Acorn, my image editor of choice, I’ve been taking special care to crank down the bit depth on PNGs in the export dialog. By default, lots of image editing tools save PNGs with 2^24 color depth, just in case.įor a photograph, that makes some sense (though if it’s a photograph, you should probably save it as JPG or WebP) but for things like logos and icons, that’s approximately 2^24 more colors than you’re going to be using. I’d assumed that optimization tools handled things as trivial as color depth optimization that for us, but discovered I was wrong there. Because not everyone has access to broadband, particularly in the mobile space and also, any time we can shave off page rendering is worth pursuing. Now that a huge number of us access the web via broadband, guess what? Every kilobyte still counts. Way back in the day, we used to obsessively choose between 2-, 4-, or 8-bit color depth on our GIFs, because when lots of users were using dialup modems to surf the web, every kilobyte counted. Something I learned (or, I guess, re-learned) this year is how important it is to pay close attention to the bit depth of images.







Automatic image optimization with hazel and imageoptim