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

Merged
merged 13 commits into from Mar 23, 2013

Conversation

3 participants
@beartung
Contributor

beartung commented Jan 10, 2013

add gif resize, save to blob or file

@wronglink

This comment has been minimized.

Contributor

wronglink commented Jan 10, 2013

Wouldn't it be better to use sequences api for this case?

@beartung

This comment has been minimized.

Contributor

beartung commented Jan 10, 2013

@wronglink which api? @_@

@wronglink

This comment has been minimized.

Contributor

wronglink commented Jan 10, 2013

@beartung take a look at #39 and #66.

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Jan 10, 2013

It seems complete, without using sequences API. @beartung, can you write unit tests for it?

wand/api.py Outdated
@@ -379,6 +392,7 @@ class MagickPixelPacket(ctypes.Structure):
libmagick.GetMagickReleaseDate.argtypes = []
libmagick.GetMagickReleaseDate.restype = ctypes.c_char_p
except AttributeError:
print traceback.print_exc()

This comment has been minimized.

@dahlia

dahlia Jan 10, 2013

Collaborator

Please remove this and above import traceback.

@beartung

This comment has been minimized.

Contributor

beartung commented Jan 10, 2013

@dahlia done
@wronglink I think it's better to resize a gif like resizing other format image : )

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Jan 11, 2013

@beartung Travis CI says its test failed. Have you run the tests? You can do that using python setup.py test command. (See the docs.)

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Jan 11, 2013

@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.

@wronglink

This comment has been minimized.

Contributor

wronglink commented Jan 11, 2013

@dahlia sure ;-)

with img.clone() as a:
assert a.size == (350, 197)
a.resize(175, 98)
a.write(filename="175_98.gif")

This comment has been minimized.

@dahlia

dahlia Jan 11, 2013

Collaborator

You probably thought Image.save(), not write().

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Jan 11, 2013

Plus, we can make crop() to work as well in the same way, and it will be more consistent.

@beartung

This comment has been minimized.

Contributor

beartung commented Jan 12, 2013

@dahlia test fixed, I will try crop today :)

@beartung

This comment has been minimized.

Contributor

beartung commented Jan 14, 2013

@dahlia I added crop and rotate with tests.

@beartung

This comment has been minimized.

Contributor

beartung commented Jan 16, 2013

so... can this pr merge?

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Jan 16, 2013

@beartung I’ll eventually merge this, but I didn’t decide where to merge (master or 0.2-maintenance).

beartung added some commits Feb 6, 2013

int
sub

dahlia added a commit that referenced this pull request Mar 23, 2013

Merge pull request #88 from beartung/master
Add gif resize support

@dahlia dahlia merged commit 0fa7c52 into emcconville:master Mar 23, 2013

1 check passed

default The Travis build passed
Details

dahlia added a commit that referenced this pull request Mar 23, 2013

dahlia added a commit that referenced this pull request Mar 23, 2013

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Mar 23, 2013

@beartung I didn’t add credit of you to changelog (ba40270) because I couldn’t find your name. I’ll surely add credit if you want to and let me know your name. 😄

@beartung

This comment has been minimized.

Contributor

beartung commented Mar 23, 2013

@dahlia thanks for merge it. I have my profile updated. My name is Bear Dong ^O^

dahlia added a commit that referenced this pull request Mar 23, 2013

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Mar 23, 2013

@beartung Done! Thanks. 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment