Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: Using Imager getpixel

by Anonymous Monk
on Sep 22, 2014 at 17:16 UTC ( [id://1101549]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Using Imager getpixel
in thread Using Imager getpixel

my $image_file = "a.bmp"; my $img = Imager->new(file => $image_file) or die Imager->errstr; my @color = 0; $szerokosc = $img->getwidth(); $wysokosc = $img->getheight(); print"wymiar $szerokosc, $wysokosc\n"; for($x=0;$x<=$szerokosc - 1;$x++){ for($y=0;$y<=$wysokosc - 1;$y++){ my $color = $img->getpixel( x => $x, y => $y ); my ( $r, $g, $b, $a ) = $color->rgba(); print " shade = $r, $g, $b\n"; } } <>;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1101549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2026-04-18 07:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.