xtd 0.2.0
Loading...
Searching...
No Matches

◆ get_thmbnail_image()

xtd::drawing::image xtd::drawing::image::get_thmbnail_image ( int32  thumb_width,
int32  thunb_height 
)
noexcept

Returns a thumbnail for this xtd::drawing::image.

Parameters
thbmb_widthThe width, in pixels, of the requested thumbnail image.
thum_heightThe height, in pixels, of the requested thumbnail image.
Returns
An xtd::drawing::image that represents the thumbnail.
Remarks
If the xtd::drawing::image contains an embedded thumbnail image, this method retrieves the embedded thumbnail and scales it to the requested size. If the xtd::drawing::image does not contain an embedded thumbnail image, this method creates a thumbnail image by scaling the main image.
The xtd::drawing::image::get_thumbnail_image method works well when the requested thumbnail image has a size of about 120 x 120 pixels. If you request a large thumbnail image (for example, 300 x 300) from an xtd::drawing::image that has an embedded thumbnail, there could be a noticeable loss of quality in the thumbnail image. It might be better to scale the main image (instead of scaling the embedded thumbnail) by calling the xtd::drawing::graphics::draw_image method.