我想将BufferedImage
转换为java.awt.Image
。如何将BufferedImage转换成图像?
我的源图像是TIF所以我用JAI读取它作为PlanarImage
:
PlanarImage源= JAI.create( “fileload”,IMG_DIR + tagImgName);
然后我保存它作为一个对象的属性作为BufferedImage
tagImg = source.getAsBufferedImage();
对于.PDF-出口(通过iText的),我需要它作为java.awt.Image
谢谢!