You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Jérôme Serré <je...@gmail.com> on 2011/01/26 12:46:59 UTC

Loading Image by byte[]

Hello,
 
To display an image in ImageView I use this method :
iv.setImage(Image.load(
<http://download.oracle.com/javase/6/docs/api/java/net/URL.html?is-external=
true> URL location));
Is it possible to fill ImageView with an array of bytes or another object
that contain image ?
 
Thank you.
 
Jérôme
 
____________________________
La gestion de votre cave
 <http://85.216.59.161:8000/cave> http://85.216.59.161:8000/cave
 


RE: Loading Image by byte[]

Posted by Jérôme Serré <je...@gmail.com>.
Super thank's

-----Message d'origine-----
De : Greg Brown [mailto:gk_brown@verizon.net] 
Envoyé : mercredi 26 janvier 2011 14:08
À : user@pivot.apache.org
Objet : Re: Loading Image by byte[]

See the org.apache.pivot.wtk.media.Picture class. It is a concrete subclass
of Image that wraps an instance of java.awt.image.BufferedImage. You can
create/populate the BufferedImage however you like. Then wrap it in a
Picture and call ImageView#setImage().
G

On Jan 26, 2011, at 6:46 AM, Jérôme Serré wrote:

> Hello,
> 
> To display an image in ImageView I use this method :
> iv.setImage(Image.load(
>
<http://download.oracle.com/javase/6/docs/api/java/net/URL.html?is-external=
> true> URL location));
> Is it possible to fill ImageView with an array of bytes or another object
> that contain image ?
> 
> Thank you.
> 
> Jérôme
> 
> ____________________________
> La gestion de votre cave
> <http://85.216.59.161:8000/cave> http://85.216.59.161:8000/cave
> 
> 


Re: Loading Image by byte[]

Posted by Greg Brown <gk...@verizon.net>.
See the org.apache.pivot.wtk.media.Picture class. It is a concrete subclass of Image that wraps an instance of java.awt.image.BufferedImage. You can create/populate the BufferedImage however you like. Then wrap it in a Picture and call ImageView#setImage().
G

On Jan 26, 2011, at 6:46 AM, Jérôme Serré wrote:

> Hello,
> 
> To display an image in ImageView I use this method :
> iv.setImage(Image.load(
> <http://download.oracle.com/javase/6/docs/api/java/net/URL.html?is-external=
> true> URL location));
> Is it possible to fill ImageView with an array of bytes or another object
> that contain image ?
> 
> Thank you.
> 
> Jérôme
> 
> ____________________________
> La gestion de votre cave
> <http://85.216.59.161:8000/cave> http://85.216.59.161:8000/cave
> 
>