Hello,
I've got trouvbles while inserting a JPEG image in my presentation.
Although i succeded in inserting other JPEG images (not home made), I've got
a "red cross" instead of my image while trying to insert a home made JPEG
image (made with Java of course)...
Here is my code for creation of the JPEG image :
>BufferedImage bImage = new BufferedImage(width, height,
> BufferedImage.TYPE_4BYTE_ABGR);
>Graphics2D g = bImage.createGraphics();
>// Then I draw into my Graphics2D
>// [...]
>try {
> FileOutputStream out = new FileOutputStream(outPath);
> JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
> JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bImage);
> param.setQuality(0.75f, false);
> encoder.setJPEGEncodeParam(param);
> encoder.encode(bImage);
> out.close();
> } catch (IOException e) {
> e.printStackTrace();
> }
I then insert it like this :
>int idx = ppt.addPicture(new File("myImage.jpg"), Picture.JPEG);
>Picture pict = new Picture(idx);
>pict.setAnchor(new java.awt.Rectangle(130, 70, 200, 100));
>slides[i].addShape(pict);
And as I said it before, the result is a red cross instead of the image.
I guess there are limitations dealing with pictures properties... Maybe
something wrong with the BufferedImage type ?
Has someone any idea to solve this problem ?
Thanks a lot
Benoit
This email contains confidential and proprietary information some or all of
which may be legally privileged. It is for the intended recipient only.
If you have received this email in error, please notify the author
immediately by telephone or by replying to this email. If you are not the
intended recipient you must not use, disclose, distribute, copy, print, or
rely on this email.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]