Background color problem

See all posts Reply

Background color problem new!
by Anubis, 16 years, 10 months ago
Hi, i love the new features in 0.24. image_ratio_fill is great! Thanks.

However, I have a problem with the image_ratio_fill function. I have set the background color to '#FFFFFF', but it seems the script ignores this because it fills the image with black.

$handle->auto_create_dir         = true;
$handle->dir_auto_chmod          = true;
$handle->file_auto_rename        = true;
$handle->file_safe_name          = true;
$handle->image_resize            = true;
$handle->image_x                 = 290;
$handle->image_y                 = 222;
$handle->image_background_color  = '#FFFFFF';
$handle->image_ratio_fill        = 'BRL';
$handle->image_convert           = 'jpg';
$handle->jpeg_quality            = 95;

Can you help me?Reply
Re: Background color problem new!
by colin, 16 years, 10 months ago
Yes, there is a bug, that someone reported to me a few days ago. I will be fixed in the next release.

In the meantime, you can comment out the following line in the create_image() function:
//if (is_resource($image)) imagecolortransparent($image, imagecolorexact($image, 0, 0, ($blue == 0 ? 255 : 0)));

This is only a quick fix, which may or may not work (let me know!). A proper fix for this bug will be in the next release, that I will publish in a few days if everything goes well.Reply
Re: Background color problem new!
by Anubis, 16 years, 10 months ago
Thanks for your prompt reply, but i still got a black background.Reply
Re: Background color problem new!
by colin, 16 years, 10 months ago
Can you post your code here, and upload your test image and link it here? I will have a look.Reply
Re: Background color problem new!
by Anubis, 16 years, 10 months ago
Hi Colin,

There is no code, except your beautiful class and the settings above (startpost).

The only thing I did, was making the correction as you mentioned above.Reply
Re: Background color problem new!
by Anubis, 16 years, 10 months ago
Hi Colin,

Do you have an idea what I can do about the problem?Reply