Friday, August 23, 2019

Not-so-poor Icon processor

While working on 64bit AROS, I discovered that many icons changed and some new ones are needed. Obviously, finding a proper icon for everything, with the magnificent and enormous set Ken Lester allowed me to use, is quite trivial, but some new developments need for proper imaging and these days I really missed a simple tool which would let me assemble double-state, AROS-compatible icons from two different PNG images. Yes, we now have a great Icon Editor but it's 32bit only and I needed something that would have been quicker, easier and basic. My first thought was to use a shell script: open the normal state PNG, open the selected one, join them together and rename as needed. Easy, isn't it? Well, right, but icon handling on Amiga also includes nice-to-have features like default tool, stack size and - best of all - tooltypes. All these should be nicely handled and the 'simple script' solution wouldn't fit at all. So I decided to create a LUA based Icon processor which would take advantage of some components I have already built in my 64bit environment: processicon and picturereq (Yannick told me how to compile it right and yes, now we have a 64bit executable for it!). The result, for now, is something like this:


Not bad, isn't it? Well, my creation is only the smaller one on the left, and there's still much to add. For now I have just implemented the most basic functions of the interface: it loads and shows normal and selected PNG images (transparency doesn't work properly - but that's not something I will spend my time to fix or work-around), it lets me choose the icon type and add a stack size. There are two options I still need to add: actual saving of icons and a tooltype loader/editor. Honestly, I haven't decided yet if the LUA script will be completely stand-alone or, more probably, a LUA + Shell scripts solution, because there are parts that can be more comfortably handled with a different approach.

Translate