POI 3.2 Image Height/Width controlling

后端 未结 4 1188
灰色年华
灰色年华 2021-01-13 05:14

Using POI version 3.2

Issue: Not able to resize an image to its original height and width. I am able to add an image to the excel file.

After adding image I

4条回答
  •  灰色年华
    2021-01-13 05:34

    Good solution is to use resize() function with scale argument:

    double scale = 0.3;
    Picture pict = drawing.createPicture(anchor, pictureIdx);
    pict.resize(scale);
    

提交回复
热议问题