View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003080 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2011-07-21 14:49 | 2012-12-10 13:44 |
Reporter | tjungcl | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Past development | ||||
Fixed in Version | 4.5.2 revision 38481 | ||||
Summary | 0003080: oxdynimggenerator doesnt preserve image ratio | ||||
Description | the new generator from svn generates pictures always in the predefined dimensions, not preserving the original image ratio. to fix, in oxdynimggenerator.php add: protected function _preserveRatio($iWidth,$iHeight,$sSource){ $aImageInfo = @getimagesize($sSource); $ratio = $aImageInfo[0]/$aImageInfo[1]; if ($iWidth/$iHeight > $ratio) { $iWidth = $iHeight * $ratio; } else { $iHeight = $iWidth / $ratio; } return array($iWidth,$iHeight); } and in the function _generateImage, after list($iWidth...) = ...; add list( $iWidth, $iHeight) = $this->_preserveRatio($iWidth,$iHeight,$sImageSource); | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||