Skip to content

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

@logica0419

Description

@logica0419

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions