This commit is contained in:
ashu1994 2018-09-13 20:54:11 +00:00 committed by GitHub
commit 2747a5269a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ func NewGraphicContext(img draw.Image) *GraphicContext {
switch selectImage := img.(type) {
case *image.RGBA:
painter = raster.NewRGBAPainter(selectImage)
case *image.Gray:
painter = raster.NewGRAYPainter(selectImage)
default:
panic("Image type not supported")
}