createCompatibleCopy

fun BufferedImage.createCompatibleCopy(width: Int = this.width, height: Int = this.height): BufferedImage

Creates a new buffered image with the same attributes but different width and height Use this for custom type buffered images

Parameters

width

Width of new buffered image, defaults to original width

height

Height of new buffered image, defaults to original height