Open ibaryshnikov opened 4 years ago
The ljpeg decoder is used by several raw formats. There's no code in rawloader that wasn't put in to handle a specific sample file. If you have a file that needs decode_ljpeg_1components
then that needs to be added.
As for making it autonomous I have no problem with that. Maybe putting that into a different crate so it's useful to other people would be good. The extra work in doing that is getting a good stable API. Right now it's just an internal rawloader API that can be changed at any time.
There's a ljpeg decoder here, but it's not exposed and not used in any way yet https://github.com/pedrocr/rawloader/blob/master/src/decoders/mod.rs#L73
Is it possible to make it public? This decoder is unique because at the moment it's the only library in pure rust able to decode lossless jpeg. As a result, it's usable in webassembly context.
In addition, there's a
decode_ljpeg_2components
, but nodecode_ljpeg_1components
. I made a simple version ofdecode_ljpeg_1components
function, would you mind reviewing it if I submit a pr?