Lokathor/imagine

[png] Allocating "automatic" parser for PNG files

Closed this issue · 1 comments

We probably want a few possible top level functions here:

  • Get he "direct" data. This involves many option values, and probably different enums because of different pixel formats, and so on. Or maybe you get a Vec and that's good enough because you just cast the slice when you need it? In that case what to do we do about 16-bit channels? Turn them to native-endian maybe and the cast will just work out?
  • Get the RGB8, "somehow". In this case, we upscale lower channel/depth things. If there's an alpha channel, perhaps we blend the image over top of an imagined background and then give the RGB of the composite?
  • Get the RGBA8, upscale stuff, whatever it takes.

Output data is probably:

  • width
  • height
  • pixels
  • colorspace info (usually srgb, but not always)
  • ??? do we need more?

in 0.1