photoshop script for producing logo files for adobe AIR apps

While knocking up a simple little adobe AIR application I saw that there are many available icon sizes that can be used. Being a lazy programmer I thought I’d script this up rather than wading through photoshop. It’s pretty easily customizable if you want to change the sizes

This code goes in a .jsx file and run on the currently open document in photshop by going to: File -> Scripts -> Browse

var curDoc = app.activeDocument;

saveAsIconSize(512);
saveAsIconSize(128);
saveAsIconSize(72);
saveAsIconSize(57);
saveAsIconSize(48);
saveAsIconSize(36);
saveAsIconSize(32);
saveAsIconSize(29);
saveAsIconSize(16);

function saveAsIconSize(size) {
    
    curDoc.resizeImage(UnitValue(size,"px"), UnitValue(size,"px"), null, ResampleMethod.BILINEAR);
    
    // our web export options
    var options = new ExportOptionsSaveForWeb();
    options.quality = 100;
    options.format = SaveDocumentType.PNG;
    options.transparency = true;
    options.interlaced = false;
    options.optimized = true;
    options.PNG8 = false;
    
    var newName = 'icon-'+size+'x'+size+'.png';

    curDoc.exportDocument(File(curDoc.path+'/'+newName),ExportType.SAVEFORWEB,options);     
    
}

tried {harder}

So here I am, a couple of weeks on from the best week I’ve ever had geeking it up about actionscript and related topics. try {harder} was a small, focused actionscript conference excellently organised by @stray_and_ruby and held at center parcs in sherwood forest.

Nice place eh? Well I never even left the lodge due to so much talking, coding, listening, presenting and a little pool playing. I learned more than I could imagine about so many things, but most importantly about processes, myself and the way I work and think and about how much I’m missing out by not collaborating with other programmers on a daily basis.

Being down here in Cornwall there’s not much I can do about working with other people, but I have started this blog to share anything that might be useful and am trying to join in a bit more on twitter. These things are hard. I liked being a recluse. However there’s more to be gained from joining in the conversation so here I am. My other tangible take away’s are: using git (long overdue, so far so good) and TDD (I think I’m going in the right direction with this now!)

I attend Flash On The Beach in Brighton each year, and it’s great to see what’s going on and meet up with new and old friends there. I usually come away from that feeling a little inspired, but try {harder} has left me with actual inspiration and immediate changes to my work.

Looking forward to next year already!