For managed images, you can use qx.util.ResourceManager#getImageHeight/getImageWidth. This information is available whether the image has been loaded or not.
T. > Hi Tristan, > > thanks for reply, I meant original dimension of the image. I don't > know if the "appear" is the right event. I'd like to get the size when > image is loaded so I'd like to stay with "loaded" event. The problem > is that the sample you wrote doesn't work for this case, because > "loaded" event is fired before the dimension of image is set to the > Image widget. > > BTW: The example in playground doesn't work well, the UI seems to be > locked. I'm testing with firefox 3.6 on Windows7. Can anybody confirm? > > Best regards > Petr Kobalicek > > 2011/1/4 Tristan Koch <[email protected]>: >> Hi Petr, >> >> do you mean the actual (original) size of the image or the size of the >> image as in your layout? >> >> Did you give qx.ui.core.LayoutItem#getBounds or >> qx.ui.core.Widget#getInnerSize a try? >> >> http://tinyurl.com/2vzyv4o >> >> Tristan >> >> Am 03.01.2011 um 22:23 schrieb Petr KobalÃÄ�ek: >> >>> I dig deeped into my problem and it seems that I don't understand the >>> Image class correctly. I think that there is missing simple interface >>> to get the image size, from "loaded" event for example, or from the >>> widget itself. >>> >>> This question is also for core team devs. >>> >>> If I use the qx.ui.basic.Image and listen to the "loaded" event then >>> there is no way how to get the image dimensions except using the >>> qx.io.ImageLoader static class. There are __width and __height members >>> in qx.ui.basic.Image, but these are private and are accessible only by >>> the protected member _getContentHint(). >>> >>> The problem is that __width/__height (content hint) is set after the >>> "loaded" event was fired, so when listening and using >>> _getContentHint() then the old image size is retrieved. >>> >>> The only way that is functional to me is to use >>> qx.io.ImageLoader.getWidth()/getHeight(). But I'm not sure if this is >>> good when mixing managed and unmanaged images (yes, my file admin can >>> browse also qooxdoo resources). >>> >>> So, the question is, why there is no nice api to get the image size >>> when using qx.ui.basic.Image widget. >>> >>> Thanks! >>> >>> Best regards >>> Petr Kobalicek >>> >>> On Mon, Jan 3, 2011 at 6:43 PM, Stefan Volbers <[email protected]> >>> wrote: >>>> >>>> >>>> On 03.01.2011 18:41, Stefan Volbers wrote: >>>>> A qooxdoo based gallery would be great - I always liked the idea, but >>>>> I >>>>> have time to realise such for myself... >>>> ... >>>> sadly I DON'T have time :-( >>>> >>>> Greetings >>>> Stefan >>>> >>>> ------------------------------------------------------------------------------ >>>> Learn how Oracle Real Application Clusters (RAC) One Node allows >>>> customers >>>> to consolidate database storage, standardize their database >>>> environment, and, >>>> should the need arise, upgrade to a full multi-node Oracle RAC >>>> database >>>> without downtime or disruption >>>> http://p.sf.net/sfu/oracle-sfdevnl >>>> _______________________________________________ >>>> qooxdoo-devel mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >>>> >>> >>> ------------------------------------------------------------------------------ >>> Learn how Oracle Real Application Clusters (RAC) One Node allows >>> customers >>> to consolidate database storage, standardize their database >>> environment, and, >>> should the need arise, upgrade to a full multi-node Oracle RAC database >>> without downtime or disruption >>> http://p.sf.net/sfu/oracle-sfdevnl >>> _______________________________________________ >>> qooxdoo-devel mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> >> >> ------------------------------------------------------------------------------ >> Learn how Oracle Real Application Clusters (RAC) One Node allows >> customers >> to consolidate database storage, standardize their database environment, >> and, >> should the need arise, upgrade to a full multi-node Oracle RAC database >> without downtime or disruption >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> qooxdoo-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
