Hello Boudewijn and everyone else on this thread.
I found a small problem that had to be resolved for my purposes, maybe this can help you all and Boudewijn maybe you can add it to the next version if you think it is an improvement.
First I'll mention that on this specific website I am using 1.3.9h and IM 1.9.
My problem was that when there is no large image and the original image is smaller than the Maximum definition for large images on the IM settings, the large image that is being created is according to the Maximum definitions and in this case where the original is smaller it is actually not necessary and I prefer that it will take the properties from the original image for Large and shrink for Small/Medium.
The fix:
in admin/includes/functions/extra_functions/function_image_manager.php around line 888 locate this code:
Code:
else if ($dst_type == "large") {
$cw = $org_w / IM_MAX_LARGE_WIDTH;
$ch = $org_h / IM_MAX_LARGE_HEIGHT;
if ($cw > $ch) {
$dst_w = IM_MAX_LARGE_WIDTH;
$dst_h = round($org_h / $cw);
}
else {
$dst_h = IM_MAX_LARGE_HEIGHT;
$dst_w = round($org_w / $ch);
}
}
replace with this code:
Code:
else if ($dst_type == "large") {
$cw = $org_w / IM_MAX_LARGE_WIDTH;
$ch = $org_h / IM_MAX_LARGE_HEIGHT;
if ($cw > 1 || $ch > 1) {
if ($cw > $ch) {
$dst_w = IM_MAX_LARGE_WIDTH;
$dst_h = round($org_h / $cw);
}
else {
$dst_h = IM_MAX_LARGE_HEIGHT;
$dst_w = round($org_w / $ch);
}
} else {
$dst_w = $org_w;
$dst_h = $org_h;
}
}
Boudewijn let me know what you think.
Eran
Bookmarks