-
AuthorPosts
-
February 8, 2012 at 5:25 pm #173696
Hi,
I’m using JA CatSlwi module (JA_Sulfur template) in my website but I would the images I’m using were crop from the edge and not in center position.
The module have a control panel that allow to customize differents parameters including if crop or not the images displayed.
the problem is that the crop is only in the center part of the image (with a personalized dimension),there is a way permitting me start cropping from the right edge?
Thanks all for attention.
Tom
February 10, 2012 at 10:56 am #437818Nobody helps me?!?…..no ideas?
February 17, 2012 at 3:26 pm #438690I found that!:
How can I change this code for cropping from the right edge?
[PHP]if ( $crop ) { // processing crop image
$dst->w = $width;
$dst->h = $height;
if ( ($size[0] <= $width) && ($size[1] <= $height) ) {
$src->w = $width;
$src->h = $height;
} else {
if ($x_ratio < $y_ratio) {
$src->w = ceil ( $width / $y_ratio );
$src->h = $size[1];
} else {
$src->w = $size[0];
$src->h = ceil ( $height / $x_ratio );
}
}
$src->x = floor ( ($size[0] – $src->w) / 2 );
$src->y = floor ( ($size[1] – $src->h) / 2 );
} [/PHP]some php master here?
thanksAuthorPostsViewing 3 posts - 1 through 3 (of 3 total)This topic contains 3 replies, has 1 voice, and was last updated by eshealth 12 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Crop images from the edge in "Image settings MODULE PARAMETERS" of JA CatSlwi
Viewing 3 posts - 1 through 3 (of 3 total)