Επεξεργασία

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


IImageRecompress::RecompressImage method (shobjidl.h)

Recompresses an image. Implemented in an ImageRecompress object, this method accepts x and y dimensions with a designation of quality. The method creates a stream containing the new image that has been recompressed to the specified size.

Syntax

HRESULT RecompressImage(
  [in]      IShellItem *psi,
  [in]      int        cx,
  [in]      int        cy,
  [in]      int        iQuality,
  [in]      IStorage   *pstg,
  [in, out] IStream    **ppstrmOut
);

Parameters

[in] psi

Type: IShellItem*

A pointer to the object containing the stream of the image to read.

[in] cx

Type: int

The x dimension of the image to return.

[in] cy

Type: int

The y dimension of the image to return.

[in] iQuality

Type: int

An indication of recompression quality that can range from 0 to 100.

[in] pstg

Type: IStorage*

A pointer to an IStorage interface on the object that contains the stream to be written to.

[in, out] ppstrmOut

Type: IStream**

The address of an IStream interface pointer variable that receives the output stream written to.

Return value

Type: HRESULT

Returns S_OK if successful, or a COM-defined error code otherwise. If the image in the input stream is less than the size specified by cx and cy, then S_FALSE is returned.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shobjidl.h
DLL Shimgvw.dll

See also

IImageRecompress

IShellItem

ImageRecompress