Search found 3 matches

by Flodelarab
2018-12-02T12:49:15-07:00
Forum: PerlMagick
Topic: GetPixels() or Get(Pixel[x,y])
Replies: 3
Views: 111638

Re: GetPixels() or Get(Pixel[x,y])

To be complete, I post the code I have and works :

my @cp=$image->GetPixels(x=>$x,y=>$y,width=>1,height=>1, map=>'RGBA');
and
if ($s==3) {
$cp[$s] = 65535-$cp[$s];
}

$image->Set("pixel[$x,$y]"=>"$cp[0],$cp[1],$cp[2],$cp[3]",map=>'rgba',normalize=>'false');

Other codes don't work because ...
by Flodelarab
2018-11-07T05:24:37-07:00
Forum: PerlMagick
Topic: GetPixels() or Get(Pixel[x,y])
Replies: 3
Views: 111638

Re: GetPixels() or Get(Pixel[x,y])

First, thank you for your fast answer.

Second, my version of ImageMagick is 6.97 (Debian installation).
/usr/share/perl5/Image/Magick.pm points onto /usr/lib/x86_64-linux-gnu/perl5/5.24/Image/Magick/Q16.pm that is version 6.97.

Note that 64764 + 771 = 65535, 257 + 65278 = 65535, etc. OK.
I will ...
by Flodelarab
2018-11-06T18:23:19-07:00
Forum: PerlMagick
Topic: GetPixels() or Get(Pixel[x,y])
Replies: 3
Views: 111638

GetPixels() or Get(Pixel[x,y])

Hello :D

my @cp=$image->GetPixels(x=>$x,y=>$y, height=>1, width=>1);
print "$x $y ".$image->Get("pixel[$x,$y]")." $cp[0] $cp[1] $cp[2] $cp[3] $res\n";
gives, for example, such lines, with a png picture, having an alpha channel (RGBA) :

923 0 45232,45746,44461,64764 45232 45746 44461 771 39 ...