Imagemagick: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Howto == === Image resize === convert front.jpg -resize 500x500 folder.jpg") |
No edit summary |
||
Line 2: | Line 2: | ||
=== Image resize === |
=== Image resize === |
||
convert front.jpg -resize 500x500 folder.jpg |
convert front.jpg -resize 500x500 folder.jpg |
||
=== Get image info === |
|||
<source lang=bash> |
|||
convert -format "%f %w %h" sand.jpg info: |
|||
identify -format "%f %w %h" sand.jpg # Same but shorter |
|||
identify sand.jpg -format "%f %w %h" # WRONG - format string must come before because params are processed sequentially |
|||
read -r file width height <<< $(identify -format "%f %w %h" sand.jpg) # Set values in variables |
|||
</source> |
Revision as of 12:23, 16 December 2015
Howto
Image resize
convert front.jpg -resize 500x500 folder.jpg
Get image info
convert -format "%f %w %h" sand.jpg info:
identify -format "%f %w %h" sand.jpg # Same but shorter
identify sand.jpg -format "%f %w %h" # WRONG - format string must come before because params are processed sequentially
read -r file width height <<< $(identify -format "%f %w %h" sand.jpg) # Set values in variables