Pikona - Puppy Icon Assembler NEW and TINY! - v.0.4e

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Pikona - Puppy Icon Assembler NEW and TINY! - v.0.4e

#1 Post by vovchik »

Dear Puppians,

Picona was created 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 try for this purpose, and Pikona is the result.

Pikona used to require Image Magick. I finally revised it and removed all the IM calls, replacing them with my own routines. As a result, you don't have to install anything else, except extra images. The actual pikona binary (stripped and UPX'd) is just short of 29k - not 6+ MB for ImageMagick! Pikona now is able to read images from any directory and lots of graphic file types are supported (i.e.. png, gif, jpg, ico, icns, wmf, svg, xpm). The seemingly large pet file size is because there are some basic images in the bgd, onj and ovl directories. I have also made additional image packs for background, object and overlay images and highly recommend that you install them to see what Pikona can really do. Also, fileselection has been dramatically improved.

Pikona basically takes a background image, superimposes an object and covers that with a semi-transparent button.

The directories /bgd, /obj and /ovl (in /usr/pikona4) contain the source images (you can, of course, add your own). The composite image is stored (after saving), in the HOME$/pikona directory. There is a rudimentary help window.

I used BaCon (build 25) and the HUG (0.73) library for most of the GUI graphics and to straight calls to gdk_pixbuf and libssl for processing - the latter is needed for calculating the MD5 hashes of image thumbnails. The source is containd in the pikona4/data/src dir.

I know there are bugs, and there is much room for improvement. Please post suggestions or modified code.

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

With kind regards,
vovchik

PS. I compiled in Lucid - so Pikona4 should work in most recent puppies.
Attachments
pikona4e.png
(96.49 KiB) Downloaded 1917 times
Last edited by vovchik on Fri 09 Mar 2012, 14:45, edited 1 time in total.

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#2 Post by vovchik »

Dear Puppians,

I tested Pikona with ImageMagick v. 6.3.3 and everything works. With any of the 6.5.x versions, however, I either get a reduced bitdepth - which kills transparency, amongst other things, or it coughs and does not produce an image during one of the 6 launches of IM executables. I will try to find out what systax changes were introduced between the versions for the convert, montage and coalesce binaries. If you know this offhand, please post this info, as this will save me time. I do want Pikona to run as universally as possible and could do a version check and modify the IM binary launch strings.

With kind regards,
vovchik

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#3 Post by dejan555 »

Oh goodie, seems interesting, gonna test it later today, don't remember now which image magick version i have.
So lemme see. I can make backgrounds, overlays and pics to go inbetween, cool. I just place images in appropriate folders to show up in drop down list?
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#4 Post by big_bass »

vovchik

I havent tried your app yet but it looks
great! I wanted to let you know soon I just read this :D

and also congratulations for doing it in BaCon !!

I'll be testing

I know imagemagic is very powerful
but if you need a just a light command line image resizer /non editor ... I use
aaphoto


with a simple script I wrote here for
conveting to 16 and 48 size *.png
for package building

I hope I can include that in your code :D

a big thanks

Code: Select all

#!/usr/bin/env bash

#Joe Arose aka..big_bass
#drag and drop make 48x48 images for packages
#to the pixmaps folder
#place the icon inside it
#remove the _new.png  name 
#only a  *.png will get placed in the folder
#other formats will get made though such as *.jpg
#they just won't get placed in the package ready folder


# check if tools are available
if [ "`which aaphoto`" = "" ] > /dev/null 2>/dev/null
then
 echo "Please check if aaphoto is installed ."
 sleep 10 #some time to read
 exit -1
fi

#what if no file is selected?
if [$1 = ]; then
                  echo "no files given"
                  sleep 5
              exit 0
 
               fi
            
DIRNOW=`dirname "$1"`

#command line image converter  -s is silent ,resize48  is for 48 pixels
#read for options  #rox -s /usr/doc/aaphoto_sources-v0.30/README

aaphoto -s --resize48 "$1"

#strip off the .png
#make the strings I need
IMAGENAME=`basename  "$1" .png`
DIRNOW=`dirname "$1"`

#for testing only to check output
#echo $IMAGENAME"_new.png" >/root/image.txt
#echo $DIRNOW >>/root/image.txt


#here I need to rename the generated *_new file  back to the original name
#to make things easy the correct folder is made for you  also

#what if not a *.png file is selected?
#dont build the folders
if echo `basename "$1" ` | grep -q '.png$'; then
                  mkdir -p $DIRNOW/usr/share/pixmaps/   
              fi
                                                                   
mv $DIRNOW/$IMAGENAME"_new.png" $DIRNOW/usr/share/pixmaps/           
mv $DIRNOW/usr/share/pixmaps/$IMAGENAME"_new.png" $DIRNOW/usr/share/pixmaps/$IMAGENAME".png"     

updated now I tried it WOW
you got a great little app here 8) 8) 8)

imagemagick-6.4.3.10 I compiled it from source as a *.tgz
http://puppy2.org/slaxer/imagemagick-6. ... 2-slxr.tgz
Joe
Last edited by big_bass on Fri 20 Nov 2009, 17:13, edited 1 time in total.

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#5 Post by dejan555 »

I tried it. I love it :)
A question: is overlay image resized some % cause i made background and overlay same dimensions, and when it put em togheter overlay is bit scaled so I can see edges of background below overlay?
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#6 Post by vovchik »

Dear dejan555,

I am glad it works for you. Originally - and in my incomplete glade version - I used a spinbox for the scaling, so it was more sensitive. Try setting it at 90 or 100. The default is set at 70. In my bash version, I also used an x,y displacement factor, which allowed control of object positioning. I would introduce it again, but it would destroy the current symmetry of the gui design. I suppose I could cut the dropdown scale list in half and then have two thin displacement dropdowns - for x and y distance from 0,0 (origin). I'll give it some thought.

I think you see now how easy it is to create a complete icon set without too much effort.

With kind regards,
vovchik

PS. Joe (big_bass): aaphoto is possible - look at the cmdx$ statements in the source. What I would really like to do is to eliminate all dependencies and do all the manipulation of images in memory. That would make Pikona self-contained, and it would run on all Puppies out of the box. But first I have to study the png format. BaCon allows for binary loads to memvars, which is nice and a prerequisite for what I have in mind.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#7 Post by amigo »

vovchik, I think you'll have to study the docs for ImageMagick about the syntax changes. There have been major changes in the way you use ImageMagick. It can now be used in such a way that the options act like a script -I mean you can carry out a whole series of operations on an image without having to run the program several times. This means that the *order* in which options are passed has become more critical.

Here's a link which might be useful:
http://www.packtpub.com/page/ImageMagic ... f_Contents

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#8 Post by dejan555 »

Yeah thanks for reply vovchik, but I'm talking about scaling "overlay", not "object", or is it set to 70 by default for both? I don't think so.

And yes, it IS very good for making iconsets, all you need is to make multiple objects then put em together between bg and overlay :D
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#9 Post by dejan555 »

I really like the current design and functionality, I wouldn't change anything, just wondered about overlay, but maybe it was my bad.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#10 Post by vovchik »

Dear dejan555,

You are right. I only scale the object. If the bgd and ovl are not lined up in terms of x-y, check the images. I normally found that bdg images should have a margin of some 10 pixels or more on all sides and the ovl slightly less. I may be wrong about the numbers, since I can't recall. There is some trimming that goes on before the "end result", with expansion back to 128x128 on a transparent background for purposes of centring. I'll try to look into this.

With kind regards,
vovchik

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#11 Post by vovchik »

Dear Joe,

Thanks very much for your compile of ImageMagick. With it, Pikona works very nicely under Puppy 4.x, and we should recommend your version to all users who wish to run Pikona. After examing the tgz, I made it into a pet using tgz2pet and it installed fine. My previous version on a laptop was a very recent one and it caused some difficulties. I will have to take amigo's suggestion to heart and read up on the changes to IM syntax (6.5.x) one of these days, however, so that users don't run into problems and we are not tied to a particular IM version. There is some advantage to universality, as reflected in Peter's choice to use bash as the converter/compiler of BaCon. That was brilliant. Along the same lines, for Pikona it would be ideal to to do all the image manipulation natively, as mentioned above, but that will take some serious investigation of the png format (unless I co-opt gdk_pixbuf to do the thinking for me).

Thanks again and kind regards,
vovchik

I am glad you like Pikona. We can now make Puppy very pretty very fast. :)

With kind regards,
vovchik

PS. dejan555: Are you alredy working ont a nice, new icon set?

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#12 Post by big_bass »

vovchik

some extra images for pikona unzip in the pikona folder
the folder is called obj when uncompressed
they will install in the correct place which is the obj folder
these are from my rox theme on slaxer pup

http://puppy2.org/slaxer/pikona-extra-images.tar.gz

thank you for this app
Joe

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#13 Post by dejan555 »

vovchik wrote: PS. dejan555: Are you alredy working ont a nice, new icon set?
You betcha ;)
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#14 Post by vovchik »

Dear Puppians,

Peter was kind enough to make a few very lovely additions to the HUG library, including a spinbox and fileselect. I revised Pikona a bit to use the spinbox and will soon post another version that makes use of fileselect rather than combo boxes for choosing images.

If you have already installed the first version (v. 01 alpha), simply replace the old Pikona binary (and other files) with this one (v. 02 alpha) and replace the obj and ovl dirs with the new ones. There are quite a few more interesting background images now, and I included a blank128.png in some dirs for the sake of flexibility. Choose one of the metal backgrounds, set obj to blank128.png and ovl to clear-but.png and you will see what I mean. You can make new bgd images this way pretty easily.

If you have not installed Pikona yet, first install Joe's ImageMagick (see previous posts), then install the first version of Pikona and then overwrite the old stuff with the content of the attached archives. I could have made an all-in-one, easy-to-use archive, but there is a 1-MB limit for files on the forum. Sorry for the inconvenience.

Have fun....

With kind regards,
vovchik
Attachments
pikona003.jpg
(36.12 KiB) Downloaded 3701 times
bin.tar.gz
(36.81 KiB) Downloaded 1244 times

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#15 Post by big_bass »

Hey vovchik


new version test working fine!

Joe
Attachments
blank128_puppylogo128_clear-blue_70.png
(23.74 KiB) Downloaded 3571 times

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#16 Post by big_bass »

Hey vovchik


I know this was working correctly on slaxer_pup
but I upgraded bash to version 4.1 on TXZ_pup
and for some odd reason it wont save the image

I want to use this to make a logo

I think that the pikona bin may have to be recompiled
the app comes up fine but it doesnt save the image
Im puzzled of what you need to recompile this
and if HUG as to updated too

thanks in advance friend
Joe

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#17 Post by vovchik »

Dear Joe,

Let me try to compile it in Puppy 4.10 or in Lucid and see what happens. HUG has changed a bit (some calling conventions), as has Bacon, so I think I should use the old HUG (last one that worked), since it did what I expected it to do. I'll experiment. Lucid has bash v. 4.1.5, and bacon compiled fine with that a few days ago, although I didn't experiment with HUG in that setting. Try grabbing the latest bacon.bash and bacon.bac from Peter's site and compile it. Then try compiling Pikona using the bacon binary, once with a new HUG and once with the old. I wonder whether the saving doesn't have something to do with write permissions in the place that Pikona might be installed. Just and idea.

With kind regards,
vovchik

UPDATE: I compiled pikona in Lucid and it saves. I had to use the old hug because the IMAGE command syntax changed and I haven't yet changed my source. But with the old hug it saves to the icn dir. What is important is that you use your IM, because the one in Lucid seems to screw up the alpha channel (renders it black). I suppose that could be fixed by also looking at changes in IM convert syntax. :(

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#18 Post by big_bass »

Try grabbing the latest bacon.bash and bacon.bac from Peter's site and compile it. Then try compiling Pikona using the bacon binary, once with a new HUG and once with the old. I wonder whether the saving doesn't have something to do with write permissions in the place that Pikona might be installed. Just and idea.
well I figured out how to compile the bacon (that sounds funny) :D
then the pikona with HUG

main page
http://www.basic-converter.org/

a mini how to of what I did


*************************
1.)download bacon bash
make it executable

2.)download bacon bac

3.)then compile it like this

---------------------------

Code: Select all

 ./bacon.bash bacon.bac
--------------------------
this is quite strange to compile the bacon bac by using the bacon bash
but thats what you do


this takes awhile and generates many files then they are deleted and only
the bin remains called bacon

-------this is the actual command ----------------
#

Code: Select all

  ./bacon.bash bacon.bac
Starting conversion... done.
Starting compilation... done.
Program 'bacon' ready.

#

now compile pikona

#

Code: Select all

./bacon.bash pikona.bac
Starting conversion... done.
Starting compilation... done.
Program 'pikona' ready.

#

still having a problem with the save file :?

so I 'll try again compiling this on a clean system
puppy pfix=ram
bbl
Joe

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#19 Post by big_bass »

:D :D :D

all worked using your original app on a clean install
I have no idea what went wrong but the good news is it works as is

and the better news is I got the logo



made a TXZ package too and included a menu item and a launch script so the icons come up when the program is launched from the menu
http://www.puppy2.org/slaxer/pikona-001 ... 3_SLXR.txz


thanks
Joe
Attachments
x-xz_clear.png
(19.54 KiB) Downloaded 1747 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#20 Post by BarryK »

Vovchik, did you consider using 'netpbm' instead of ImageMagick?

Puppy already has many of the netpbm utilities builtin.

Here is an overview of the utilities:

http://netpbm.sourceforge.net/doc/directory.html
[url]https://bkhome.org/news/[/url]

Post Reply