1 Reply Latest reply on Oct 23, 2008 3:01 PM by -Hob

    Any way to get an image file's height?

    Handycam Level 1
      I am now trying to dynamically insert a Canvas component with an image component inside of it. I need to re-used the code for many images. Apparently it is only working if I give the canvas a width and height, which needs to be the size of the image file.

      How can I do this?
        • 1. Re: Any way to get an image file's height?
          -Hob Level 1
          Images are just display objects. You should be able to grab the measuredWidth and measuredHeight properties off of it to determine how big your canvas needs to be. If you're dynamically changing the source of your image, watch for the dataChange event that the image dispatches when its source changes.