Skip to content

Read pixels

Read the values of pixels on the screen.

Authors and contributors to this community extension: Bouh.


This extension allow to read pixels on screen.

Expression Argument Type returned
ReadPixelRed(x, y) position x: number, position y: number number (0-255)
ReadPixelGreen(x, y) position x: number, position y: number number (0-255)
ReadPixelBlue(x, y) position x: number, position y: number number (0-255)
ReadPixelAlpha(x, y) position x: number, position y: number number (0-255)

Tip

Learn how to install new extensions by following a step-by-step guide.

Expressions

Expression Description
ReadPixels::ReadPixelAlpha() Return the alpha component of the pixel at the specified position.
ReadPixels::ReadPixelBlue() Return the blue component of the pixel at the specified position.
ReadPixels::ReadPixelGreen() Return the green component of the pixel at the specified position.
ReadPixels::ReadPixelRed() Return the red component of the pixel at the specified position.

This page is an auto-generated reference page about the Read pixels extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.