Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
imagemagick [2008/05/20 14:44] – angelegt gerald | imagemagick [2024/02/29 13:36] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Imagemagick ====== | ====== Imagemagick ====== | ||
+ | http:// | ||
+ | |||
+ | [[imagemagick: | ||
+ | |||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Wichtig bei Verwendung von Crop: | ||
+ | |||
+ | z.B. -crop 100x100 bescheidet das Bild, **aber**: | ||
+ | |||
+ | Der Rest wird in Unterlayern abgelegt ([0] [1] etc.). Am Ende hat greift man dann meist auf das [0] zurück (darin liegt der Rest). Um das zu Unterbinden, | ||
+ | |||
+ | -crop 100x100+0+0 | ||
+ | |||
+ | |||
Zeile 74: | Zeile 92: | ||
Workaround: Getrennte Befehle... | Workaround: Getrennte Befehle... | ||
+ | |||
+ | |||
+ | {{tag> | ||
+ | |||
+ | ===== File Handling ===== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | ===== PSD ===== | ||
+ | |||
+ | Photoshop-Datei mit Ebenen erzeugen: | ||
+ | |||
+ | < | ||
+ | convert \( -page +0+0 -label " | ||
+ | \( -page +0+0 -compose darken -label " | ||
+ | \( -clone 0--1 -background none -mosaic \) | ||
+ | -alpha Off -reverse -compress JPEG " | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Breite der zu rechnenden Schrift berechnen ===== | ||
+ | Quelle((https:// | ||
+ | |||
+ | I need to calculate the length when rendered of a lot of strings using a custom font. | ||
+ | |||
+ | |||
+ | Can you use label: and let ImageMagick calculate the width needed for you? | ||
+ | < | ||
+ | convert -font " | ||
+ | identify out.png | ||
+ | out.png PNG 396x73 396x73+0+0 8-bit sRGB 256c 2.57KB 0.000u 0:00.000 | ||
+ | </ | ||
+ | |||
+ | or, more simply: | ||
+ | < | ||
+ | convert -font " | ||
+ | 396 | ||
+ | </ | ||
+ | |||
+ | or, as Eric suggested: | ||
+ | < | ||
+ | convert -font " | ||
+ | 396 | ||
+ | </ | ||
+ | |||
+ | Or, if you want to use annotate, you can make a larger canvas and trim it, like this: | ||
+ | < | ||
+ | convert -gravity west xc: | ||
+ | 197 | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |