PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Resizen mit convert ohne ratio beizubehalten?



stokedfish
21.02.06, 17:08
Hallo,

convert macht mich gerade wahnsinnig. Ich würde gerne alle meine CD Covers auf eine Grösse von 240x240 bringen - wie mache ich das denn, ohne dass convert ständig die aspect ratio beibehält und so nie auf 240x240 konvertiert?

:ugly:

traffic
21.02.06, 18:01
Indem Du die Dokumentation beachtest:

http://imagemagick.org/script/command-line-options.php#resize

By default, the width and height are maximum values. That is, the image is expanded or contracted to fit the width and height value while maintaining the aspect ratio of the image. Append an exclamation point to the geometry to force the image size to exactly the size you specify. For example, if you specify 640x480! the image width is set to 640 pixels and height to 480.
Auf Deutsch: Einfach ein Ausrufungszeichen an die Größenangabe anhängen.

Also nicht

convert input.png -resize 240x240 output.png
sondern

convert input.png -resize 240x240! output.png