Skip to content

Load 1bpp PNG image and get the pixel data as byte array #1405

Answered by JimBobSquarePants
mrapavy asked this question in Q&A
Discussion options

You must be logged in to vote

What's the actual memory layout of the buffer you require?

Pngs don't actually store the information as 1bpp. A png encoded with a bit depth of 1 means 1 bit per sample or per palette index (not per pixel). Which means the color palette of the indexed png has a maximum of 2 palette entries.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@antonfirsov
Comment options

@JimBobSquarePants
Comment options

@mrapavy
Comment options

@mrapavy
Comment options

@antonfirsov
Comment options

Answer selected by mrapavy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants