m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/imagemagick.md
blob: f4783df2e363ae67b9b5e0a937246019855b167a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Manipulating images!

## Simple format conversion

    convert in.jpg out.png

## Resize

Fits image within given geometry, keeping the aspect ratio!

    convert in.jpg -resize 720x720 out.jpg

Force resize to be exactly the given geometry with `!`

    convert in.jpg --resize 720x720\! out.jpg

## Compress

### JPG

convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% source.jpg result.jpg

## Convert PDF

PDFs can be converted to images. Set `-density XxY` for better resolution.

## Options with enum arguments

List possible option values

    convert -list <option>
    # e.g.
    convert -list dither