We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Difference in Sizes Between BufferedImage and ImageData?

Hi,


I have a very simple code
IImageData img= ((DrawingML)node).getImageData();
BufferedImage bi= img.toImage();

However, the following log statement reports different sizes

imageType=EMF;name=Picture 20;
imageSize.Width=6098; imageSize.Height=3982;
imageSize.HorRes=600; imageSize.VertRes=600;
imageSize.WPoints=732;imageSize.HPoints=477;
bufferedImageType=INT_ARGB;
biWidth=2048; biHeight=1337;

I understand Points are scaled based on Resolution, but why is BufferedImage Width and Height different from IImageData Width and Height. I’m guessing the BufferedImage Width is restricted to 2048 for memory reasons.

How do I force the actual IImageData dimensions in BufferedImage?

Hi Roshan,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple Java application that demonstrates the code (Aspose.Words code) you used to reproduce this issue.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.