Yes, what Matt said.

-----Original Message-----
From: Matt Benson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 3:02 PM
To: Menke, John; 'Bill Ensley'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [iText-questions] howto stop grayscale jpg lightening
automat ically on output to pd f?


--- "Menke, John" <[EMAIL PROTECTED]> wrote:
> Bill, thanks for getting back to me.  I have not
> used the Image constructor
> directly because i 
> need get my images as a stream and there does not
> appear to be a constructor
> that matches with
> inputStream.  

Instead of public constructors, Image provides a
number of static getInstance() methods including >1
that take data from a byte[].  Worst case, you should
be able to read your stream into a
ByteArrayOutputStream and construct the Image with the
result of toByteArray().

> 
> the reason i get as stream is that i am pulling the
> image out of jar file:
> 
> imageFileUrl = new URL(urlString);
> jarConnection = (JarURLConnection)
> imageFileUrl.openConnection();
> inputStream = jarConnection.getInputStream();
> 

If you're using a URL, Image has getInstance(URL)...

-Matt

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to