<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br><div>As a newbie to GIS, i'm looking for information on how to use GeoTools (or any appropriate) APIs to convert a double[][] into a PNG.</div><div><br></div><div>According to the manual technique using AWT i was trying (below), it seems i need a raster then saving it as a PNG but i'm hoping there's a more straightforward way using GeoTools APIs (and APIS that actually work for me :)</div><div><br></div><div>BTW, as i understand it, i'm generating tiles to be served (layered?) by GeoServer. If there's a better method/format, i'm open to that.</div><div><br></div><div><div><div>Thanks for any pointers you can provide,</div><div>Robert</div></div></div><div><br></div><div><br></div><div><div><font face="Courier New">      DataBufferDouble db = new DataBufferDouble(d, d[0].length);</font></div><div><font face="Courier New">      SampleModel sm = new PixelInterleavedSampleModel(DataBuffer.TYPE_DOUBLE,</font></div><div><font face="Courier New">        w, h, 4, w * 4, new int[]{2, 1, 0, 3});</font></div><div><font face="Courier New">      ColorModel cm = new ComponentColorModel(ColorSpace.getInstance(</font></div><div><font face="Courier New">        ColorSpace.CS_LINEAR_RGB), true, true, ColorModel.TRANSLUCENT,</font></div><div><font face="Courier New">        DataBuffer.TYPE_DOUBLE);</font></div><div><font face="Courier New">      WritableRaster wr = WritableRaster.createWritableRaster(sm, db, null);</font></div><div><font face="Courier New">      BufferedImage bi = new BufferedImage(cm, wr, true, new Hashtable<>());</font></div><div><font face="Courier New">      File outputfile = new File("saved.png");</font></div><div><font face="Courier New">      ImageIO.write(bi, "png", outputfile);</font></div></div></div><div><br></div></body></html>