Project

General

Profile

Actions

Feature #15403

closed

Add cropscale to imgResources

Added by Stefan Geith over 18 years ago. Updated about 18 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Communication
Target version:
-
Start date:
2006-01-13
Due date:
% Done:

0%

Estimated time:
PHP Version:
4
Tags:
Complexity:
Sprint Focus:

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

class.ux_tslib_gifbuilder.php (12.4 KB) class.ux_tslib_gifbuilder.php Administrator Admin, 2006-01-13 16:41
class.t3lib_stdgraphic.php.diff (3.85 KB) class.t3lib_stdgraphic.php.diff Administrator Admin, 2006-01-19 17:03
class.tslib_content.php.diff (604 Bytes) class.tslib_content.php.diff Administrator Admin, 2006-01-19 17:04

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #15705: Cropscale for imgResourcesClosedWolfgang Klinger2006-02-23

Actions
Actions #1

Updated by Stefan Geith about 18 years ago

I got some help, so I could create 2 diff-files ...

Actions #2

Updated by Stefan Geith about 18 years ago

This can be closed, because newer feature-request with new patch is here: http://bugs.typo3.org/view.php?id=2675

Actions #3

Updated by Karsten Dambekalns about 18 years ago

Superseded by #15705

Actions

Also available in: Atom PDF