User Tools

Site Tools


imagemagick

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
imagemagick [2022/01/14 04:23] – created rjtimagemagick [2023/12/20 21:56] (current) – PDF rjt
Line 3: Line 3:
 ===== Usage ===== ===== Usage =====
  
 +==== Screenshots ====
 I use this script for taking screenshots, bound to the ''Print Scrn'' key with [[i3wm]]. It dumps a screenshot into my 'Pictures' directory, and makes a beep. You can set it to make a notification if you want. I use this script for taking screenshots, bound to the ''Print Scrn'' key with [[i3wm]]. It dumps a screenshot into my 'Pictures' directory, and makes a beep. You can set it to make a notification if you want.
  
-<code>+<file bash screenshot.sh>
 #!/bin/bash #!/bin/bash
 import -window root $HOME/Pictures/screenshot_`date +%y-%m-%d_%H-%M-%S`.png import -window root $HOME/Pictures/screenshot_`date +%y-%m-%d_%H-%M-%S`.png
-</code>+</file>
  
-{{tag>software}}+Without beep: 
 + 
 +<file bash screenshot.sh> 
 +#!/bin/bash 
 +import -silent -window root $HOME/Pictures/screenshot_`date +%y-%m-%d_%H-%M-%S`.png 
 +</file> 
 + 
 +==== Image Conversion ==== 
 + 
 +Two main commands are ''convert'' and ''mogrify''. The distinction is that the former makes new files, and the later can overwrite existing files. 
 + 
 +This will convert all PNGs in the current directory to JPGs at quality 50 and scaled to 1200px width. 
 + 
 +<code bash>mogrify -format jpg -quality 50% -resize 1200x *.png</code> 
 + 
 +==== Create PDF ==== 
 + 
 +To create a PDF from a bunch of PNG files in a directory: 
 + 
 +<code bash>convert *.png [name].pdf</code> 
 + 
 +===== Guides ===== 
 + 
 +  * [[https://web.archive.org/web/20210211224638/http://www.ibm.com/developerworks/library/l-graf/?ca=dnt-428|Graphics from the command line]] - Archive of 2003 guide by Michael Still. 
 +  * [[https://web.archive.org/web/20200320002320/https://www.ibm.com/developerworks/library/l-graf2/?ca=dgr-lnxw15GraphicsLine|More graphics from the command line]] - Archive of 2004 guide by Michael Still. 
 +  * [[https://legacy.imagemagick.org/Usage/|Examples of ImageMagick Usage (Legacy Version 6)]] 
 +    * [[https://legacy.imagemagick.org/Usage/crop/#crop_spaced|§Separating Spaced-out Tiling Images]] 
 +    * [[https://legacy.imagemagick.org/Usage/crop/#crop_equal|§Cropping into roughly Equally Sized Divisions]] 
 +    * [[https://legacy.imagemagick.org/discourse-server/viewtopic.php?t=28906|sprite sheets to animated .gif files]] - forum thread. 
 +  * [[https://stackoverflow.com/questions/56040013/convert-sprite-sheet-to-gif-animation|Convert sprite sheet to gif animation]] - Stackoverflow, 2019. 
 +  * [[http://www.fmwconcepts.com/imagemagick/index.php|Fred's ImageMagick Scripts]] 
 +  *  
 + 
 +===== See Also ===== 
 + 
 +  * [[https://imagemagick.org/|imagemagick.org]] 
 +  * [[github>imagemagick/imagemagick]] 
 +  * [[wp>ImageMagick]] 
 +  * [[gmt>ImageMagick]] 
 + 
 +{{tag>cli guide software}}
imagemagick.1642094615.txt.gz · Last modified: 2022/01/14 04:23 by rjt