I recently updated ImageCache to version 2.4 and than noticed that black bars were showing in non-occupied space in my cropped/scaled images that use define canvas. Previously define canvas would create a white underlay, which fitted the theme much better than the standard black. I tested the actions using 5.x-2.3, 5.x-3.1, and even the 5.x-3.x-dev releases. All had the same result, it appears I have to stick with imagecache 2.3 and 5.x-2.3 in order for the Define Canvas action to work 100%.

Attached is an example of what is not right, the black area should be white. I've also attached a shot of the preset settings.

Comments

dman’s picture

Sounds like something we went through in #355230: Support transparent background for imagecache rotate
But why are you using crop there? That's the one that is creating that blank block.

(Note, I did also find a validation error within canvasactions UI that was breaking the alignment but not the fill - a fix for that is in the dev version)

... OH. You are still on Drupal 5... Um..

dman’s picture

... yeah it's the same problem and the same fix in D5.
imagecache (proper, not imagecache_actions) creates those blocks when cropping to a larger size.

bobooon’s picture

It works properly when using ImageAPI version 1.4 but using 1.5 it no longer works properly. I tried 1.5 with all the different version of imagecache_actions and none of them work properly. So right now I'm stuck using ImageAPI 1.4 and imagecache 2.x.

dman’s picture

Priority: Critical » Normal

How about you just don't crop?
As I demonstrated above.
Resizing and then setting canvas is the effect you want?
Cropping an already resized image is not helping do anything except destroy your transparency.

Yes, if you 'crop' a small image to a larger size, the sides get filled in with black. that would make it an imagecache 'crop' problem, not a define-canvas one, right?

bobooon’s picture

Status: Active » Needs review

I'll give it a try tomorrow, I only had time to skim it and missed that vital piece of information. Thanks for the help so far.

dman’s picture

fietserwin’s picture

Status: Needs review » Closed (works as designed)

I guess this one is not relevant anymore.