This is caused by an integer overflow when multiplying the width of the image by the height, and subsequently trying to allocated a slice with a negative element count. image.New*() functions should probably guard against integer overflow before calling make().
I would like to try to write the fix.
NOTE: this only panics on 64 bit architectures, hence does not panic on the playground.
The text was updated successfully, but these errors were encountered: