Function BlamRendering::DirectX::Utils::GetWICBitmapPixelData

Function Documentation

HRESULT BlamRendering::DirectX::Utils::GetWICBitmapPixelData(IWICBitmap **bitmap, UINT *width, UINT *height, IWICBitmapLock **bitmap_lock, UINT *buffer_size, BYTE **start_address)

Retrieves the pixel data from a WIC bitmap.

Return

S_OK if the image was locked successfully, otherwise will return an error.

Parameters
  • bitmap: - The bitmap to read data from.

  • width: - A pointer to store the width of the bitmap.

  • height: - A pointer to store the height of the bitmap.

  • bitmap_lock: - A pointer to store a lock to the bitmap. Must be released before the image is drawn.

  • buffer_size: - A pointer to store the buffer size of the image data.

  • start_address: - A pointer to set to the start address of the image data.