ein Banner [perl]

2008-05-24 | 6:54 pm | Kein Kommentar »

Der Banner

Wie wirds gemacht?

More …

File upload im HTML Formular

<form action=“upload.php“ method=“POST“ enctype=“multipart/form-data“>
<input type=“text“ name=“img“ value=““ size=“50″ maxlength=“256″>
<input name=“upfile“ type=“file“ size=“50″ maxlength=“1000000″ accept=“img/*“>
<input type=“submit“ value=“submit“>
</form>

Bild verkleinert speichern mit gd lib

More …

Et voilà some colour schnickschnackschnuck:


More …

Least Square Lines with LSLSLOPE, LSLINT

LSLSLOPE and LSLINT return the parameters for a Least Squares Line (y = mx +b) which approximate the provided dataset. LSLSLOPE is the slope (m) of the line related to the COUNT position of the data. LSLINT is the y-intercept (b), which happens also to be the first data point on the graph.

More …

Round Robin Database Tool is a data logging and graphing system for time series data. It works with a fixed amount of data.

More …

SVG – XML basierte skalierbare Grafiken
Grundlegendes im SVG Tutorial.
Schickes Beispiel http://www.codedread.com/displayWebStats.php.

Einbettung von svg im HTML als object
<object data=“bspSVG.cgi“ type=“image/svg+xml“ height=“400″ width=“400″></object>

(0,0) befindet sich in der linken oberen Ecke!

Einfacher Text
<text x=“30″ y=“20″ width=“70″ height=“12″ style=“stroke: green“>Ein einfacher Text</text>

Linie
<line x1=“2″ y1=“3″ x2=“7″ y2=“8″ style=“stroke: black“>

Polyline
<polyline style=“fill: none; stroke: red; stroke-width: 5px“ points=“10 20, 10 40, 20 10, … „/>

Verschieben um (x,y)
<g transform=“translate(60, 20)“></g>

Skalierung: Vergroessern (1< $s), Verkleinern(0<$s<1)
<g transform=“scale($sx,$sy)“></g>

Umwandlung von svg nach png: inkscape blub.svg blub.png

Zum Rumspielen :) Inkscape
More …

pnmtools

2007-07-7 | 5:08 pm | Kein Kommentar »

Anleitung dazu? … irgendwo? … vergiss es :)

ppm* Farbe
pgm* Graustufen
pbm* Schwarzweiss
pnm* Alles

ppmmake white 20 5 > neu.ppm
pnmscale 0.1 alt.pgm > neu.pgm
pnmcut -left 20 -right 40 -top 10 -bottom 20 alt.pgm > neu.pgm

Bildformat Umwandlungen
djpeg/cjpeg
pnmtopng
pngtopnm

Karlsruhe

Zusammensetzen von pnms
Beim Zusammensetzen der pnm Bilder muessen die obersten drei Zeilen abgeschnitten werden.

for i in *
do
/usr/bin/pnmcut -left 0 -right 56049 -top 0 -bottom 567 $i > $i.cut
sed -e “1,3d” < $i.cut >> stadtplan_sat1000.pgm
rm $i.cut
done

imagemagick

2007-07-6 | 8:02 pm | Kein Kommentar »

Groesse aendern

convert -scale 40x40 alt.gif neu.gif

for i in *JPG
do
convert -scale 50% $i `basename $i JPG`jpg
done

Ausschnitt

convert -crop XxYx0xX/2 alt.gif neu.gif

colorize

convert x.jpg -fill white -colorize 50% y.jpg

Schatten

convert eingabebild.png \( +clone -background black -shadow 60x5+10+10 
\) +swap -background white -layers merge +repage ausgabebild.png

Logo machen

#! /bin/sh
convert -size 800x100 xc:white\
-fill "#ffdddd" -draw "font-size 48 text 5,60 'HERmione ...'" \
-fill "#cc0000" -draw "font-size 48 text 3,62 'HERmione ...'" \
-fill "#cc0000" -draw "line 331,51 765,51 " \
-fill "#ffdddd" -draw "line 330,52 766,52 " \
-fill "#cc0000" -draw "font-size 14 text 330,45 'Zettel und andere Peinlichkeiten auf dem Schreibtisch einer Geekine'" \
-fill "#dddddd" \
-draw "font-size 12 text 330,70 '\ alt + shift + 7   | alt + 7   ~ alt + n'" \
top.png;