VIPSTHUMBNAIL(1) | General Commands Manual | VIPSTHUMBNAIL(1) |
vipsthumbnail - make thumbnails of image files
vipsthumbnail [flags] imagefile1 imagefile2 ...
vipsthumbnail(1) processes each 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 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 fred.png and jim.tif and write thumbnails to the files tn_fred.jpg and tn_jim.jpg.
$ vipsthumbnail --size=64 -o thumbnails/%s.png fred.jpg
will read image file fred.jpg and write a 64 x 64 pixel thumbnail to the file thumbnails/fred.png.
You can use "MxN" to specify a rectangular bounding box. The image is shrunk so that it just fits within this area, images 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 target, append ">" to only resize if the input image is larger than the target.
The default value is tn_%s.jpg meaning JPEG output, with tn_ prepended. You can add format options too, for example tn_%s.jpg[Q=20] will write JPEG images with Q set to 20.
returns 0 on success and non-zero on error. Error can mean one or more conversions failed.
13 May 2010 |