Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Development
Graphics
Reference
Interfaces
IWICBitmapScaler
IWICBitmapScaler interface

Applies to: desktop apps | Metro style apps

Represents a resized version of the input bitmap using a resampling or filtering algorithm.

Members

The IWICBitmapScaler interface inherits from IWICBitmapSource. IWICBitmapScaler also has these types of members:

Methods

The IWICBitmapScaler interface has these methods.

MethodDescription
Initialize

Initializes the bitmap scaler with the provided parameters.

 

Remarks

Images can be scaled to larger sizes; however, even with sophisticated scaling algorithms, there is only so much information in the image and artifacts tend to worsen the more you scale up.

The scaler will reapply the resampling algorithm every time CopyPixels is called. If the scaled image is to be animated, the scaled image should be created once and cached in a new bitmap, after which the IWICBitmapScaler may be released. In this way the scaling algorithm - which may be computationally expensive relative to drawing - is performed only once and the result displayed many times.

The scaler is optimized to use the minimum amount of memory required to scale the image correctly. The scaler may be used to produce parts of the image incrementally (banding) by calling CopyPixels with different rectangles representing the output bands of the image. Resampling typically requires overlapping rectangles from the source image and thus may need to request the same pixels from the source bitmap multiple times. Requesting scanlines out-of-order from some image decoders can have a significant performance penalty. Because of this reason, the scaler is optimized to handle consecutive horizontal bands of scanlines (rectangle width equal to the bitmap width). In this case the accumulator from the previous vertically adjacent rectangle is re-used to avoid duplicate scanline requests from the source. This implies that banded output from the scaler may have better performance if the bands are requested sequentially. Of course if the scaler is simply used to produce a single rectangle output, this concern is eliminated because the scaler will internally request scanlines in the correct order.

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista

Minimum supported server

Windows Server 2008

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

 

 

Send comments about this topic to Microsoft

Build date: 3/14/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker