Skip to content

Commit

Permalink
note improvements to iprofile
Browse files Browse the repository at this point in the history
The docs had fallen behind a bit ... iprofile is no longer usually necessary.

see #1843
  • Loading branch information
jcupitt committed Oct 2, 2020
1 parent c27c471 commit f2956ac
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions doc/Using-vipsthumbnail.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ $image = Vips\Image::thumbnail($filename, 200, ["height" => 200]);
$image->writeToFile("my-thumbnail.jpg");
```

You can also call `thumbnail_source` from the CLI, for example:

```
$ cat k2.jpg | \
vips thumbnail_source [descriptor=0] .jpg[Q=90] 128 | \
cat > x.jpg
```

# libvips options

`vipsthumbnail` supports the usual range of vips command-line options. A
Expand Down Expand Up @@ -282,25 +290,14 @@ high-quality sRGB profile that's built into libvips.)
`tn_shark.jpg` will look identical to a user, but it's almost half the size.

You can also specify a fallback input profile to use if the image has no
embedded one. This can often happen with CMYK images, producing an error
message like:
embedded one. For example, perhaps you somehow know that a JPG is in Adobe98
space, even though it has no embedded profile.

```
$ vipsthumbnail kgdev.jpg
vipsthumbnail: unable to thumbnail kgdev.jpg
vips_colourspace: no known route from 'cmyk' to 'srgb'
```

If you supply a CMYK profile, it will be able to convert the image,
for example:

```
$ vipsthumbnail kgdev.jpg --iprofile cmyk
$ vipsthumbnail kgdev.jpg --iprofile /my/profiles/a98.icm
```

(As before, the magic string `cmyk` selects a high-quality CMYK profile that's
built into libvips, but you can use any CMYK profile you like.)

# Final suggestion

Putting all this together, I suggest this as a sensible set of options:
Expand All @@ -309,6 +306,5 @@ Putting all this together, I suggest this as a sensible set of options:
$ vipsthumbnail fred.jpg \
--size 128 \
--eprofile srgb \
-o tn_%s.jpg[optimize_coding,strip] \
--eprofile srgb
-o tn_%s.jpg[optimize_coding,strip]
```

0 comments on commit f2956ac

Please sign in to comment.