Project

General

Profile

Actions

Feature #15705

closed

Cropscale for imgResources

Added by Stefan Geith almost 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2006-02-23
Due date:
% Done:

0%

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

Description

This is a patch for the file t3lib/class.t3lib_stdgraphic.php that modifies the functions imageMagickConvert() and getImageScale() to allow cropscale.

In opposite to standard scaling with maxwidth and maxheight (e.g. by .width=100m and .height=80m) where the image is scaled to fit into a rectangle (in this case 100x80px), cropscale (e.g. .width=100c and .heigth=80c) will scale to fit around the rectangle and then crop out a centered rectangle.

The last step (cropping out a centered rectangle) can further be modified by moving the centered position to the top/left (0 ... -100%) or bottom/right (0 .. 100%).

Syntax is (for example):
file = image.jpg
file.width = 120c-50
file.height = 90c // same as 90c0

This means, that image.jpg is scaled to fit around a 120x90px rectangle and then a 120x90px rectangle is cropped out: verticallyh centered (90c), orizontally centering moved 50% (120c-50) to the left.

(issue imported from #M2675)


Files

stdgraphic.patch (3.99 KB) stdgraphic.patch Administrator Admin, 2006-02-23 11:56

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #15403: Add cropscale to imgResourcesClosed2006-01-13

Actions
Actions

Also available in: Atom PDF