Skip to content

image: decode / resize into an existing buffer #8055

Description

@nigeltao
The image/foo packages currently provide foo.Decode functions that allocate a new image
buffer. It would be nice, especially when decoding a moving image, to decode into an
existing buffer.

Also, it would be nice to be able to resize an image during (and not after) decoding,
which can obviously allocate a smaller buffer but can also be faster. Apparently
Imagemagick can do this for JPEGs, and
https://groups.google.com/forum/#!topic/golang-nuts/13Gr_AmBAKY claims a 50% speedup for
generating a thumbnail.

The two concerns are superficially separate, but the API (if any) to do this should
probably consider both use cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions