View previous topic :: View next topic |
Author |
Message |
photocolor n00b


Joined: 17 Feb 2003 Posts: 28
|
Posted: Tue Apr 15, 2003 9:28 am Post subject: Bildgroesse via Commandline ändern |
|
|
Hi,
es gibt ein tool mit dem man Bild-dateien (jpg) von der Groesse X auf Y aendern kann.
Leider faellt mir dieser Command nicht merh ein
Ich habe das mal fuer die Aenderung des Grub-Images gebraucht. Jetzt braeuchte ich das tool um ein Grafikarchiv auf eine bestimmte groesse zu bringen!
cu
michi _________________ G'day |
|
Back to top |
|
 |
photocolor n00b


Joined: 17 Feb 2003 Posts: 28
|
Posted: Tue Apr 15, 2003 10:36 am Post subject: Man sollte nicht so voreilig posten --> Hier die LÖSUNG |
|
|
Der Befehl heisst convert
zB: "convert -size 800x600 file.jpg -resize 640x480 -colors 15 -profile '*' file.xpm"
Habe dazu ein kleines Script geschrieben, welches ein ganzes Verzeichniss durchnudelt und alle File in der Größe ändert und die Files neu schreibt.
#!/bin/bash
# copyright m.eichinger@gmx.de 2003
#
# Define VARs #################################################################
list=`exec /usr/bin/ls | awk '{print $1}'`
size="400x300"
color="256"
output="output-"
################################################################################
for i in ${list?}; do
`exec /usr/bin/convert ${i?} -resize $size -colors $color -profile ${i?} $output${i?}`
done
exit 0 _________________ G'day |
|
Back to top |
|
 |
slartibartfasz Veteran


Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Tue Apr 15, 2003 9:45 pm Post subject: |
|
|
yup - und falls es jemand sucht - das ding ist ein teil von ImageMagick... _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
 |
|