Question: how to transform the image width / height in pixels and its representation as a 2D array of pixels ( coordinates + color ) into a png- file without using java.awt.image.BufferedImage and javax.imageio.ImageIO .

I don't want to work with an obsolete awt package. Looking for new solutions (Maybe a bicycle).

In fact, I am interested in the format in which the image file should be recorded, i.e. in what order in the binary file to record data on the width / height of the image and its data on the pixels.

I want to write data from javafx.scene.image.Image ( WritableImage ) to the png file. I preliminarily read pixelReader data about pixels of an image.

Thank.

  • one
    It is not very clear what your question is - are you just interested in the file format? So what's the point then javafx.scene.image.Image and everything else? Read the description of the png format and write bytes to the stream in accordance with this description. Or you do not know where to find the format description? Or do you want to be described here in response to you? - m. vokhm
  • Thank. I have a format description. Before doing my implementation, I decided to first find out whether someone had done the same thing before me (which is very likely). - DimXenon

0