Hi: I tried to draw a tiff image in my JFrame,however I found some strange thing . The core codes I use are shown in the following: -------------- SeekableStream seekableStream = SeekableStream.wrapInputStream(Test.class.getResourceAsStream("Test.tif"), true);
ParameterBlock pb = new ParameterBlock(); pb.add(seekableStream); PlanarImage resultImage = JAI.create("tiff", pb);
JPanel jp=new JPanel(); JFrame jf=new JFrame();
jf.setSize(1100, 800); jf.setVisible(true); Graphics g=jf.getGraphics(); g.setColor(Color.BLUE); g.drawImage(resultImage.getAsBufferedImage(), 0, 0, null); ----------------
However the tiff is blank in my frame,then I open this tiff with arcgis, it is also a black blank, but I can classify it, then the tiff is colorful.
Then export this tiff from the from without the corrdinate information, it can be shown with color in the JFrame.