Write the code for the function printColor(myImage: BufferedImage). It reads 2 integers x and y (divided by space) and then gets the color at the position (x, y) of myImage. Finally, it prints the color values in the following order: Red, Green, Blue, Alpha, with a single space between the values.
Image colors
Print color
Report a typo
Sample Input 1:
3 4Sample Output 1:
3 8 7 248Write a program in Kotlin
fun printColor(myImage: BufferedImage) {
// Write your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.