
thumbnail Command in Linux
The thumbnail command in Linux creates a thumbnail for a TIFF file. It is a part of the libtiff tools suite and is designed to create TIFF files containing embedded thumbnail images using the SubIFD tag.
Table of Contents
Here is a comprehensive guide to the options available with the thumbnail command −
- Syntax of thumbnail Command
- Options of thumbnail Command
- Examples of thumbnail Command in Linux
- Alternative to thumbnail Command
Syntax of thumbnail Command
The syntax of the thumbnail command in Linux is as follows −
thumbnail [options] input.tiff output.tiff
In the above syntax −
- [options] − used to specify the optional flags to control size and contrast.
- tiff − used to specify the original TIFF image file.
- tiff − used to specify the new TIFF file with the embedded thumbnail inside it.
Options of thumbnail Command
The options of the Linux thumbnail command are listed below −
Option | Description |
---|---|
-w width | Set the width of the thumbnail image. |
-h height | Set the height of the thumbnail image. |
-c curve | Apply a contrast curve to the thumbnail (example: exp50, linear). |
Examples of thumbnail Command in Linux
This section demonstrates how to use the thumbnail command in Linux with examples −
Creating a Thumbnail of a TIFF File
To create a thumbnail of a TIFF file, use the thumbnail command followed by the source file and the output file −
thumbnail sample.tiff thumbnail.tiff
The above command creates a thumbnail with a default size (216Ã274 pixels, grayscale) from the sample.tiff and embeds the thumbnail into the thumbnail.tiff.
Creating a Thumbnail with a Custom Size
By default, the thumbnail command generates a thumbnail of 216x274 pixels. To generate it with a custom size, use the -w and -h options followed by size in pixels −
thumbnail -w 100 -h 75 sample.tiff thumbnail.tiff
Applying Exponential Contrast
Exponential contrast is a method of adjusting an image's brightness and contrast by applying an exponential curve to its pixel values. To apply the exponential contrast, use the -c option −
thumbnail -c exp50 sample.tiff thumbnail.tiff
A list of curves is given below −
Curve | Description |
---|---|
exp50 | 50% exponential curve |
exp60 | 60% exponential curve |
exp70 | 70% exponential curve |
exp80 | 80% exponential curve |
exp90 | 90% exponential curve |
exp | pure exponential curve |
linear | linear curve |
Alternative to thumbnail Command
The thumbnail command from the libtiff tools suite is considered deprecated because it serves a very narrow purpose, embedding grayscale thumbnails in TIFF files using outdated SubIFD structures. With better, actively maintained tools like ImageMagick and FFmpeg available, and the libtiff project archiving its source code, the thumbnail command is no longer maintained or recommended for current workflows.
The convert command is one of the alternative tools to create a thumbnail in Linux −
convert sample.tiff -thumbnail 100x75 thumbnail.tiff

To generate the thumbnail in grayscale, run the following command −
convert sample.tiff -thumbnail 100x75 -colorspace Gray thumbnail.tiff

Conclusion
The thumbnail command in Linux, part of the libtiff tools suite, is used to create a TIFF file with an embedded grayscale thumbnail image. It allows adjusting the thumbnail size and contrast through simple options.
Although it offers basic functionality, the tool is considered outdated and is no longer actively maintained. Modern alternatives like ImageMagick provide more flexible and powerful ways to create and manage thumbnails, making them better choices for current workflows.