Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image: support LJPEG #22535

Open
TuomLarsen opened this issue Nov 1, 2017 · 9 comments
Open

image: support LJPEG #22535

TuomLarsen opened this issue Nov 1, 2017 · 9 comments
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@TuomLarsen
Copy link

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.

@griesemer griesemer changed the title Support of LJPEG Proposal: Support of LJPEG Nov 1, 2017
@gopherbot gopherbot added this to the Proposal milestone Nov 1, 2017
@dsnet
Copy link
Member

dsnet commented Nov 1, 2017

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.

@ianlancetaylor ianlancetaylor changed the title Proposal: Support of LJPEG Proposal: image: support LJPEG Nov 1, 2017
@ianlancetaylor
Copy link
Contributor

CC @nigeltao

@nigeltao
Copy link
Contributor

nigeltao commented Nov 1, 2017

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.

@anfernee
Copy link
Contributor

anfernee commented Nov 2, 2017

It will be an interesting side project!

@rsc rsc changed the title Proposal: image: support LJPEG proposal: image: support LJPEG Nov 6, 2017
@bradfitz bradfitz changed the title proposal: image: support LJPEG image: support LJPEG Nov 13, 2017
@bradfitz bradfitz modified the milestones: Proposal, Unplanned Nov 13, 2017
@bradfitz bradfitz added help wanted NeedsFix The path to resolution is known, but the work has not been done. and removed Proposal labels Nov 13, 2017
@bradfitz
Copy link
Contributor

I've un-proposaled this. If somebody wants to write code, then we can consider where it lives.

@as
Copy link
Contributor

as commented Apr 2, 2018

If nobody is working on this I'll absorb the task.

@bernardopericacho
Copy link

Is there any plan or progress to support Lossless JPEG either image or x/image?

@nigeltao
Copy link
Contributor

nigeltao commented Mar 5, 2021

No plans. I still don't have any spare time and I don't know of anyone else working on it.

@jamesshenjian
Copy link

Try this : https://github.com/jamesshenjian/jpegsl , a simple decoder implemented in go.
Any problem please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

10 participants