I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-04-27 03:39:29-07 by anguila
when I use setpixel(x,y, color!=black) it puts those pixel black
$p = Imager->new(xsize=>70, ysize=>32, channels=> 4); $p->setpixel(x=>32, y=>50, color=>'#DC6464'); $p->write(file=>'p.gif', type=>'gif') or die $p->errstr();

I put the sample code to know the image information in my code and the report:
Image information: Width: 70 Height: 32 Channels: 4 Bits/Channel: 8 Virtual: No Actual number of colors in image: 2 Type: direct Modifiable Channels: 0 1 2 3 4

The image have all the pixels black and it have 4 channels.. so isn't in grayscale, and I put the color '#DC6464'. I don't know what I'm missing... Thanks :)
Direct Responses: 7773 | Write a response
Posted on 2008-04-27 23:57:45-07 by tonyc in response to 7772
Re: when I use setpixel(x,y, color!=black) it puts those pixel black

Your image is 32 pixels high and you're trying to write at y == 50.

Changing:

$p->setpixel(x=>32, y=>50, color=>'#DC6464');

to

$p->setpixel(x=>32, y=>31, color=>'#DC6464');

will draw a pixel on the last row of the image.

Direct Responses: Write a response