View Single Post
  #41  
Old 31-08-2006, 16:15
whynot's Avatar
whynot whynot is offline
Membre senior
 
Join Date: 31-12-2003
Location: -
Posts: 772
Zou comme prévu, v'là une photo (floue) de la merveille ... grml en fait on voit pas grand chose mais bon. Pis ça m'a fait penser que ça fait un bout de temps que j'ai pas filé de screenshot tiens. Voilou donc en images attachées.

Ubuntu 6.06.1 (plus que quelques backups et zou pour une Edgy Knot2), avec un zôli fond d'écran que j'ai chopé chaisplusoù, et un thème Clearlooks / windowborders Resilience / icônes Tango (Canonical, le marron c'est gentil mais non merci).

Note (le bash c'est bon, mangezen) : trouvé un script bash/imagemagick excellentissime (décidément) chaiplusoù pour créer des thumbnails commes ceux ci dessous, siz'êtesintéressés hében le v'là. On colle ça dans un thumbnail.sh, chmod +x thumbnail.sh et ./thumbnail.sh image1 image2...
Code:
#!/bin/bash
 
# verifying usage
if [ "$#" = "0" -o "$1" = "-h" -o "$1" = "--help" ]; then
    echo Usage : $(basename $0) image [ image ... ]
    echo Used to generate thumbnails of a list of images.
    exit 1
fi
 
# loop that enables the treatment of a list of images
for i in "$@"; do
    # verifying file
    if [ -f "$i" ]; then
        # get image infos
        iinfos=$(identify -format "%m:%wx%h:%t:%e:%b" "$i")
 
        # get image type
        itype=$(echo $iinfos | awk -F":" '{print $1}')
 
        # get image resolution
        resolution=$(echo $iinfos | awk -F":" '{print $2}')
 
        # get image name, without extension
        name=$(echo $iinfos | awk -F":" '{print $3}')
 
        # get extension
        extension=$(echo $iinfos | awk -F":" '{print $4}')
 
        # get image size
        size=$(echo $iinfos | awk -F":" '{print $5}')
 
        # convert size to human readable format
        if [ $size -ge 1048576 ]; then
            sizeh="$(( size / 1048576 )) Mo"
        elif [ $size -ge 1024 ]; then
            sizeh="$(( size / 1024 )) Ko"
        else
            sizeh="$size o"
        fi
 
        # resize image and add infos
        convert "$i" -resize 400x200 -gravity South -background Black -fill white -splice 0x18 -draw "text 0,2 '$itype : $resolution - $sizeh'" "$name"-thumb.$extension
    else
        echo "$i" : file does not exist
    fi
done
Attached Thumbnails
berk.jpg   whynot-buntu.jpg  
__________________
Document hautement conseillé pour obtenir une réponse aux questions.
Ami trolleur (en fait non), clique ici.
Reply With Quote