Image Edit - new Area always Black

On a clean Concrete5 8.5.9, php7.4 install:

If i edit an jpg image, set the background color to white (or any color) and crop the image to be larger than before, i would expect the new area to be the color i selected. It is even the selected color in the preview when saving but the end result is always filled black.

Is there a way to fix this?

I’ll try to attach a demovideo if i find out how.

Thanks

don’t think i can attach a webM so here it is: webm.red - c5 image edit

1 Like

Hello,
My advice: don’t use these “tricks”, I think they don’t work very well (and it’s not concrete5, all the tools of this kind proposed in CMS do the job rather badly), and modify the images with a “real” image editor (like gimp) then use them with the file manager, there you’ll have 100% control

I can do that no Problem. But i want to ship a product to the customer who pays and expects this feature after it has been advertised. So “don’t use it” is not really satisfying.

There could be a difference between the core using GD or ImageMagick to do the resizing, which in turn depends on what is installed on your server.

I am using GD locally and on the production system. I’ll try to get ImageMagick to run but looking for something in the documentation. So far without success.

Edit: got ImageMagick to run with same results. jpg does not respect any background color settings and fills just black.

JPG doesn’t support transparency. PNG does. With JPG, you would need to select the area you want to fill and fill it (or paint it) with a foreground colour.

I just saw that my webM was cut and the essential part was not shown so here is a (heavy) gif to show it.

I don’t want to do anything with transparency. I want to have the output that is shown while editing the image to be in the actual saved image. Now the editing shows white (or any other color) but the result is always black.

demogif: c5 imageedit - Album on Imgur

You could raise a GitHub issue on that. As v8 is soon to be legacy, I doubt if it would ever be addressed unless the issue also affects v9 (which uses a different image editor).

I don’t bother then.

In v9 the toast-editor does not allow resizing larger than the initial image so the problem does not exist because the feature does not exist.

If you would like toast in v8, it is incorporated into my Snapshot addon

You can try the upload (or capture) and toast edit at