Επεξεργασία

Κοινή χρήση μέσω


IShellImageData::Scale method (shimgdata.h)

Adjusts the size of an image.

Syntax

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

Parameters

[in] cx

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.

[in] cy

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.

[in] hints

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 code Description
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

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shimgdata.h
DLL Shell32.dll