Open avalanche1 opened 9 years ago
I've done some research for another project. Tricky, but surprised no one transposed existing C code over.
Here is a PJEG splitter: https://gist.github.com/Hodapp87/9220146
Interesting. Will ask someone with C exp to replicate that in JS; when I have that someone)
I'm no progressive jpeg expert (@patrickhulce have you looked into this?) however from the look of that code @tomByrer it looks like it's more related to decoding a progressive jpeg into separate slices? whereas if I understand your question correctly @avalanche1 you want to take an arbitrary image data array and encode it as a progressive jpeg?
I'm not really sure how complex this would be, but we'd welcome ideas or even a pull request!
Encoding is slightly more hairy then decoding IMO, I haven't spent any time digging in to it. It might be worth establishing some goals of the project or at least guidelines for deciding if an aspect of JPEG should be worth maintaining here? Progressive encoding probably makes the cut, but the realm of possibilities is quite large and we have limited time :)
It doesn't help that there don't seem to be any real progressive encoding solutions out there already in pure-javascript land! 😢
Encoding is slightly more hairy then decoding IMO
Probably correct if you don't hardcode the scans. Thanks for getting the decoding in @eugeneware!
Might be better as an 'plugin' or external include
, since the code is unlikely to be used by all & likely to be sizable.
research notes: http://cloudinary.com/blog/progressive_jpegs_and_green_martians
Is it hard to implement? My proj does image manipulation client-side and it would be nice to be able to encode progressive jpegs.