IImageRecompress::RecompressImage method
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
- psi [in]
-
Type: IShellItem*
A pointer to the object containing the stream of the image to read.
- cx [in]
-
Type: int
The x dimension of the image to return.
- cy [in]
-
Type: int
The y dimension of the image to return.
- iQuality [in]
-
Type: int
An indication of recompression quality that can range from 0 to 100.
- pstg [in]
-
Type: IStorage*
A pointer to an IStorage interface on the object that contains the stream to be written to.
- ppstrmOut [in, out]
-
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
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also