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

proposal: image/jpeg: switch on m.ColorModel() instead of type in Encode() #70612

Closed
logica0419 opened this issue Nov 28, 2024 · 2 comments
Closed
Labels
Milestone

Comments

@logica0419
Copy link

Proposal Details

The image/jpeg package contains TODO comments in the writer.go file mentioning "Switch on m.ColorModel() instead of type":

These TODO comments have been left unresolved for about ten years.

I am considering addressing these comments by implementing a switch statement on m.ColorModel().

Concerns:

  • Are there any specific reasons why these comments have not been addressed for a long time?
  • Should we account for handling *image.Gray16 images while implementing this change?
@gopherbot gopherbot added this to the Proposal milestone Nov 28, 2024
@gabyhelp
Copy link

Related Issues

Related Code Changes

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@logica0419
Copy link
Author

logica0419 commented Nov 28, 2024

I now fully understand the context.
I'll open another issue if I can find a general solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants