IBitmapPicture: Difference GetBytesInRow/GetOffsetY


Clarify the difference between methods GetBytesInRow and GetOffsetY. Please note that
int Picture::GetOffsetY() const
return GetBytesInRow();
Add corresponding comment to the header.


wladik wrote Dec 28, 2010 at 7:04 AM

Added comments to the methods: GetOffsetX, GetOffsetY, GetBytesInRow

Vladimir35 wrote Dec 28, 2010 at 7:46 PM

Can the following happen?
GetOffsetY() != GetBytesInRow()
Under which conditions?

wladik wrote Dec 29, 2010 at 5:50 AM

The method GetBytesInRow() returns value in bytes
The method GetOffsetY() returns value in color components. For 24-bit RGB, the color component is also one byte, and both methods return the same number.
If in the future there will be need to support for example 48-bit RGB format, then these two methods would be different because the color component occupies two bytes. (GUID_WICPixelFormat48bppRGB)

wrote Dec 30, 2010 at 10:57 AM

wrote Feb 14, 2013 at 1:39 AM

wrote May 16, 2013 at 6:56 AM