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 gif resize support #88
Conversation
Wouldn't it be better to use sequences api for this case? |
@wronglink which api? @_@ |
It seems complete, without using sequences API. @beartung, can you write unit tests for it? |
@@ -379,6 +392,7 @@ class MagickPixelPacket(ctypes.Structure): | |||
libmagick.GetMagickReleaseDate.argtypes = [] | |||
libmagick.GetMagickReleaseDate.restype = ctypes.c_char_p | |||
except AttributeError: | |||
print traceback.print_exc() |
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.
Please remove this and above import traceback
.
@dahlia done |
@beartung Travis CI says its test failed. Have you run the tests? You can do that using |
@wronglink Sorry for delaying merging sequences API (actually I had worked on this at late of the last year, but not done yet), if we has API and unit tests for it, we can reimplement it using sequences API when that is merged. |
@dahlia sure ;-) |
with img.clone() as a: | ||
assert a.size == (350, 197) | ||
a.resize(175, 98) | ||
a.write(filename="175_98.gif") |
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.
You probably thought Image.save()
, not write()
.
Plus, we can make |
@dahlia test fixed, I will try crop today :) |
@dahlia I added crop and rotate with tests. |
so... can this pr merge? |
@beartung I’ll eventually merge this, but I didn’t decide where to merge ( |
@dahlia thanks for merge it. I have my profile updated. My name is Bear Dong ^O^ |
@beartung Done! Thanks. 😸 |
add gif resize, save to blob or file