1 Reply Latest reply on May 2, 2011 4:07 AM by Mykola3296

    How to obtain width and height of a jpg image file using OSMF

    royandkris

      I have been converting all of my flex routines over to OSMF to access my media files. I'm making good progress but I have run into a problem regarding jpg image files. I can access them, download them and display them without any problems. But, now I need to be able to obtain their widths and heights. I wrote a routine to access the height and width and it worked on my localhost. But when I tested it on my website it failed.....so I must be doing something wrong.

       

      My existing code creates an new MediaPlayerSprite, then I access and download the image using URLResource(image_location) and then I assign the return of URLResource to the resource property of the MediaPlayerSprite and then display the image. Using my development computer (localhost) I can successfully access the width and height by looking at the height and width of the MediaPlayerSprite. But, this does not work when using my website.

       

      Can someone please give me some ideas on how to proceed.