我想将 a 转换BufferedImage
为java.awt.Image
.
我的源图像是 tif,所以我使用 JAI 将其读取为PlanarImage
:
PlanarImage source = JAI.create("fileload", IMG_DIR + tagImgName);
然后我将它保存为对象属性作为BufferedImage
tagImg = source.getAsBufferedImage();
对于 .pdf-Export(通过 iText),我需要它作为java.awt.Image
谢谢!