libvips/man/vipsthumbnail.1
John Cupitt 1b5803af2e new man pages
restored and updated man.1 pages
2011-07-26 09:27:06 +01:00

120 lines
3.1 KiB
Groff

.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.
$ vipsthumbnail --size=64 -o thumbnails/%s.png fred.jpg
will read image file
.B fred.jpg
and write a 64 x 64 pixel thumbnail to the file
.B thumbnails/fred.png.
On Unix machines, vips
will create temporary files in "/tmp" by default. Use the environment variable
TMPDIR to change this location. On Windows, vips uses GetTempPath() to pick a
location, see the MS documentation.
Use the --vips-disc-threshold command-line switch, or the IM_DISC_THRESHOLD
environment variable, to make vipsthumbnail use memory rather than temporary
files.
.SH OPTIONS
.TP
.B -s N, --size=N
Set the output thumbnail size to
.B N
x
.B N
pixels. The image is shrunk so that it just fits within this area, Images
which are smaller than this are expanded.
.TP
.B -o FORMAT, --output=FORMAT
Set the output format string. The input filename has any file type suffix
removed, then that value is substitued into
.B FORMAT
replacing
.B %s.
The default value is
.B tn_%s.jpg
meaning JPEG output, with
.B tn_
prepended. You can add format options too, for example
.B tn_%s.jpg:20
will write JPEG images with Q set to 20.
.TP
.B -p I, --interpolator=I
Resample with interpolator
.B I.
Use
.B vips --list classes
to see a list of valid interpolators. The default is
.B bilinear.
.TP
.B -n, --nosharpen
By default,
.B vipsthumbnail(1)
will sharpen thumbnails slightly to make them look more pleasing. This option
disables this sharpening.
.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.
.TP
.B -l, --nodelete
Don't delete the profile from the output image. Since all output images will
generally have the same profile,
.B vipsthumbnail(1)
will usually delete it. This option leaves the profile inside the image.
.TP
.B -v, --verbose
.B vipsthumbnail(1)
normally runs silently, except for warning and error messages. This option
makes it print a list of the operations it performs on each image.
.SH RETURN VALUE
returns 0 on success and non-zero on error.
.SH SEE ALSO
header(1)