yab | yet another Basic for HAIKU
Thumb - Printable Version

+- yab | yet another Basic for HAIKU (https://yab.orgfree.com/forum)
+-- Forum: General discussion (https://yab.orgfree.com/forum/forumdisplay.php?fid=8)
+--- Forum: yab stuff (https://yab.orgfree.com/forum/forumdisplay.php?fid=10)
+--- Thread: Thumb (/showthread.php?tid=75)



Thumb - bbjimmy - 10-31-2016

I added my thumbnailing program to github:

https://github.com/bbjimmy/Thumb

Thumb is a command-line tool to create thumbnails of image files for use in webpages etc. programmed in yab. the sources are on the git repo.


RE: Thumb - clasqm - 11-03-2016

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



Free Web Hosting