Reading a JPEG

I am trying to read a JPEG and use it as an InputStream, however, I haven't been able to find any useful libraries or information on how to do this. Any help would be appreciated!Message was edited by: thatguy
[231 byte] By [thatguya] at [2007-11-27 0:51:49]
# 1
I'm guessing you didn't try google... http://www.google.com/search?hl=en&q=read+image+from+inputstream
ignignokt84a at 2007-7-11 23:22:54 > top of Java-index,Java Essentials,New To Java...
# 2

[url=http://java.sun.com/javase/6/docs/api/javax/imageio/ImageIO.html#read(java.net.URL)]ImageIO.read[/url]

There are versions of read that take a URL or a File.

If you *really* have to use an InputStream, you can do the following.

InputStream in = ...

BufferedImage image = ImageIO.read(ImageIO.createImageInputStream(in));

DrLaszloJamfa at 2007-7-11 23:22:54 > top of Java-index,Java Essentials,New To Java...