Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

tonyc's scratchpad

by tonyc (Pilgrim)
on Aug 08, 2005 at 01:45 UTC ( #481765=scratchpad: print w/replies, xml ) Need Help??

# from 0.48... use Inline C => <<'EOS' => WITH => 'Imager'; void inline_replace_color(Imager::ImgRaw img, Imager::Color from, Imager::Color to) { int x, y, ch; i_color c; for (x = 0; x < img->xsize; ++x) { for (y = 0; y < img->ysize; ++y) { int match = 1; i_gpix(img, x, y, &c); for (ch = 0; ch < img->channels; ++ch) { if ([ch] != from->channel[ch]) { match = 0; break; } } if (match) i_ppix(img, x, y, to); } } } EOS
Log In?

What's my password?
Create A New User
[PriNet]: go figure, i just tried that, it retains some of the values (not the key) of the pre-assigned value
[PriNet]: i guess i'll just have to use two seperate hashes, there are two, but one is larger than the other, and when i reference the smaller one, it holds onto the values that were assigned to the larger hash (the keynames change, but unless i reassign a new valu

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2017-06-28 03:02 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (619 votes). Check out past polls.