IBitmapDataRowSize Property

Gets the size of a row in bytes, or zero, if this IBitmapData instance does not have an actual raw buffer to access.


Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.1.0
int RowSize { get; }

Property Value



This property can be useful when accessing the bitmap data by the ReadRaw or WriteRaw methods.

As IBitmapData can represent any custom bitmap data, row size is not guaranteed to be a multiple of 4.


This property can return 0 if the current IBitmapData instance represents a bitmap data without actual raw data or represents a clipped region where the left edge of the clipping has an offset compared to the original bitmap data.

Even if this property returns a nonzero value, it is possible that raw access does not cover the few last columns. This may occur in case of indexed PixelFormats if the bitmap data is clipped and the right edge of the clipping does not fall at byte boundary.

See Also