On a slightly related note: here is the bash script I concocted to extract icons from executables so that I can upload them to the Haikdepot web app. May be useful in conjunction with thumb.
Code:
#!/boot/system/bin/bash
## script to insert icon file in a newly ported HPKG folder
## before actually creating an HPKG out of it and copy to
## a known location for use in HaikuDepot web app.
## Usage:
## make_icons <executable or script>
##
## works best as an xicon droplet!
##
## NB will crash if there are spaces in the supplied pathname
## will fix that later
## Delete last component from parameter ##
_base="$(dirname $1)"
## go there
cd $_base
## try extracting a vector icon
catattr --raw BEOS:ICON $1 > $1.hvif
## If the above resulted in a 0-byte file
## delete it and create PNG files instead.
## requires app2png, and
## 64x64 requires ImageMagick
##
## in either case, copy the results to
## a known location.
if test -s $1.hvif
then
cp -f $1.hvif /boot/home/screenshots/icons
exit
else
rm $1.hvif
app2png $1
convert $1-icon_32.png -resize 64x64 $1-icon_64.png
cp -f $1-icon_??.png /boot/home/screenshots/icons
exit
fi