Xcode 6 asset catalog automatically create images for smaller scales

JonasG picture JonasG · Sep 15, 2014 · Viewed 12.7k times · Source

With the need of 3x images in iOS 8 I figured it would be easier to manage images with an asset catalog in Xcode 6. I am trying to just provide a single image, the 3x scaled image to the asset catalog and I want Xcode to automatically downscale that image to generate 2x and 1x versions of the 3x image, so that I don't have to do it manually.

Right now this is what I have:

I really hope that Xcode has such a feature to automatically create 2x and 1x images and I just have not discovered it yet. If there isn't any such feature, are there any alternatives? (I know IconKit but it is annoying and hasn't been updated to support 3x images. If it was made properly in the first place it wouldn't even need an update..)

I know that Xcode automatically can generate all images from a vector pdf, but thats not what I am looking for!

Answer

JonasG picture JonasG · Nov 4, 2014

I ended up making a small mac app that takes care of the dirty work. You can drag and drop one or multiple .jpg or .png files into the app's main view; it will detect the input image's scale and create the smaller scaled images. With this app I only need to create a single, 3x image and drag it into the app to create the two smaller images. It saves so much work!

The source can be found on my GitHub page, simply download it and run it on your mac! https://github.com/JonasGessner/ImageReducer