Skip to content

Commit dbcdd76

Browse files
committed
Added Readme
1 parent 18ba6b2 commit dbcdd76

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
mage resize with crop functionality for ideal proportions fit with every design. Instead of resizing of adding white frame this module will crop main part of image.
2+
3+
*Attention! For now it will work only with GD2 image library.*
4+
5+
To use adaptive resize just use standart product image helper as always, just change resize() method to adaptiveResize().
6+
Example
7+
```php
8+
$this->helper('catalog/image')->init($this->getProduct(), 'image')->adaptiveResize(400, 215)
9+
$this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->constrainOnly(TRUE)->keepAspectRatio(FALSE)->keepFrame(FALSE)->adaptiveResize(400, 300)
10+
//height is the same is width
11+
$this->helper('catalog/image')->init($this->getProduct())->constrainOnly(TRUE)->adaptiveResize(400)
12+
```

0 commit comments

Comments
 (0)