当我使用BufferedImage
这样检查时,我有一张1418像素高度70像素的图像
File file = new File("/home/newage/Pictures/signature.png");
BufferedImage imageIO = ImageIO.read(file);
int height = imageIO.getHeight();
int width = imageIO.getWidth();
当我在apache poi中使用createPicture
方法时,大小返回455 x 22
Drawing drawing = sheet.createDrawingPatriarch();
Picture pict = drawing.createPicture(anchor, pictureIdx);
double pictWidthPx = pict.getImageDimension().getWidth();
double pictHeightPx = pict.getImageDimension().getHeight();
我需要保持图像的大小并放入excel行。
怎么做?