-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add recolor to make Pop Art #108
base: master
Are you sure you want to change the base?
Conversation
@dahlia is imagemagick thread safe? If so, I can make a parrel version to do this to faster. |
Thanks for your efforts. The most things are fine, but…
On Mac at least it’s not thread safe. |
@@ -672,6 +672,29 @@ def __getitem__(self, idx): | |||
return self[:, idx] | |||
raise TypeError('unsupported index type: ' + repr(idx)) | |||
|
|||
def recolor(self, color_func): | |||
if not color_func or not callable(color_func): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don’t need to check not color_func
. ;-)
Adjustments are find! Could you write some docstring for this method? |
😰 |
It takes very long time for me… how can we improve its performance? |
en... better but not enough, I am working on a c version 😟 |
@dahlia I have test the c version, only about 2 seconds to dispose of 2102x2102 jpg using this code:
full code https://github.com/beartung/pop_art_wand/blob/master/pop_art.c I will try this method in python later... |
We will go to CFFI from |
I want to make a pop art photo with wand, but not found any function to manipulate pixels.
The example is here: https://github.com/beartung/pop_art_wand
looks like this: