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

image: basic resizing framework #6755

Closed
matrixik opened this issue Nov 13, 2013 · 2 comments
Closed

image: basic resizing framework #6755

matrixik opened this issue Nov 13, 2013 · 2 comments

Comments

@matrixik
Copy link

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
@nigeltao
Copy link
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.

@matrixik
Copy link
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.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants