Thumbnail

Thumbnail[image]

gives a thumbnail version of an image.

Thumbnail[file]

gives a thumbnail of an image stored in a file.

Thumbnail[url]

gives a thumbnail of an image stored at a URL.

Thumbnail[spec,size]

gives a thumbnail with the specified maximum pixel size.

Details and Options

  • Thumbnail can be used to create a small rendering of an image.
  • In Thumbnail[image], image can be any arbitrary 2D or 3D image.
  • When applied to color images, Thumbnail always returns an RGB image.
  • In Thumbnail[file], file can be File["filename"] or "filename".
  • In Thumbnail[url], url can be URL["url"] or "url".
  • Images in files or at URLs can be in any format supported by Import.
  • For image formats such as JPEG, PNG, and TIFF that allow tiling, Thumbnail reads only necessary portions of files, allowing the creation of thumbnails even for images that would not fit in available memory.
  • For multi-frame images, Thumbnail gives a list of thumbnails, one for each frame.
  • Possible settings for size specification include:
  • nn pixels in width or height
    UpTo[n]up to n pixels in width or height
    Tiny,Small,Medium,Largepredefined sizes
  • If image is smaller than the specified thumbnail size, padding is added around the image. Use Padding to specify the value of the padded pixels.
  • With Padding->None, no padding is added to the small image dimensions.
  • The following options can be given:
  • Background Automaticbackground to use when adding padding
    IncludeMetaInformation Automatictypes of metadata to include
    Padding Automaticpadding scheme to use

Examples

open allclose all

Basic Examples  (2)

Create a thumbnail image of a photo:

Get a thumbnail from a URL:

Scope  (5)

Specify the width of a thumbnail:

Create a tiny thumbnail:

Generate a thumbnail of an out-of-core image:

Import a thumbnail of the URL of a very large image:

Thumbnail of a 3D volume:

Options  (5)

Background  (1)

By default, images are padded with white pixels if they are smaller than the thumbnail size:

Use Background option to specify the padding color:

Avoid padding using Padding->None:

IncludeMetaInformation  (3)

By default, all metadata is imported:

Import the thumbnail without any metadata:

Import the thumbnail with selected set of metadata:

Padding  (1)

Images get padded with white pixels if they are smaller than the thumbnail size:

Use Padding->None to avoid padding:

Specify the background color for padding:

Properties & Relations  (3)

Use ImageResize to create a thumbnail:

Use Import with the ImageSize option to generate a thumbnail:

Thumbnails of images stored in ExampleData can be directly imported:

Wolfram Research (2008), Thumbnail, Wolfram Language function, https://reference.wolfram.com/language/ref/Thumbnail.html (updated 2016).

Text

Wolfram Research (2008), Thumbnail, Wolfram Language function, https://reference.wolfram.com/language/ref/Thumbnail.html (updated 2016).

CMS

Wolfram Language. 2008. "Thumbnail." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/Thumbnail.html.

APA

Wolfram Language. (2008). Thumbnail. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Thumbnail.html

BibTeX

@misc{reference.wolfram_2024_thumbnail, author="Wolfram Research", title="{Thumbnail}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/Thumbnail.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_thumbnail, organization={Wolfram Research}, title={Thumbnail}, year={2016}, url={https://reference.wolfram.com/language/ref/Thumbnail.html}, note=[Accessed: 21-November-2024 ]}