Сonverting images to pixels

How to convert images to pixels?

fun main(args: Array) {

val image = ImageIO.read(File("D:\\bitmap1.png"))

and ???
((
help please

here

does not work

private val wImg1 = WritableImage(img.pixelReader, img.width.toInt(), img.height.toInt())

What result are you looking for?

If you just need to look at pixel values, you can do that using basic AWT code directly from the BufferedImage with getRGB() calls. Or you can get the Raster with getRaster(). If that’s not sufficient, can you explain what else you need?

(Also, you’re more likely to get help if you can give more detail than ‘does not work’, such as the exact compile error, or run-time exception message, or unexpected behaviour you see.)