Re: creating an ImagePlus from an InputStream or a byte[]
Posted by
Adrian Daerr-2 on
Dec 12, 2007; 5:47pm
URL: http://imagej.273.s1.nabble.com/creating-an-ImagePlus-from-an-InputStream-or-a-byte-tp3697788p3697795.html
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> That would only work if the byte[] is a serialized ImagePlus, but our
> byte[] is an gif/png/jpg/bmp etc...
Then let java.imageio.ImageIO.read(InputStream ...) convert it into a
BufferedImage, from which you can get the pixel data (with something
like getData().getPixels() for example). All of this untested of course...
- --
http://www.msc.univ-paris-diderot.fr/~daerr/-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.orgiD8DBQFHYB6UUKl/wQSyHWgRArNuAJwI44fnMhpRFqva9Ey6x0bngnVsJwCfXnhf
A6pPEu5+3zdsELYufeRpIQQ=
=FH+b
-----END PGP SIGNATURE-----