- πͺπΈSpain candelas
Good ideas are good ideas.
I would love to have this one for Drupal 11 and 10.
Do you know if any module has implemented? I don't find any.
This is my first attempt at submitting a patch, so please go easy on me. I have noticed many posts from people using imagecache that would like to avoid having black backgrounds on cropped images. One solution is to allow the scaling function to upscale images, but in my situation, I would just rather have the crop action not perform the crop at all if the image is smaller than the size to be cropped too.
The drawback here is that you can't enforce a Standard size for images across the board - but what can you do when your users upload low resolution images? I say you should just let them be low resolution.
Here is what the patch does, it is pretty simple addition on line 199:
case 'crop':
// Patch to ensure images dont get cropped to a larger size if they are smaller than the crop size, otherwise they will get a black background
if ($action['data']['width'] > $size[0]) {
$action['data']['width'] = $size[0];
$action['data']['xoffset'] = 0;
}
if ($action['data']['height'] > $size[1]) {
$action['data']['height'] = $size[1];
$action['data']['yoffset'] = 0;
}
....
Needs work
9.5
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Good ideas are good ideas.
I would love to have this one for Drupal 11 and 10.
Do you know if any module has implemented? I don't find any.