Feature #15403
closedAdd cropscale to imgResources
0%
Description
With 'cropscale' images are scaled to a size, that encloses the width/height box; After scaling, a centered portion of the image with size = width/height is cropped out.
Cropscale ensures, that the image created always has exactly the dimensions width/height, but left/right-or top/bottom-part is cut off.
I created the extension 'sg_cropscale', that extends tslib_gifbuilder via XClass (functions imageMagickConvert and getImageScale).
Now the properties 'width' and 'height' of 'imgResource' can have a 'c' after it, what indicates 'cropscale'.
And two new properties (cropV and cropH) have been introduced where I can set if cropping is centered or left/top aligned:
file.cropH=-100 (left-aligned) | 0 (centered) | 100 (right aligned)
file.cropV=-100 (top-aligned) | 0 (centered) | 100 (bottom aligned)
These are percentage values and so the cropping can be moved somewhat to the top (e.g. cropV=-50) or to the right (cropH=33)...
The plugin can be found here:
http://typo3.org/extensions/repository/search/sg_cropscale/
I am not familiar with diff :(
but I marked all changes with comments in the file class.ux_tslib_gifbuilder.php and appended it.
I hope, a core developper finds the time to do the patch or include it directly to the core.
(issue imported from #M2252)
Files
Updated by Stefan Geith almost 19 years ago
I got some help, so I could create 2 diff-files ...
Updated by Stefan Geith almost 19 years ago
This can be closed, because newer feature-request with new patch is here: http://bugs.typo3.org/view.php?id=2675