Hi Faiz,
The problem is not the loading the WMF image, Once the image gets loaded in i am trying to create a Buffered image(Step 8 in below snippet) equal to size of the WMF height and width. But this step creates an NegativeArraySizeException. I guess it because of the height(93491) and width(150912) which too large and i get Out of Memory excetion in applet. This happens from some images.
byte [] stMetaFileData;
......
......
1. WmfMetafile emfImg=new WmfMetafile(new ByteArrayInputStream(stMetaFileData));
2. int ht=module.getHeight();
3. int w=module.getWidth();
4
5 double reductionHt=(ht/emfImg.getHeight());
6 double reductionW=(w/emfImg.getWidth());
7
8 BufferedImage imgBuffer=new BufferedImage((int)Math.ceil(emfImg.getWidth()),(int)Math.ceil(emfImg.getHeight()),BufferedImage.TYPE_3BYTE_BGR);
I have few more questions to ask
1. What is the method should i use to get the image dimension, should i use getBounds() or the getHeight() and getWidth() methods.
2. How to used apose jar when using applet in jar, when in put the aspose jar inside applet jar its unable to detect the classes. Kindly suggest the the best way to use aspose library in deployable applet jar.
regards
Premkumar