Open TuomLarsen opened 7 years ago
Is this a proposal to add support for it to the standard library? If so I doubt this meets the high bar set for inclusion in the standard library.
On the other hand, if this is a proposal for inclusion into the "golang.org/x/image" repo, that is far more plausible.
CC @nigeltao
As a feature request, I suppose it's a valid feature request.
Whether or not it lives in image or x/image depends on how much code it would share or not share with the existing image/jpeg package. You mention the JPEG parser (which is trivial) and the Huffman coding (less trivial), but on a quick skim, the https://en.wikipedia.org/wiki/Lossless_JPEG page says that "Lossless JPEG... [uses] a completely different technique from the lossy JPEG standard".
Either way, though, I really don't have any spare time to work on this myself. If you want to try doing this yourself, I would suggest starting by forking the standard library's image/jpeg code. It'd be easier to make the image vs x/image decision after we have at least a rough proof of concept implementation to look at.
It will be an interesting side project!
I've un-proposaled this. If somebody wants to write code, then we can consider where it lives.
If nobody is working on this I'll absorb the task.
Is there any plan or progress to support Lossless JPEG
either image or x/image?
No plans. I still don't have any spare time and I don't know of anyone else working on it.
Try this : https://github.com/jamesshenjian/jpegsl , a simple decoder implemented in go. Any problem please let me know.
Please consider adding support for Lossless JPEG (SOF3, aka LJPEG). This format is used in medical imaging (DICOM) and RAW files of digital cameras (DNG). An argument for this to be in standard library is that most of the required parts are already in place (JPEG parser, Huffman coding), whereas an external library would need to replicate those private methods.