Fixed
Details
Priority
MinorAssignee
AlexAlexReporter
AlexAlexPatch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
External issue ID
28External issue URL
Fix versions
Details
Details
Priority
Assignee
Alex
AlexReporter
Alex
AlexPatch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
External issue ID
28
External issue URL
Fix versions
Created May 23, 2009 at 8:49 AM
Updated December 29, 2024 at 9:33 PM
Resolved October 3, 2009 at 12:56 PM
Add ability to crop image during resizing.
Invocation syntax:
<inp2:sample-prefix_Field name="ImageField" format="resize:100x200;crop:c|c"/>
Invocation syntax for catalog item/category images:
<inp2:prefix_Image render_as="article_image" thumbnail="1" DefaultImage="img/no_article_image.gif" Crop="c|c" MaxWidth="143" MaxHeight="124" DefaultWidth="143" />
<inp2:prefix_Image render_as="article_image" thumbnail="1" DefaultImage="img/no_article_image.gif" Crop="1" MaxWidth="143" MaxHeight="124" DefaultWidth="143" />
Description:
Resize image (keeping proportions) to maximal possible size based on given (width - 100, height - 200), then crop rectangle area of given size (width - 100, height - 200) from center of resized image.
Crop format part accepts 2 arguments separated by "|": "crop:<x_position>|<y_position>". Positive value is crop offset from left/top. Negative value is crop offset from right/bottom. "C"/"c" is centered horizontally or vertically.