Image size is going to depend on format, so you'd have to actually load the image via some existing mechanism (e.g. Java's ImageIO
class). That's going to be slow and probably more trouble than it's worth.
If your image is in image management, we do store metadata along with the image record, but we don't expose any easy way to retrieve it. See these threads for how to access the ImageManager
object on the gateway:
Once you've got an ImageRecord
, you can ask the record for its width and height.