Implementing 9-slice scaling with the Canvas API
The 9-slice scaling technique allows resizing an image to a different aspect ratio without any ugly distortions. This is achieved by slicing the original image into 9 rectangular parts and using those to construct the final resized image. Take a look...
blog.simonjaeger.ch3 min read