from bufferedimage to inputstream

P

pete leg

hi all, i'm a newbye and i need some help.
i have to convert a bufferedimage object into an inputstream one
(without passing through a file).
i found someone advicing to use imageio.read and imageio.write to do
this... but i can't understand how :(
please, can someone post an example?
thanx in advance
pete
 
D

Daniel Pitts

pete said:
hi all, i'm a newbye and i need some help.
i have to convert a bufferedimage object into an inputstream one
(without passing through a file).
i found someone advicing to use imageio.read and imageio.write to do
this... but i can't understand how :(
please, can someone post an example?
thanx in advance
pete

Perhaps you should give us the context of what you are trying to do, as
it isn't trivial to "convert" (as you put it) a BufferedImage object to
an InputStream.

If you are trying to do something such as save the image somewhere, or
upload it somewhere, or read the bytes for some reason, those all would
have a different approach. You're ultimate goal is more important than
the way you get there. It's good to say "I'm trying this approach, but
I can't figure out how. Is there a better way, or if not, how do I get
this way to work."

As for examples, there are plenty on Google.
 
P

pete leg

ok, thanx for the explanation.
i'm trying to send a screenshot to my ftp on a system where i don't
have permission to access the hard drives.

i know that google can help me search for examples, i've already tried
with no success... i found some thread suggesting to use imageio.read
and .write, but i can't figure out how.
thanx again
pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top