Skip to content

Commit 015ebc3

Browse files
committed
Changed readme
1 parent 0cd25f9 commit 015ebc3

File tree

2 files changed

+31
-14
lines changed

2 files changed

+31
-14
lines changed

README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
===================================================================================
2+
Magento Resize With Crop Functionality for Ideal Proportions Fit With Every Design.
3+
===================================================================================
4+
5+
Instead of resizing and adding white frame this module will crop main part of image.
6+
7+
**Attention! For now it will work only with GD2 image library.**
8+
9+
Resize examples comparing to Magento default resize
10+
---------------------------------------------------
11+
12+
**Portrait image with landscape oriented product images design
13+
14+
.. image:: http://i.imgur.com/rky8S.png
15+
16+
**Landscape oriented image with portrait product images design
17+
18+
.. image:: http://imgur.com/Q5PMW
19+
20+
How to Use
21+
__________
22+
23+
To use adaptive resize just use standart product image helper as always, just change resize() method to adaptiveResize().
24+
Example
25+
26+
::
27+
$this->helper('catalog/image')->init($this->getProduct(), 'image')->adaptiveResize(400, 215)
28+
$this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->constrainOnly(TRUE)->keepAspectRatio(FALSE)->keepFrame(FALSE)->adaptiveResize(400, 300)
29+
//height is the same is width
30+
$this->helper('catalog/image')->init($this->getProduct())->constrainOnly(TRUE)->adaptiveResize(400)
31+

0 commit comments

Comments
 (0)