Skip to content
Hello World Writer edited this page Dec 5, 2018 · 4 revisions

Welcome to the Thumbico CLI wiki!

The wiki is still in its infancy. Feel free to clone and contribute to this wiki, and open issues or pull requests on the main repository!

Description

Thumbico CLI is a tiny and portable command-line tool that generates and saves custom sized thumbnails or icons for any file, image, document, video, program, directory, and more. The default behavior is to generate a thumbnail. If there is no thumbnail for the specified item, Thumbico CLI saves the icon of the item. The thumbnail or icon is extracted if it is not currently cached by the Windows shell. You can decide to generate only thumbnails, or only icons, by passing the appropriate flags.

Usage

thumbicocli [options] [flags] [file ...]

[file ...]
Specifies one or more files or directories. Wildcards are not yet implemented, but you can use pipes to connect the standard output of built-in file search or listing commands that support wildcards, such as WHERE or DIR (see Examples below).

Options

-w=<px>, --width=<px>
The requested width of the thumbnail/icon in pixels. The actual image may have a different width depending on the specified flags and/or the image aspect ratio. [default: 256]

-h=<px>, --height=<px>
The requested height of the thumbnail/icon in pixels. The actual image may have a different height depending on the specified flags and/or the image aspect ratio. [default: 256]

-d=DIR, --outdir=DIR
Directory where the thumbnails/icons will be saved. If no value is specified, images will be saved in the directory of the source file.

-n=NAME, --outname=NAME
The output file name or name template, that can contain the following placeholders: {n} that is replaced with the source file name, {e} with the source file extension, {w} with the image width, {h} with the image height.

-f, --format=value
The image format of the generated thumbnails/icons: bmp, gif, jpg, png, or tiff.

Flags

Thumbnail/icon generation flags used to call the Windows API:

-rf, --ResizeToFit
Shrink the bitmap as necessary to fit, preserving its aspect ratio.

-bs, --BiggerSizeOk
Passed by callers if they want to stretch the returned image themselves. For example, if the caller passes an icon size of 80x80, a 96x96 thumbnail could be returned. This action can be used as a performance optimization if the caller expects that they will need to stretch the image.

-mo, --MemoryOnly
Return the item only if it is already in memory. Do not access the disk even if the item is cached. Note that this only returns an already-cached icon and can fall back to a per-class icon if an item has a per-instance icon that has not been cached.

-io, --IconOnly
Return only the icon, never the thumbnail.

-to, --ThumbnailOnly
Return only the thumbnail, never the icon. Note that not all items have thumbnails, so this parameter will cause the program to fail in these cases.

-co, --InCacheOnly
Allows access to the disk, but only to retrieve a cached item. This returns a cached thumbnail if it is available. If no cached thumbnail is available, it returns a cached per-instance icon but does not extract a thumbnail or icon.

-cs, --CropToSquare
If necessary, crop the bitmap to a square. (Introduced in Windows 8)

-wt, --WideThumbnails
Stretch and crop the bitmap to a 0.7 aspect ratio. (Introduced in Windows 8)

-ib, --IconBackground
If returning an icon, paint a background using the associated app's registered background color. (Introduced in Windows 8)

-su, --ScaleUp
If necessary, stretch the bitmap so that the height and width fit the given size. (Introduced in Windows 8)

Examples

thumbicocli movie.mp4

Gets a thumbnail or icon for the movie.mp4 file, with the default size of 256 x 256 pixels, and saves it in the current directory, as movie.mp4_thumbicon.png.

thumbicocli mockup.png screenshot.png -w=512 -h=512

Gets thumbnails or icons for the specified files, with a requested size of 512 x 512 pixels, and saves them to the current directory, as mockup.png_thumbicon.png and screenshot.png_thumbicon.png.

thumbicocli C:\Temp\holiday.jpg -f=jpg

Gets a thumbnail or icon for the specified file, with the default size of 256 x 256 pixels, and saves it in the same directory, as the source file as C:\Temp\holiday.jpg_thumbicon.jpg, in JPEG format.

where /R d:\Downloads *.exe | thumbicocli -d=thumbs

Uses the WHERE builtin Windows command to locate all executable files in the specified directory and all its sub-directories, and sends them as input to Thumbico CLI, that will make and save their thumbicons in the thumbs subdirectory of the current directory.

where /R c:\Users\Public\Pictures * | thumbicocli -w=1024 -d=c:\thumbnails -n={n}-{w}x{h} -f=tiff -ThumbnailOnly

Uses the WHERE builtin Windows command to locate all files in the specified directory and all its sub-directories, and sends them as input to Thumbico CLI, that will generate their thumbnails in the c:\thumbnails directory, with a requested width of 1024 and a default requested height of 256, in TIFF format. Sample thumbnail name: nature-550x1024.tiff

Clone this wiki locally