Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Photo Upload Starting Point
# do a typical thumbnail, preserving aspect ratio
new_photo = photo.copy()
(width, height),
thumbfile = cStringIO.StringIO()
save_args = {'format': format}
if format == 'JPEG':
save_args['quality'] = 85, **save_args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.