Black bars in non-occupied space using Define Canvas action
robphillips - May 19, 2009 - 15:10
| Project: | Imagecache Actions |
| Version: | 5.x-3.1 |
| Component: | Canvas Actions Module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
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.
| Attachment | Size |
|---|---|
| imagecache_sample.png | 6.65 KB |
| preset_config.png | 31.85 KB |

#1
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..
#2
... 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.
#3
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.
#4
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?
#5
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.
#6
They are looking at this over in #437702: Separate background color and transparency options, add them to crops that enlarge the canvas