cloneIfRequired

fun BufferedImage.cloneIfRequired(width: Int = this.width, height: Int = this.height, type: Int = AWT_INTERNAL_IMAGE_TYPE_PRE): BufferedImage