RĂ¼diger Kaatz wrote:
> Hi Bruno,
> 
> great idea, thanx. Remember the problem I had the other day showing an
> image inside a table (catalunya...)?
> Here is my solution, I have to load the image via the Jpeg class and
> not the generic Image one:
> 
> ClassLoader cl = ITextHelper.class.getClassLoader();
> URL url = cl.getResource("image.jpg");
> Jpeg jpeg=new Jpeg(url);
> 
> Not like this:
> ClassLoader cl = ITextHelper.class.getClassLoader();
> URL url = cl.getResource("image.jpg");
> InputStream in = url.openStream();//IOException
> byte []bytes=new byte[in.available()];
> in.read(bytes);
> Image image=Image.getInstance(bytes);

Thank you for the update.
It will be useful for further reference.
I didn't have that problem when I read the image
from the file system, but you are probably reading
it from a jar? In some cases it's very hard to
reproduce a problem.
br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to