Pixel interpolation estimates output pixel colors when an image is resized. In Go, image/draw does not scale images, so resizing uses golang.org/x/image/draw and its Scaler interface. section 9.6.2
Choose a scaling implementation according to the desired image appearance:
- NearestNeighbor preserves pixel edges without blurring, making it suitable for maze pixels. section 9.6.2
- CatmullRom and ApproxBiLinear are alternative implementations of the Scaler interface. section 9.6.2
Scaling a maze frame
Create a 500-pixel-wide paletted frame whose height preserves the input ratio, then scale the maze into it: draw.NearestNeighbor.Scale(frame, frame.Rect, maze, maze.Bounds(), draw.Over, nil). section 9.6.2
Inspect the complete scaler call used to resize the current maze image into the animation frame. section 9.6.2








