Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Imager CPAN distribution.

Maintainer(s)' notes

Tickets for Imager are now on github at https://github.com/tonycoz/imager

Report information
The Basics
Id: 97404
Status: resolved
Priority: 80/
Queue: Imager

People
Owner: Nobody in particular
Requestors: jt [...] plainblack.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Alpha not working in Imager 0.99
Date: Tue, 22 Jul 2014 10:39:55 -0500
To: bug-Imager [...] rt.cpan.org
From: JT Smith <jt [...] plainblack.com>
Download (untitled) / with headers
text/plain 355b
I tried getting alpha transparencies working following the instructions here: http://imager.perl.org/docs/Imager/Color.html However, no matter what I do, the alpha channel doesn’t seem to work. I may be doing something wrong, or it may be broken. I thought I should report it to find out. I’ve attached some sample code and a sample output image.
Download alpha-test.png
image/png 667b
alpha-test.png
Download alpha.pl
text/x-perl 474b

Message body is not shown because sender requested not to inline it.

On Tue Jul 22 11:40:15 2014, jt@plainblack.com wrote: Show quoted text
> I tried getting alpha transparencies working following the > instructions here: http://imager.perl.org/docs/Imager/Color.html > > However, no matter what I do, the alpha channel doesn’t seem to work. > I may be doing something wrong, or it may be broken. I thought I > should report it to find out. > > I’ve attached some sample code and a sample output image.
It's more a missing feature. By default, box(), and most other methods, replace the underlying pixel rather than combining with it. If you sample had used a 4 channel image, the blue part of the image would have been translucent. This is something I plan to change, someday, but there are other issues I want to fix first. You can use fill objects (and Imager's shortcut for fill objects) to do transparent fills: $image->box(fill => { solid => $color, combine => "normal" }, xmin => 150, ymin => 150, xmax => 250, ymax => 250) or die $image->errstr; Note that setting "filled" to non-zero as you did causes the "fill" parameter to be ignored. Tony
Ticket migrated to github as https://github.com/tonycoz/imager/issues/418


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.