Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating 2.0 with corrections from 1.0 #820

Merged
merged 3 commits into from
Nov 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ path to get its resolved location.
$imagineCacheManager = $this->get('liip_imagine.cache.manager');

/** @var string */
$resolvedPath = $this->getBrowserPath('/relative/path/to/image.jpg', 'my_thumb');
$resolvedPath = $imagineCacheManager->getBrowserPath('/relative/path/to/image.jpg', 'my_thumb');
```


Expand Down
28 changes: 15 additions & 13 deletions Resources/doc/filters/sizing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Example configuration:
thumbnail:

# set the thumbnail size to "32x32" pixels
- size: [32, 32]
size: [32, 32]

# crop the input image, if required
- mode: outbound
mode: outbound

.. seealso::

Expand Down Expand Up @@ -84,10 +84,10 @@ Example configuration:
crop:

# set the size of the cropping area
- size: [ 300, 600 ]
size: [ 300, 600 ]

# set the starting coordinates of the crop
- start: [ 040, 160 ]
start: [ 040, 160 ]


Crop Options
Expand Down Expand Up @@ -127,34 +127,37 @@ Example configuration:
relative_resize:

# given 50x40px, output 75x60px using "heighten" option
- heighten: 60
heighten: 60

# name our second filter set "my_widen_filter"
my_widen_filter:
filters:

# use and setup the "relative_resize" filter
relative_resize:

# given 50x40px, output 32x26px using "widen" option
- widen: 32
widen: 32

# name our second filter set "my_increase_filter"
my_increase_filter:
filters:

# use and setup the "relative_resize" filter
relative_resize:

# given 50x40px, output 60x50px, using "increase" option
- increase: 10
increase: 10

# name our second filter set "my_scale_filter"
my_scale_filter:
filters:

# use and setup the "relative_resize" filter
relative_resize:

# given 50x40px, output 125x100px using "scale" option
- scale: 2.5
scale: 2.5


.. tip::
Expand Down Expand Up @@ -209,7 +212,7 @@ Example configuration:
scale:

# given 1920x1600px -> output 960x800px (relative down-scale)
- to: 0.5
to: 0.5

# name our first filter set "my_ratio_up_scale_filter"
my_ratio_up_scale_filter:
Expand All @@ -219,7 +222,7 @@ Example configuration:
scale:

# given 1920x1600px -> output 5760x3200px (relative up-scale)
- to: 2
to: 2

# name our third filter set "my_dim_down_scale_filter"
my_dim_down_scale_filter:
Expand All @@ -229,7 +232,7 @@ Example configuration:
scale:

# input 1200x1600px -> output 750x1000px (relative down-scale)
- dim: [ 800, 1000 ]
dim: [ 800, 1000 ]

# name our fourth filter set "my_dim_up_scale_filter"
my_dim_up_scale_filter:
Expand All @@ -239,7 +242,7 @@ Example configuration:
scale:

# input 300x900px -> output 900x2700px (relative up-scale)
- dim: [ 1200, 2700 ]
dim: [ 1200, 2700 ]


Scale Options
Expand Down Expand Up @@ -358,4 +361,3 @@ Up Scale Options

.. _`BoxInterface`: http://imagine.readthedocs.io/en/latest/usage/coordinates.html#boxinterface
.. _`Imagine Library`: http://imagine.readthedocs.io/en/latest/