Menu

#220 Cleanup / Refactor applyPixelFunction method

1.3
closed
None
2012-03-26
2012-01-06
No

Rewrite applyPixelFunction (it was in the alpha_mask branch) to use vectorize so it is a reasonably fast. applyPixelFunction takes a single parameter a function pointer that takes in an rgb triplet and returns an rgb triplet. The user can do any operation on the triplet.

e.g.

def myFunc((r,g,b)):
return(b,g,r)

img.applyPixelFunc(myFunc)

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB