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.

AttachmentSize
imagecache_sample.png6.65 KB
preset_config.png31.85 KB

#1

dman - May 19, 2009 - 17:51

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..

AttachmentSize
imagecache_actions-define_canvas_with_crop_and_scale.png 44.53 KB
imagecache_actions-define_canvas_with_scale.png 39.67 KB

#2

dman - May 19, 2009 - 17:56

... 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

robphillips - May 19, 2009 - 18:22

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

dman - May 19, 2009 - 22:12
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?

#5

robphillips - May 20, 2009 - 00:59
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.

#6

dman - May 25, 2009 - 00:10
 
 

Drupal is a registered trademark of Dries Buytaert.