![]() Some worked well, and others not-so-well. Later on, I wound up registering a Developer account with Apple so I could use the icon tools in Xcode (well… and for AppleScript Studio, but that’s a different story), and probably tried a half-dozen different freeware or shareware utilities over the years. Back then, I was stuck with 256 (or fewer) colors, a black/white alpha channel, and pretty much had to make them pixel by pixel in ResEdit (uphill… both ways… barefoot… in the snow…). Modulate_icns "Notality.I’ve been making my own Mac icons for folders, applications, and a myriad of other uses for well over 20 years now. # $1 - path to the ICNS to transform # $2 - argument for the ImageMagick `-modulate` flag # function modulate_icns () # Apply an ImageMagick -modulate transformation to every size of an ICNS image. This is a macOS utility which works with ICNS files, allowing you to convert an ICNS file into a folder of images (an “iconset”) and vice versa. I looked at the Pillow implementation of ICNS, and discovered that it shells out to a command-line tool called iconutil. I remembered the Zen of Python – “If the implementation is hard to explain, it’s a bad idea” – and I went back to the drawing board. I started writing about how to work with ICNS files in Pillow, and it got quite complicated for what felt like a simple task. I got it working, but the code’s not especially easy to follow. Pillow supports ICNS files, but it’s a bit awkward – Pillow really wants to work with one image at a time, and the “multiple sizes in one file” model of ICNS is a poor fit. I’ve used it for several projects, and I’ve written blog posts that explain some of that code. When I’m working with images, I often reach for Pillow, the Python imaging library. (Windows does something similar – it uses the ICO format for icons, which also contains multiple images at different sizes.) Playing with Pillow ![]() You can edit ICNS images in Preview.app, but this is a manual process that involves lots of pointing and clicking. ![]() If you want to edit an ICNS file, you need to edit all of these sizes individually. This allows the rocket shape to remain clear, even at a tiny size. Notice how the 32×32 and 16×16 sizes have a different shape, doing away with the text sheets. The big sizes can contain lots of detail, and the smaller sizes can be simplified so they remain clear.įor example, the Notational Velocity icon has six sizes in its ICNS file: When the OS needs to shows an icon at a given size, it picks the closest size from the images in the ICNS file, and scales up or down as appropriate. ![]() Icons are stored in the ICNS file format, which is a container with multiple images at different sizes. It’s hard to draw an image that looks good in all these sizes, so macOS allows designers to include multiple sizes of an icon. In Finder, an icon can range all the way from 16×16 to 512×512 pixels. On macOS, icons can be displayed at a wide variety of sizes. Given the renewed sense of fun in Apple’s icons for macOS 11, I spent a couple of hours trying to find a way to play with icon colours. Adjusting the colour of an image with a single accent colour is something I’ve done before, and it would be more exciting than a monochrome icon. It’s a fork of an older app called Notational Velocity, and the icon is a greyscale version of the original: The icon of nvALT (left) and Notational Velocity (right).įor a while now I’ve wanted to create versions of the Notational Velocity icon in different colours. ![]() One of my key tools is nvALT, a notetaking app for macOS. ![]()
0 Comments
Leave a Reply. |