I have images in the DAM in CQ5 and I need to access the width and height of these images inside a .jsp for programmatic use.
You can use the AssetDetails class to get the details of a particular DAM Asset.
For e.g.,
Resource res = resourceResolver.getResource("<<path to resource>>");
AssetDetails assetDetails = new AssetDetails(res);
assetDetails.getHeight();
assetDetails.getWidth();