anthonynsimon / bild

Image processing algorithms in pure Go
MIT License
4.02k stars 214 forks source link

Fix rotate panic #82

Closed harotobira closed 4 years ago

harotobira commented 4 years ago

Hi,

I have the same problem as in this issue https://github.com/anthonynsimon/bild/issues/78. I found a solution to this.

We must not set RGBA colours by pix slice. We must use .Set()

Explained here: https://groups.google.com/forum/#!topic/golang-nuts/WXr89MY9MBw

And some explanaitions about slice[a:b:c] construct https://stackoverflow.com/questions/27938177/golang-slice-slicing-a-slice-with-sliceabc

anthonynsimon commented 4 years ago

Thanks a lot for helping out with this!