Skip to content

proposal: image: add (*Uniform).SubImage #71463

@hajimehoshi

Description

@hajimehoshi

Proposal Details

I propose to add SubImage method to image.Uniform, like other image types. SubImage takes a rectangle as a bound and returns an image.Image value. The underlying value of the returned value is a Uniform image with bounds, so we would need to add a (hidden) new member representing bounds to Uniform.

This is useful when I want to create a color-filled image and encode this as a PNG image for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions