Oracle Community Directory
Oracle Community FAQ
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
on Nov 29, 2012 12:24 PM by StanislavL
how to convert a import com.lowagie.text.Image; to a java.awt.image?
Nov 29, 2012 10:59 AM
I am trying to convert an itext image to a java.awt image
ByteArrayOutputStream bas = new ByteArrayOutputStream();
ImageIO.write((RenderedImage)image, "png", bas);
byte data = bas.toByteArray();
InputStream in = new ByteArrayInputStream(data);
BufferedImage finalImage = ImageIO.read(in);
But at run time i get a ClassCastException.
Can anyone help me with this?
I have the same question
Show 0 Likes
This content has been marked as final.
Show 1 reply
Re: how to convert a import com.lowagie.text.Image; to a java.awt.image?
Nov 29, 2012 12:24 PM
in response to
What if you use ?
public byte getRawData()
public byte getOriginalData()