Read the InputStream to a byte array.
Paulo
----- Original Message -----
From: dba03
To: Post all your questions about iText here
Sent: Sunday, July 03, 2011 3:25 PM
Subject: Re: [iText-questions] getDpiX,Y returns 0
How can I get the Dpi of an png file in the zip file?
If I don't use BufferedImage, how can I get an "com.lowagie.text.Image"
object from the InputSteam?
At 2011-07-03 17:04:08,"Paulo Soares" <[email protected]> wrote:
You lost the dpi with the conversion to BufferedImage.
Paulo
----- Original Message -----
From: dba03
To: [email protected]
Sent: Sunday, July 03, 2011 9:15 AM
Subject: [iText-questions] getDpiX,Y returns 0
Image img= Image.getInstance("f:/totest/pic/11.png");
int dpix= img.getDpiX();
The getDpiX() return the correct value.
but the following code returned 0. Why?
InputStream sourceStream = getStream(source);
BufferedImage image= ImageIO.read(sourceStream);
com.lowagie.text.Image iTextImage =
com.lowagie.text.Image.getInstance(image,null);
int dpix = iTextImage.getDpiX();
The getStream(source) is get the InputStream of the same png file from a
zip file.
thanks!!
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a
reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php