dithergo
dithergo copied to clipboard
Rendering image...panic: runtime error: invalid memory address or nil pointer dereference
go run main.go solid.png
Rendering image...panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x4c5c5e]
goroutine 1 [running]:
image.(*Gray).Bounds(...)
/usr/lib/go/src/image/image.go:681
github.com/esimov/dithergo.(*file).TresholdDithering(0xc420090090, 0x0, 0xc4200a4101, 0x0, 0x0, 0x0)
/home/gabriel/go/src/github.com/esimov/dithergo/ditherer.go:88 +0x4e
github.com/esimov/dithergo.Process.func1(0x51ecc0, 0xc4200a41c0, 0x5a2c80, 0x7, 0x7, 0xc420090090, 0xc4200ac000)
/home/gabriel/go/src/github.com/esimov/dithergo/ditherer.go:171 +0x151
github.com/esimov/dithergo.Process(0x5a2c80, 0x7, 0x7)
/home/gabriel/go/src/github.com/esimov/dithergo/ditherer.go:191 +0x483
main.main()
/home/gabriel/go/src/github.com/esimov/dithergo/cmd/main.go:81 +0x45
exit status 2
Could you attach the image? My opinion is that it has to do with image type conversion. But i need to check with the provided image.