BxDolImageResize::getImageSize PHP Method

getImageSize() static public method

static public getImageSize ( $sPath )
    static function getImageSize($sPath)
    {
        $o = self::instance();
        return $o->_getImageSize($sPath);
    }

Usage Example

Example #1
0
 /**
  * Returns crop image html, it consists of image for cropping, cropping preview and descriptions
  * @param $aParams
  *          dir_image - image path
  *          url_image - image url
  * @returns error message string of html string
  */
 function serviceCropTool($aParams)
 {
     if (!$aParams || !is_array($aParams)) {
         return _t('_bx_ava_msg_error_occured');
     }
     if (!file_exists($aParams['dir_image'])) {
         return _t('_bx_ava_no_crop_image');
     }
     bx_import('BxDolImageResize');
     $aSizes = BxDolImageResize::getImageSize($aParams['dir_image']);
     $aVars = array('url_img' => $aParams['url_image'], 'img_width' => $aSizes['w'] ? $aSizes['w'] : 0, 'img_height' => $aSizes['h'] ? $aSizes['h'] : 0, 'action' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri());
     return $this->_oTemplate->parseHtmlByName('crop_tool', $aVars);
 }
All Usage Examples Of BxDolImageResize::getImageSize