-
Notifications
You must be signed in to change notification settings - Fork 0
Python ctypes binding to MagickWand C API of the ImageMagick library
License
vlprans/pywand
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This package is a Python ctypes binding to MagickWand C API of a popular ImageMagick library ( https://www.imagemagick.org ). It provides Python interface to call MagickWand API functions directly. Also it defines lightweight transparent wrappers of MagickWand's types containing relevant __del__() definition which calls C API functions to correctly reclaim objects. Here is a small example of a code that creates an image's thumbnail (adapted from MagickWand examples on https://www.imagemagick.org/script/magick-wand.php ): from pywand import * if __name__ == '__main__': wand = NewMagickWand() if not MagickReadImage(wand, 'logo.gif'): wand.throw_error() MagickResetIterator(wand) while MagickNextImage(wand): MagickResizeImage(wand, 106, 80, LanczosFilter, 1.) if not MagickWriteImages(wand, 'logo_thumb.gif', True): wand.throw_error()
About
Python ctypes binding to MagickWand C API of the ImageMagick library
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published