Skip to content

Add PixelBuffer#to_bytes for zero-overhead pixel access#2387

Open
querielo wants to merge 1 commit into
KLayout:masterfrom
querielo:kirill/pixelbuffer-to-bytes
Open

Add PixelBuffer#to_bytes for zero-overhead pixel access#2387
querielo wants to merge 1 commit into
KLayout:masterfrom
querielo:kirill/pixelbuffer-to-bytes

Conversation

@querielo

@querielo querielo commented Jul 6, 2026

Copy link
Copy Markdown

Exposes a GSI method on tl::PixelBuffer that returns the raw ARGB32 contents as a byte vector (4 bytes per pixel, row-major, top to bottom) via a single memcpy. Unlike to_png_data this skips all image encoding, which is useful when the caller just wants direct pixel data.

Exposes a GSI method on tl::PixelBuffer that returns the raw ARGB32
contents as a byte vector (4 bytes per pixel, row-major, top to bottom)
via a single memcpy. Unlike to_png_data this skips all image encoding,
which is useful when the caller just wants direct pixel data.
@querielo querielo changed the title Add PixelBuffer#to_bytes for zero-overhead RGBA pixel access Add PixelBuffer#to_bytes for zero-overhead pixel access Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant