Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Jul 2014, 23:37
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
PPM: application icons
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 30 May 2012, 05:29    Post subject:  PPM: application icons
Subject description: Collection of app icons for the Puppy Package Manager
 

I reported on my blog that the Puppy Package Manager now optionally supports displaying icons alongside each package entry. Blog post:

http://bkhome.org/blog/?viewDetailed=02851

Screenshot attached, with Ziggy user interface.

If anyone wants to try this, you have to grab all the latest scripts out of /usr/local/petget, see the link to the online Woof repo.

You also need to install my collection of 16x16 icons, again see link in blog post.

After installing the icons, you need to update the GTK icon cache:

Code:
# gtk-update-icon-cache -f /usr/share/icons/hicolor


The reason that I have started this forum thread, is that it occurred to me that there is a project here that might greatly interest someone who is into graphics, but is not a programmer, and wants to be involved in helping with Puppy development.

My PET package has 532 icons, 3788 symlinks, intended to handle just about any application that the PPM will encounter. However, it does increase the size of Puppy a lot.

if we just want the nice visual affect of seeing icons, I think that a selection of less than 100 would be adequate. Rather than trying to have a unique icon for so many apps, have many more generic icons.

For example 'audioapp.xpm' and 'audioutil.xpm' could be generic icons, with many symlinks to them, for example 'audacious.xpm' could be a symlink to audioapp.xpm'. Or, it could be png images -- I used xpm, see my post about that:
http://bkhome.org/blog/?viewDetailed=02850

However, many important apps could have their own icons, to draw attention to themselves. In particular, those that we recommend for use with Puppy. Firefox for example.

There would still be a gadzillion symlinks, but in a squashfs .sfs I think they pack in very small.

The images have to be as tiny as possible. I created 16x16, typically 600 bytes as xpm or 250 bytes as png, however, I think it might be better to go for 24x24 as when it gets too small it becomes a bit ridiculous you can't see what the icon represents.

To create really tiny icons, for example, 24x24 with 16 colours, it is good to start with svg icons. Here is a script that automates it, if you have a directory of svg icons:

Code:
#!/bin/sh
#INPATH='open_icon_library-full/icons/svg/apps'
#INPATH='G-Flat-SVG/scalable/apps'
INPATH='svg-in'

for ONESVG in `find $INPATH -type f -name '*.svg' | tr '\n' ' '`
do
 ONEBASE="`basename $ONESVG .svg`"
 echo "$ONEBASE"
 rsvg-convert -w 24 -h 24 -o /tmp/temppng.png $ONESVG
 sync
 pngtopnm /tmp/temppng.png | pnmquant 16 | ppmtoxpm > /tmp/tempxpm.xpm
 sync
 sPTN='s%"  c black"%"  c None"%'
 sed -e "$sPTN" /tmp/tempxpm.xpm > xpm-24x24-alpha/${ONEBASE}.xpm
 sync
done


Why so few colours? In a very small image, there is not much advantage to having lots of colours, although I was thinking of 16x16, and for 24x24 you might want also more colours.

This is interesting stuff, but I have to go back onto all my other Puppy development work. I am throwing this one out there for someone who is interested!

The challenge will be to get the size of the icons PET package right down. It is currently 211KB.

There are collections of svg app icons, I posted a link to one of them, but there are others. You might wonder, why not just use svg icons directly? -- they are too big. Unless someone can figure out a way of making them smaller, down about 600 - 900 bytes uncompressed to compete with xpm. But then, the trade-off is they render very nice.
ppm-icons.png
 Description   
 Filesize   13.94 KB
 Viewed   578 Time(s)

ppm-icons.png


_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 30 May 2012, 05:38    Post subject:  

Note, that screenshot shows that some of the icons are wrong. For example, an 'Opera' icon for the 'erlang' package.

This is because I wrote a script to automatically generate all the symlinks, and it got a lot of them very wrong. They will have to be manually corrected, once a base set of icons is created.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4284

PostPosted: Wed 30 May 2012, 17:04    Post subject:  

perhaps one icon for each subcategory in the xdg hierarchy

here is a little xpm stripper
Code:
#!/bin/sh
for x in $@
do
DATA=$(grep -v "\/\*" "$x")
echo "/* XPM */
$DATA" >"$x"
done

This has the largest collection of quality xpm icons that I know of.
http://www.cs.indiana.edu/pub/AIcons/AIcons_1.8.tar.gz

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 13 Aug 2012, 19:50    Post subject:  

I have re-engineered the entire mechanism for showing sub-category application icons in the PPM.

Photo:
ppm-subcategory-icons.png
 Description   
 Filesize   14.32 KB
 Viewed   12850 Time(s)

ppm-subcategory-icons.png


_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 13 Aug 2012, 20:12    Post subject:  

Details on the re-implementation here:

http://bkhome.org/blog/?viewDetailed=02947

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0563s ][ Queries: 13 (0.0044s) ][ GZIP on ]