If you're loading an image type supported by Flex (gif, jpeg, png,
swf) then you don't need to know anything about the image. You don't
need to know the width or height.

All you do is use Loader.loadBytes(byteArray). This would load the
image exactly the same as if you loaded from a URL.

Doug


--- In [email protected], "dario.drome" <[EMAIL PROTECTED]> wrote:
>
> I agree with Franto friend: You need to know something about the 
> bytearray you are receiving, i.e. format, disposition, etc.
> Most of image formats have a kind of header where you could find its 
> width, height and so on.
> Once you know the dimensions and the format, you would need to use 
> the apropriate decoder to transform the bytearray in pixels of a Flex 
> Bitmapdata object.
> 
> --- In [email protected], franto <kormanak@> wrote:
> >
> > if you dont know what is it ByteArray how you want todisplayit :)
> > you have to know at least 1 parameter, width or height...
> > 
> > thats my opinion
> > Franto
> > 
> > On 1/26/07, Steve Cox <scox@> wrote:
> > >
> > >    All,
> > >
> > >
> > >
> > > I'm retrieving an image via remoting as a ByteArray. How can I 
> convert
> > > this to a Bitmap without knowing the width/height of the image? 
> I've seen
> > > SetPixels – but that requires me knowing the dimensions of an 
> image – which
> > > I don't.
> > >
> > >
> > >
> > > Any ideas?
> > >
> > >  
> > >
> > 
> > 
> > 
> > -- 
> > --------------------------------------------------------------------
> ----------------------------------------------------------------------
> -----------------------
> > Franto
> > 
> > http://blog.franto.com
> > http://www.flashcoders.sk
> >
>


Reply via email to