Hello,

        in a PDF i have to include a lot of images. I tried the NIO-package
to create the bytearray myself and then instance the Image-object like this:

FileChannel roChannel = new RandomAccessFile(url, "r").getChannel();
ByteBuffer roBuf = roChannel.map(FileChannel.MapMode.READ_ONLY, 0,
(int)roChannel.size());
byte[] ba = new byte[roBuf.capacity()];
roBuf.get(ba);
Image img = com.lowagie.text.Image.getInstance(ba);


But several speedtests shows that this solution is about ten times slower
then giving the Image.getInstance()-Method simply an string with the path to
the imagefile.

Why is this so and couldn't iText support the nio-package for advantage in
speed?


Martin



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to