User Tools

Site Tools


imagemagick

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
imagemagick [2022/03/02 16:52] – guides 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.
  
Line 9: Line 10:
 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
 </file> </file>
 +
 +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 ===== ===== Guides =====
imagemagick.1646200329.txt.gz · Last modified: 2022/03/02 16:52 by rjt