Skip to content

image: basic resizing framework #6755

Closed

Description

@matrixik
Feature request.

Requested on golang-nuts:
https://groups.google.com/d/msg/golang-nuts/rL1ATqYBECU/3UYlNCBgEaUJ

By: Alberto García Hierro:

>> There are many different resizing algorithms and approaches. I would
>> imagine that pure Go image resizing can and should be done by a "go
>> get"table third party library. Not everything has to be in the
>> standard library.

I totally agree, resizing algorithms should be pluggable. However, I think the standard
library should provide a basic framework for them, so users could write only the code
for the interpolation.

e.g.

type Interpolator interface... or type Interpolator func... for better performance

func Resize(im Image, width, height int, inter Interpolator) (Image, error)



Best regards,
Dobrosław Żybort

Activity

  1. nigeltao commented on Nov 16, 2013

    @nigeltao
    Contributor

    Comment 1:

    Regardless of whether it's an interface or a closure, I doubt that calling it in the
    inner loop, per pixel, is going to be efficient. That golang-nuts thread points to a
    third party library (nfnt/resize) that is designed very abstractly, with interfaces and
    closures, and it seems orders of magnitude slower than it could be.
    It's not obvious whether there exists an API design that is all three of clean, easy to
    use, and efficient. Until a proposal exists, I'm not keen on committing anything to the
    standard library, with its backwards compatibility guarantees.
    Besides, I don't see why this has to be in the standard library and not a "go get"table
    third party library.

    Labels changed: removed priority-triage.

    Status changed to WontFix.

  2. matrixik commented on Nov 16, 2013

    @matrixik
    Author

    Comment 2:

    I thought it could be something more like database/sql.
    Standard library won't have build in interpolator/resizing algorithm, it will just
    provide generic interface that every third party resizing library can follow.
  3. locked and limited conversation to collaborators on Jun 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions