Could Resize return draw.Image instead of image.Image?
googollee opened this issue · comments
Googol Lee commented
It's convenience that Resize return a draw.Image instead of image.Image that can continue draw in the image.
Jan Schlicht commented
While this would be possible at the moment, it may change in the future due to further optimizations, e.g. trying to use an output type that matches the input image -- image.YCbCr does not have a Set method.
For now I'd suggest to cast the output image.Image to draw.Image, like drawableImg := resize.Resize(x, y, inputImg, filter).(*draw.Image)
though this may not work in future revisions.