Hi there. This is for my 8-bit setup, how can I read the 8-bit indices? (bytes) for the pixels?
Edit: I see you convert the raw data immediately. In order to stay API compliant, perhaps a AsepriteImageCelRaw (if requested by a flag?), that or store a 'RawData' (though that would need more memory, perhaps behind a flag).
Edit Edit: Perhaps maybe even a AsepriteReaderOptions class that has "RawData" bool flag, and a "PermultipliedAlpha" bool flag too (so that future options could be expanded).
It's that or you hijack Rgba32[] and map it to ReadOnlySpan<byte>, but then you're forced into the 4 byte pixels. Which won't work in the future if there's ever a higher RGBA bit depth (unless you change it to Rgba64 or something but you're playing cat and mouse at that point)
It would've been neat if the raw data was kept instead of Rgba32[], and converting to pixels would be done on extension helper methods and processing like the current setup. This way one could still read the file and keep all the original data and have access to it, allowing them to do what they like.
Hi there. This is for my 8-bit setup, how can I read the 8-bit indices? (bytes) for the pixels?
Edit: I see you convert the raw data immediately. In order to stay API compliant, perhaps a AsepriteImageCelRaw (if requested by a flag?), that or store a 'RawData' (though that would need more memory, perhaps behind a flag).
Edit Edit: Perhaps maybe even a
AsepriteReaderOptionsclass that has "RawData" bool flag, and a "PermultipliedAlpha" bool flag too (so that future options could be expanded).It's that or you hijack
Rgba32[]and map it toReadOnlySpan<byte>, but then you're forced into the 4 byte pixels. Which won't work in the future if there's ever a higher RGBA bit depth (unless you change it to Rgba64 or something but you're playing cat and mouse at that point)It would've been neat if the raw data was kept instead of
Rgba32[], and converting to pixels would be done on extension helper methods and processing like the current setup. This way one could still read the file and keep all the original data and have access to it, allowing them to do what they like.