IShellImageData::Scale method

Adjusts the size of an image.

Syntax


HRESULT Scale(
  [in]  ULONG cx,
  [in]  ULONG cy,
  [in]  InterpolationMode hints
);

Parameters

cx [in]

Type: ULONG

The horizontal (x) dimension. If this value is 0, the x dimension is set to a scaled value based on the point specified in cy.

cy [in]

Type: ULONG

The vertical (y) dimension. If this value is 0, the y dimension is set to a scaled value based on the point specified in cx.

hints [in]

Type: InterpolationMode

A member of the InterpolationMode enumeration, specifying the algorithm that is used when the image is scaled.

Return value

Type: HRESULT

Returns S_OK if successful or an error value otherwise, including the following:

Return codeDescription
E_FAIL

The image was not previously decoded or the call to IShellImageData::Decode failed. Other internal calls also can cause this error to be returned.

E_NOTVALIDFORANIMATEDIMAGE

The image is an animated image and cannot be scaled using this method.

E_OUTOFMEMORY

The internal object cannot be instantiated.

E_ABORT

The process was stopped by the calling application through a registered instance of IShellImageDataAbort.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shimgdata.h

IDL

Shimgdata.idl

DLL

Shell32.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft