Load SWT image in order to compute width and height.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / util / DefaultImageManager.java
index e2ab5c8568e24ccd4ce50f126a902faed2464256..1c6f7198413942206a04c5694a06b5073e0036b1 100644 (file)
@@ -116,8 +116,9 @@ public class DefaultImageManager implements CmsImageManager {
        }
 
        public Point getImageSize(Node node) throws RepositoryException {
-               // TODO load the SWT image ?
-               return new Point(0, 0);
+               // TODO optimise
+               Image image = getSwtImage(node);
+               return new Point(image.getBounds().width,image.getBounds().height);
        }
 
        /** @return null if not available */