Re: [go-nuts] Extending image.Image with Set

2017-09-06 Thread Florian
I didn't know about image/draw, thank you! The linked doc has a very helpful example and references a a good blog post. Am Dienstag, 5. September 2017 04:46:24 UTC+2 schrieb James Fargher: > > I think your ImageSetter is already in the standard library > https://golang.org/pkg/image/draw/#Image

Re: [go-nuts] Extending image.Image with Set

2017-09-04 Thread James
I think your ImageSetter is already in the standard library https://golang.org/pkg/image/draw/#Image It's a little bit subtle because different packages have the immutable Image and mutable Image It might save you some work by using golang.org/x/image library which already has affine transforms. h

[go-nuts] Extending image.Image with Set

2017-09-04 Thread Florian Florensen
Hello, I'd like to rotate, scale, ... images by moving pixels using affine transformations. For example, the get a points x, y position after a translating it by m, n pixels, you can just add m resp n to x and y: x' = x + m y' = y + n So the task is basically just to iterate over the images p