June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to draw a scaled-down version of a larger image.
Use the Image.GetThumbnailImage method, and specify the size of thumbnail that you want.
The Image class provides the built-in smarts for generating thumbnails through the GetThumbnailImage method. You simply need to pass the width and height of the thumbnail you want, and the Image class will create a new Image object that fits these criteria. Antialiasing is used when reducing the image to ensure the best possible image quality, although some blurriness and loss of detail is inevitable. In addition, you can supply a notification callback, allowing you to create thumbnails asynchronously.
The following code generates a 50-by-50-pixel thumbnail: ...
Read now
Unlock full access