Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Markovic committed Oct 8, 2010
1 parent 2455ea6 commit 3d17b46
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.markdown
Expand Up @@ -87,19 +87,19 @@ If the file is updated, you simply delete the folder with its thumbnails and the

## How it works?

The helper generates, for example, a IMG tag that looks like this:
The helper generates, using this code for example:

<img src="/thumbs/img/cake.icon.png/eyJyb3RhdGVJbWFnZU5EZWdyZWVzIjpbMTgwXSwiYWRhcHRpdmVSZXNpemUiOlszMDAsMzAwXX0=.png" width="200" height="200" alt="Upside down cake" />
<?php echo $this->Image->show('/img/cake.icon.png', array('width' => 200, 'height' => 200, 'alt' => 'Upside down cake'), array('rotateImageNDegrees' => 120, 'adaptiveResize' => array(300, 300))); ?>

Because of the rules in the .htaccess file, if the file exists, web server is simply going to serve it so the image generation is not triggered. If it's not there, the plugin controller is called. The string *eyJyb3RhdGVJbWFnZU5EZWdyZWVzIjpbMTgwXSwiYWRhcHRpdmVSZXNpemUiOlszMDAsMzAwXX0=* is decoded to
a IMG tag that looks like this:

<img src="http://cms/thumbs/img/cake.icon.png/eyJyb3RhdGVJbWFnZU5EZWdyZWVzIjoxMjAsImFkYXB0aXZlUmVzaXplIjpbMzAwLDMwMF19.png" width="200" height="200" alt="Upside down cake" />

Because of the rules in the .htaccess file, if the file exists, web server is simply going to serve it so the image generation is not triggered. If it's not there, the plugin controller is called. The string *eyJyb3RhdGVJbWFnZU5EZWdyZWVzIjoxMjAsImFkYXB0aXZlUmVzaXplIjpbMzAwLDMwMF19* is decoded to

stdClass Object
(
[rotateImageNDegrees] => Array
(
[0] => 180
)

[rotateImageNDegrees] => 120
[adaptiveResize] => Array
(
[0] => 300
Expand Down

0 comments on commit 3d17b46

Please sign in to comment.