

You will be prompted to select the 1024x1024 PNG source image.Launch the workflow in Automator and Run it.I have set up this Automator workflow to create all icon images. Well, yes, but it gets better: Use Automator ! But can't this be automated with AppleScript? Starting off with a 1024 x 1024 pixels source image (in PNG format), one would have to scale it multiple times in an image editing tool, to export it into all the sizes.
#IMAGEALPHA OSX HOW TO#
The trouble is, how to create the icons, again, and again. If your icons are more complex, adjust the $colour variable as needed.įor iOS development, it is necessary to provide a set of app icons of different sizes, all the way from a high-resolution icon for the AppStore to a tiny icon that will be used in Spotlight search results. Once installed in /Applications, the script will pick it up.įor my simple icons, I can get away with just 256 colours. work/export/AppIcon.pngįinally, I can recommend the use of ImageAlpha, which will optimize your images and reduce the colours. It creates the scaled images in the same directory: $ resizeAppIcons. The script requires a 1024 x 1024 pixel PNG image as input. line to use the image sizes that you need.
#IMAGEALPHA OSX FREE#
$pngquant -f $colours -o "$outfile" "$outfile"įeel free to adjust the for width in. # Use exec in ImageAlpha to reduce colours and size. Sips -Z $width "$img" -out "$outfile" $gt /dev/null Size=( $(sips -g pixelWidth -g pixelHeight "$img" | grep -o '*$') ) # Get the current image size: ( width height ) Pngquant=/Applications/ImageAlpha.app/Contents/MacOS/pngquantĪrgs=$(getopt h: *) # do not use to work with 'set' below.Įcho "USAGE: $(basename $0) "Įcho "Warning: ImageAlpha.app is not installed" in a directory listed in your $path variable): #!/bin/sh With some tips from this post, I have now set up the following script, saved in a file like ~/bin/resizeAppIcons, (i.e. Its functionality can also be used through the "Image Events" AppleScript suite. This tool is used to query or modify raster image files and ColorSync ICC profiles. Sips - scriptable image processing system. You can check if it is installed on your machine using: $ which sips I don't know how long it has been there, but it turns out macOS contains a command-line utility to convert images: sips (scriptable image processing system).
#IMAGEALPHA OSX MANUAL#
The preview image can be removed, but it adds another manual hack that is required.īecause of these shortfalls, I became increasingly reluctant to use it and found myself resizing images manually again. When saved, the workflow document contains a preview image which blows up the file to about 1 GB.

The workflow document is not easily edited, at least not on a slow machine like mine While that has worked well, it had potential for improvement: So I can get the sense of what the dithering and the color compression's going to look like.In a previous post, I described an Automator workflow to rescale iOS app icons. I want to see the actual pixels inside of this image here. I'm also going to turn off smooth scaling. I'm going to start by bringing this up to four times. In the lower right corner, we have a magnification, so you can look at this at different sizes. going to make the window size larger here. Now, once the application opens, you have this preview area here, where you can click on your logo and move it around. And simply drag and drop it right on top of the image alpha application. Now what we're going to do is come over to our exercise files, inside of the PNG-24 file folder, let's grab logo.png. Now after I downloaded the application, I just put it on the desktop right over here. Which is one of the graphical user interface applications for the Macintosh. In this video I'm going to demonstrate a free application available on the website, called ImageAlpha.
