Hacker News new | ask | show | jobs
by randy408 2489 days ago
A 3-byte layout can be worse for performance, I think the simplest solution would be to add a special format that always matches the PNG's format, that way you always get RGB from RGB images, grayscale from grayscale images, etc. This wouldn't require a conversion step.
1 comments

Yeah, generally if the PNG file is RGBA, then I want to load as RGBA, and if it's RGB, I want to load as RGB.