I'm having a problem similar to this one.. is there a way to get the 
height of an image that is being loaded?

I looked to be able to do this in the asp script I have generating 
the XML document, so I could have this in the XML, but I couldn't 
figure out how to do it. I figured I didn't need the width or height 
because the image could be scaled, but it turns out that I do need 
the height. Anyone know how to do this or is able to point me in the 
right direction?

Thanks..

Jayson


--- In flexcoders@yahoogroups.com, "dougmccune" <[EMAIL PROTECTED]> wrote:
>
> 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 flexcoders@yahoogroups.com, "dario.drome" <dario.drome@> 
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 flexcoders@yahoogroups.com, 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