2011-07-26 10:27:06 +02:00
|
|
|
.TH VIPSTHUMBNAIL 1 "13 May 2010"
|
|
|
|
.SH NAME
|
|
|
|
vipsthumbnail \- make thumbnails of image files
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B vipsthumbnail [flags] imagefile1 imagefile2 ...
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B vipsthumbnail(1)
|
|
|
|
processes each
|
|
|
|
.B imagefile
|
|
|
|
in turn, shrinking each image to fit within a 128 by 128 pixel square.
|
|
|
|
The shrunk image is written to a new file named
|
|
|
|
.B tn_imagefile.jpg.
|
|
|
|
This program is typically faster and uses less memory than
|
|
|
|
other image thumbnail programs.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
$ vipsthumbnail fred.png jim.tif
|
|
|
|
|
|
|
|
will read image files
|
|
|
|
.B fred.png
|
|
|
|
and
|
|
|
|
.B jim.tif
|
|
|
|
and write thumbnails to the files
|
|
|
|
.B tn_fred.jpg
|
|
|
|
and
|
|
|
|
.B tn_jim.jpg.
|
|
|
|
|
2017-01-06 14:43:43 +01:00
|
|
|
$ vipsthumbnail --size=64 -o thumbnails/%s.png fred.jpg
|
2011-07-26 10:27:06 +02:00
|
|
|
|
|
|
|
will read image file
|
|
|
|
.B fred.jpg
|
|
|
|
and write a 64 x 64 pixel thumbnail to the file
|
|
|
|
.B thumbnails/fred.png.
|
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
|
|
.B -s N, --size=N
|
|
|
|
Set the output thumbnail size to
|
|
|
|
.B N
|
|
|
|
x
|
|
|
|
.B N
|
2017-01-06 15:01:55 +01:00
|
|
|
pixels.
|
|
|
|
|
|
|
|
You can use "MxN" to specify a rectangular bounding box.
|
2013-10-23 10:37:45 +02:00
|
|
|
The image is shrunk so that it just fits within this area, images
|
2017-01-06 15:01:55 +01:00
|
|
|
which are smaller than this are expanded.
|
|
|
|
|
|
|
|
Use "xN" or "Mx" to just resize on
|
|
|
|
one axis.
|
|
|
|
|
|
|
|
Append "<" to only resize if the input image is smaller than the
|
2017-01-06 14:43:43 +01:00
|
|
|
target, append ">" to only resize if the input image is larger than the target.
|
2011-07-26 10:27:06 +02:00
|
|
|
|
|
|
|
.TP
|
2017-01-06 14:43:43 +01:00
|
|
|
.B -o FORMAT, --output=FORMAT
|
2011-07-26 10:27:06 +02:00
|
|
|
Set the output format string. The input filename has any file type suffix
|
|
|
|
removed, then that value is substitued into
|
|
|
|
.B FORMAT
|
|
|
|
replacing
|
2017-01-06 15:01:55 +01:00
|
|
|
.B %s.
|
|
|
|
If
|
2015-01-11 10:48:38 +01:00
|
|
|
.B FORMAT
|
|
|
|
is a relative path, the name of the input directory is prepended. In other
|
|
|
|
words, any path in
|
|
|
|
.B FORMAT
|
|
|
|
is relative to the directory of the current input file.
|
|
|
|
|
2011-07-26 10:27:06 +02:00
|
|
|
The default value is
|
|
|
|
.B tn_%s.jpg
|
|
|
|
meaning JPEG output, with
|
|
|
|
.B tn_
|
|
|
|
prepended. You can add format options too, for example
|
2013-10-22 18:12:50 +02:00
|
|
|
.B tn_%s.jpg[Q=20]
|
2011-07-26 10:27:06 +02:00
|
|
|
will write JPEG images with Q set to 20.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B -e PROFILE, --eprofile=PROFILE
|
|
|
|
Export thumbnails with this ICC profile. Images are only colour-transformed if
|
|
|
|
there is both an output and an input profile available. The input profile can
|
|
|
|
either be embedded in the input image or supplied with the
|
|
|
|
.B --iprofile
|
|
|
|
option.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B -i PROFILE, --iprofile=PROFILE
|
|
|
|
Import images with this ICC profile, if no profile is embdedded in the image.
|
|
|
|
Images are only colour-transformed if
|
|
|
|
there is both an output and an input profile available. The output profile
|
|
|
|
should be supplied with the
|
|
|
|
.B --oprofile
|
|
|
|
option.
|
|
|
|
|
2013-11-12 10:53:41 +01:00
|
|
|
.TP
|
2013-12-18 15:29:59 +01:00
|
|
|
.B -c, --crop
|
|
|
|
Crop the output image down. The image is shrunk so as to completely fill the
|
|
|
|
bounding box in both axies, then any excess is cropped off.
|
2013-11-12 10:53:41 +01:00
|
|
|
|
2011-07-26 10:27:06 +02:00
|
|
|
.TP
|
2013-05-03 14:56:38 +02:00
|
|
|
.B -d, --delete
|
|
|
|
Delete the output profile from the image. This can save a small amount of
|
|
|
|
space.
|
2011-07-26 10:27:06 +02:00
|
|
|
|
|
|
|
.TP
|
2017-01-06 14:43:43 +01:00
|
|
|
.B -t, --rotate
|
|
|
|
Auto-rotate images using EXIF orientation tags.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B -a, --linear
|
|
|
|
Shrink images in linear light colour space. This can be much slower.
|
2011-07-26 10:27:06 +02:00
|
|
|
|
|
|
|
.SH RETURN VALUE
|
2015-01-13 18:31:09 +01:00
|
|
|
returns 0 on success and non-zero on error. Error can mean one or more
|
|
|
|
conversions failed.
|
|
|
|
|
2011-07-26 10:27:06 +02:00
|
|
|
.SH SEE ALSO
|
2014-06-24 15:19:57 +02:00
|
|
|
vipsheader(1)
|