Closed demianturner closed 11 years ago
[lakiboy] Sorry for long reply. The logic looks good, but can u please submit a patch like all other folks do?
Then, please, follow our coding standards (i.e. PEAR CS). And put example parameter into modules/media/image.ini with others.
Dmitri
[lakiboy] added crop strategy in [3571]
This code scales down then crops an image so that thumbnails are always the same size e.g. 55 x 55 no matter the aspect ratio of the uploaded file.
I saved this file as lib/SGL/ImageTransform/CropStrategy.php
{{{ class SGL_ImageTransform_CropStrategy extends SGL_ImageTransformStrategy { function transform() {
}
Then used:
[default_small] crop = width:120,height:120
in modules/media/image.ini
not really sure how to submit this to Seagull project. }}}