I am using the catalog helper resize function like this:
Mage::helper('catalog/image')->init($this->getProduct(), 'image', $before_image->getFile())->keepFrame(false)->constrainOnly(true)->resize(800, 600);
This will return the full image size unless it is larger than 800x600.
When it is larger than 800x600, I need to get the resulting size of the resized image. I have pored over the Mage_Catalog_Helper_Image file and cannot find anything that will give me the resulting size.
Is there any method outside of parsing the resulting URL to locate the cached file on my hard drive to determine the final image dimensions?
-
if you have getting different size you have install any custom module that will override the functionality or refresh your image cache.Keyul Shah– Keyul Shah2014年09月16日 05:40:12 +00:00Commented Sep 16, 2014 at 5:40
1 Answer 1
What you can do is, take what the method is returning, strip the baseurl from it, so you have the path in /media/ and then use getimagesize