Double image

Report a typo

The following code is a function that takes a BufferedImage image instance and returns an image with doubled dimensions.

Place the code lines in the correct order.

Put the items in the correct order
return doubleImage
val doubleImage = BufferedImage(image.width * 2, image.height * 2, BufferedImage.TYPE_INT_RGB)
graphics.drawImage(image, 0, 0, null)
fun doubleImage(image: BufferedImage): BufferedImage {
val graphics = doubleImage.createGraphics()
}
graphics.scale(2.0, 2.0)
___

Create a free account to access the full topic