ImageTaskBaseTThumbnail Method
Smartly generates a thumbnail from the current image. This method is optimized for thumbnails so
you should prefer it over
Resize(Int32, Int32, ResizeMode),
ResizeWidth(Int32, ResizeMode) or
ResizeHeight(Int32, ResizeMode)
methods. This command should be the first one in the chain.
Most image formats (Jpg, Tiff, Psd and Camera Raw files) can have EXIF thumbnails so this method
will first try to read that image from EXIF metadata, remove black stripes above and below it and
resize it down further if needed. This will ensure very fast performance when your whole purpose is generating thumbnails.
Only if there is no thumbnail in metadata or the thumbnail is smaller than the requested size,
the thumbnail will be created by resizing the original image as usual.
EXIF thumbnails are typically in size 160x120.
Namespace: GleamTech.ImageUltimateAssembly: GleamTech.ImageUltimate (in GleamTech.ImageUltimate.dll) Version: 6.3.0
public T Thumbnail(
int width,
int height = 0
)
Public Function Thumbnail (
width As Integer,
Optional height As Integer = 0
) As T
- width Int32
-
The desired width of the resulting image.
If value is 0, width will be automatically calculated to preserve aspect ratio.
Otherwise width will be considered maximum value so the resulting width may be
smaller than the given one to maintain the aspect ratio.
- height Int32 (Optional)
-
The desired height of the resulting image.
If value is 0, height will be automatically calculated to preserve aspect ratio.
Otherwise height will be considered maximum value so the resulting height may be
smaller than the given one to maintain the aspect ratio.
TThe same instance of this class.
All modern cameras write EXIF metadata when capturing
an image most cameras save a thumbnail to the EXIF block. When a camera creates an EXIF thumbnail it
fixes its size to the default industry size 160x120 pixels independently of an original image dimensions.
Thus, it is possible that proportions of an original image and its thumbnail will be different for some
camera types. If so the thumbnail will have black stripes above and below it, fortunately this method
automatically removes those black stripes for offering you the best thumbnail out of the box.
Besides digital photos, also software like Photoshop can store EXIF thumbnails when saving some formats
(eg. Psd, Jpg, Tiff). For example, instead of merging layers of a Psd file by using the already available
preview thumbnail in the file this method will run very quickly.