Created
February 22, 2023 20:23
-
-
Save TommyPKeane/065655c115e1bdb2f9cacf11ad5eff06 to your computer and use it in GitHub Desktop.
imagemagick Utilities' Syntax and Examples in bash for commandline Image Conversion, Creation, and Parsing (https://imagemagick.org/Usage/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Multiscale ICO Image (filename.ico) from a given JPEG Image (filename.jpg) | |
convert -background transparent filename.jpg -define icon:auto-resize=16,24,32,48,64,72,96,128,256 filename.ico | |
# Convert MP4 Animated Video (animated.mp4) to Animated GIF (filename.gif) | |
convert filename.mp4 filename.gif | |
# Convert MP4 Animated Video (animated.mp4) to Animated GIF (filename.gif) | |
# with size restriction to width of 300 [px] while preserving aspect-ratio | |
# (Note that re-scaling may degrade quality) | |
convert -resize 300x filename.mp4 filename.gif | |
# Convert MP4 Animated Video (animated.mp4) to Animated GIF (filename.gif) | |
# with size restriction to height of 240 [px] while preserving aspect-ratio | |
# (Note that re-scaling may degrade quality) | |
convert -resize x240 filename.mp4 filename.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See more discussion and examples related to this gist on my personal website: https://www.tommypkeane.com/articles/bash/imagemagick.html