Loading...
Logo
Processing Forum
hello everyone.

i'm doing

Copy code
Copy code
  1. import javax.imageio.*;

and want to create an ImageOutputStream via

Copy code
Copy code
  1. ByteArrayOutputStream baos= new ByteArrayOutputStream();
  2. ImageOutputStream ios=  ImageIO.createImageOutputStream(baos);

but i get a  cannot find a class or type named "ImageOutputStream" error from processing. do i have to use a certain JDK to get ImageOutputStreams?

btw, i'm using processing 2.0a8.

Replies(4)

try:
Copy code
  1. import javax.imageio.stream.ImageOutputStream;
strangely that seems to work. i don't quite get how this is different from .*, but nevermeind. now the thing is giving me some grief about unhandled exceptions, but i'll figure that out.

thank you very much.
"*" makes all the classes of a package visible but it doesn't apply for subpackages.
So you would need to import both,  javax.imageio.* and javax.imageio.stream.*
i see. that is rather unexpected behaviour. i haven't touched native java in forever, so thanks again.