<?php
$manufacturer_imge=$this->getmanufacturerimage();
$list_page_flag=$this->getListPageFlag();
?>
<?php 
 $imageUrl = Mage::getBaseUrl('media')."/".$manufacturer_imge;

                // path of the resized image to be saved
                // here, the resized image is saved in media/resized folder				
				$imageResized = Mage::getBaseDir('media').DS."manufacturer".DS."resized".DS.$manufacturer_imge;				
                $dirImg=Mage::getBaseDir().str_replace("/",DS,strstr($imageUrl,'/media'));				

                 
                // resize image only if the image file exists and the resized image file doesn't exist
                // the image is resized proportionally with the width/height 135px
                if (!file_exists($imageResized) && file_exists($dirImg)) :
                    $imageObj = new Varien_Image($dirImg);
                    $imageObj->constrainOnly(false);
                    $imageObj->keepFrame(false);
                    $imageObj->backgroundColor(array(255,255,255));
                    $imageObj->save($imageResized);
                endif;
?>
<img src="<?php echo Mage::getBaseUrl('media')."manufacturer"."/"."resized"."/".$manufacturer_imge ; ?>" alt="" class="manufacturer_image" />

