*************************************
Pikona v.0.4e
Puppy Icon Assembler
Author: vovchik (Puppy Linux Forum)
Date: 09-03-12
*************************************

Picona was first created in 2009 because I got tired of running my bash scripts that would call ImageMagick to merge images when making icons.

I decided to give BaCon (a structured Basic--> C converter/compiler) a try for this purpose, and Pikona is the result.

Pikona takes a background image, superimposes an object and covers that with a semi-transparent button or nothing at all (e.g. blank.png). The image size is hardcoded at a standard 128x128 pixels, and the format is png, because transparency and millions of colours are necessary for attractive icons.

The directories ./bgd, ./obj and ./ovl contain the source images (you can, of course, add your own), or use another directory or directories for your source images.

The composite image (png) is stored (after clicking "Save"), in the $HOME/pikona directory. The icon file is named using the names of the constituent images, plus the scaling factor, so you can see the settings that were used for image creation from the filename. There is a rudimentary help window. A log file (pikona.log in $HOME/pikona/log/) also records information on all icons created, including images used and the scaling factor.

I used Peter van Eerten's BaCon and the HUG library for the GTK GUI graphics, and wrote two routines that make straight GTK/GDK calls to rescale and composite images and thumbnails. I have included the source, UPX'd 32-bit binary, basic image files and HUG.

Unlike earlier versions, Pikona NO LONGER REQUIRES ImageMagick. The totally functional binary weighs in at 130k (32-bit) using the command line given near the top of the source file. When UPX'd, the binary shrinks to a very impressive 29k! Much better than 6+ MB, I think, which is the minimum size of ImageMagick when installed. Consult the source of pikona (in the data/src dir) to understand the parameters that are passed to the rescaling and compositing routines.

I know there are probably bugs, and there is much room for improvement. Please post suggestions or modified code, since pikona will always be a work in progress.:)

And have fun creating your own icon sets in minutes, not days or hours.

And make sure to check out Peter's BaCon site (http://www.basic-converter.org) and his other great site (http://www.gtk-server.org).

With kind regards,
vovchik

PS. Also check out the Puppy Linux Forum (http://www.murga-linux.com/puppy/index.php) and the Pikona thread (http://www.murga-linux.com/puppy/viewtopic.php?t=49129) for updates/bugfixes.


CHANGES

v 0.2 alpha

Added spinbox, readme, frametext; 
minor bug fixes; cosmetic changes

v. 0.3 alpha

Used latest HUG (0.69) and with my own compositing and rescaling routines, thus eliminating all IM dependencies. Also used a useful BaCon compile line (thanks oldguy) that generates small, compile-time stripped binaries that can be UPX'd for really tiny executable size:

bacon -o -s -o -Os -o -fdata-sections -o -ffunction-sections -o -Wl,--gc-sections pikona

upx -9 pikona

v. 0.4 alpha

Totally changed the icon selection routines, using file_chooser rather than my own combobox method. The advantages are that (i) any dir can be selected for any image category, (ii) selection is easier, particularly when there are a lot of files, (iii) start up is much faster since I don't have to create lists of files on initial program load, and (iv) if the thumbail cache is up-to-date, the file selection will display thumbnails of all images, no matter where they are.

Since image thumbnailing takes some time, I do not do this automatically so as not to slow down the program at startup. If you cannot see the icons in a fileselect dialog, simply launch your file manager (e.g. Rox, left click on the "eye") when in the bgd, obj and ovl directories or sub-directories. Rox will then create md5-named images in your "~/.thumbnails/normal" directory automatically, and Pikona's file chooser will see and display the respective thumbnails. You do not have to restart Pikona to see the updated thumbnails. Just reselect your image files after viewing the relevant dirs in Rox or another file manager (Thunar works fine for this porpose, too).

I also added some info dialogs (SaveDlg and ErrDlg) to inform the user of processing events.

Pikona can now read and use as input all the formats supported by gdk-pixbuf (see /etc/gtk-2.0/gdk-pixbuf.loaders). In my case, it is pnm, pbm, pgm, ppm, tga, xpm, tiff, pcx, gif, xbm, wmf, icns, bmp, png, jpg, psd, svg and ico.

Changed some file locations. All temp files are now processed in /tmp/pikona. Saved icons are now stored in $HOME/pikona. Pikona sources, the readme and a few necessary images are in the /usr/local/pikona4/data directory.

Many useful, attractive templates are available for the bgd, obj and ovl directories as separate packages.

The compile line is the same as for v. 0.3a (see above).

v. 0.4b

Added logging of icons saved in $HOME/pikona/log/pikona.log. Added file thumbnailing. Added choice of notification displays (bnotify or MESSAGEBOX) via command line switch (-n for bnotify, otherwise MESSAGEBOX). Added thumbnailing using md5sum.

v 0.4c

Thumbnailing (MD5) now accomplished using the MD5 function of libssl, so the external call to md5sum has been eliminated in favour of a common library function.

v. 0.4d

Added a Refresh button to file selection in order to generate thumbnails on the fly from any given directory.

v. 04e

Added Home and Icon buttons to file selection in order to speed up switching to initial-state directories and to permit convenient access to the icons folder - this is particularly useful if you are trying to create new bgd or ovl images in a multi-step overlay process. I used the latest HUG (v 0.73) and latest BaCon build (25).

The compile line is the same as for v. 0.3a (see above).
