In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

View Revisions: Issue #28 All Revisions ] Back to Issue ]
Summary 0000028: Add crop ability to ImageHelper class
Revision 2009-07-20 09:27:15 by alex
Description 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.

Revision 2009-07-19 06:48:35 by alex
Description Add ability to crop image during resizing.

Invocation syntax:
<inp2:sample-prefix_Field name="ImageField" format="resize:100x200;crop:c|c"/>

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.




Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker