note improvements to iprofile

The docs had fallen behind a bit ... iprofile is no longer usually necessary.

see https://github.com/libvips/libvips/issues/1843
This commit is contained in:
John Cupitt 2020-10-02 11:20:35 +01:00
parent c27c471e28
commit f2956ac069

View File

@ -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
@ -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'
$ vipsthumbnail kgdev.jpg --iprofile /my/profiles/a98.icm
```
If you supply a CMYK profile, it will be able to convert the image,
for example:
```
$ vipsthumbnail kgdev.jpg --iprofile cmyk
```
(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:
@ -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]
```