Skip to content

ReadPixelFast

Narta Xaymar Dirks edited this page Oct 28, 2026 · 8 revisions

Blitz3DBlitzPlusBlitzBasic

ReadPixelFast

ReadPixelFast:Int32 x:Int32, y:Int32, buffer:Int32=0
Parameter Type Default Description
x Int32 required Horizontal position of the pixel.
y Int32 required Vertical position of the pixel.
buffer Int32 0 The locked buffer to read from. Defaults to the current buffer.

Returns: The color of the pixel, or 0 if the position is outside of the buffer.

Description

Returns the color of a pixel of a locked buffer in the same form as ReadPixel. The buffer has to be locked with LockBuffer.

Differences

  • A buffer that is not locked stops the program with an error message. In the original a position outside of the buffer reads other memory.
  • The buffers that Graphics3D makes with a depth above 32 are read as they are stored: with the depth 30 the number is A2R10G10B10, and with 64 it is ARGB with the upper 8 bits of each channel. ReadPixelFast64 gives all of them. See Color depth.

Related Commands

CopyPixel, CopyPixelFast, ReadPixel, ReadPixel64 〔BlitzLLVM〕, ReadPixelFast64 〔BlitzLLVM〕, WritePixel, WritePixelFast, WritePixelFast64 〔BlitzLLVM〕

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally