Skip to content

raylib.GetPixelDataSize

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get pixel data size in bytes for certain format NOTE: Size can be requested for Image or Texture data

Parameters

Parameter Default Value Note
width
height
format

Return value

Condition Return Value
(always) number

Notes

Example

// How many bytes does a 64x64 RGBA image require?
n = raylib.GetPixelDataSize(64, 64, raylib.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
print n  // 16384 (64 * 64 * 4)

Clone this wiki locally