Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 4.35 KB

nf-wincodec-iwicbitmapsource-copypixels.md

File metadata and controls

108 lines (78 loc) · 4.35 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wincodec.IWICBitmapSource.CopyPixels
IWICBitmapSource::CopyPixels (wincodec.h)
Instructs the object to produce pixels.
CopyPixels
CopyPixels method [Windows Imaging Component]
CopyPixels method [Windows Imaging Component]
IWICBitmapSource interface
IWICBitmapSource interface [Windows Imaging Component]
CopyPixels method
IWICBitmapSource.CopyPixels
IWICBitmapSource::CopyPixels
_wic_codec_iwicbitmapsource_copypixels
wic._wic_codec_iwicbitmapsource_copypixels
wincodec/IWICBitmapSource::CopyPixels
wic\_wic_codec_iwicbitmapsource_copypixels.htm
wic
d4908a75-e7de-4b8f-bdc8-d86cf6b49f8c
12/05/2018
CopyPixels, CopyPixels method [Windows Imaging Component], CopyPixels method [Windows Imaging Component],IWICBitmapSource interface, IWICBitmapSource interface [Windows Imaging Component],CopyPixels method, IWICBitmapSource.CopyPixels, IWICBitmapSource::CopyPixels, _wic_codec_iwicbitmapsource_copypixels, wic._wic_codec_iwicbitmapsource_copypixels, wincodec/IWICBitmapSource::CopyPixels
wincodec.h
Windows
Windows XP with SP2, Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Wincodec.idl
Windowscodecs.lib
Windowscodecs.dll
Windows
19H1
IWICBitmapSource::CopyPixels
wincodec/IWICBitmapSource::CopyPixels
c++
APIRef
kbSyntax
COM
Windowscodecs.dll
IWICBitmapSource.CopyPixels

IWICBitmapSource::CopyPixels

-description

Instructs the object to produce pixels.

-parameters

-param prc [in]

Type: const WICRect*

The rectangle to copy. A NULL value specifies the entire bitmap.

-param cbStride [in]

Type: UINT

The stride of the bitmap

-param cbBufferSize [in]

Type: UINT

The size of the buffer.

-param pbBuffer [out]

Type: BYTE*

A pointer to the buffer.

-returns

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

CopyPixels is one of the two main image processing routines (the other being Lock) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a JPEG stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface.

The caller can restrict the operation to a rectangle of interest (ROI) using the prc parameter. The ROI sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a NULL ROI implies that the whole bitmap should be returned.

The caller controls the memory management and must provide an output buffer (pbBuffer) for the results of the copy along with the buffer's bounds (cbBufferSize). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method.

If the caller needs to perform numerous copies of an expensive IWICBitmapSource such as a JPEG, it is recommended to create an in-memory IWICBitmap first.

Codec Developer Remarks

The callee must only write to the first (prc->Width*bitsperpixel+7)/8 bytes of each line of the output buffer (in this case, a line is a consecutive string of cbStride bytes).