Coverage for /home/martinb/.local/share/virtualenvs/camcops/lib/python3.6/site-packages/wand/cdefs/pixel_iterator.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1""":mod:`wand.cdefs.pixel_iterator` --- Pixel-Iterator definitions
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.. versionadded:: 0.5.0
5"""
6from ctypes import POINTER, c_void_p, c_int, c_size_t
7from wand.cdefs.wandtypes import c_ssize_t, c_magick_char_p
9__all__ = ('load',)
12def load(lib, IM_VERSION):
13 """Define Pixel Iterator methods. The ImageMagick version is given as
14 a second argument for comparison. This will quick to determine which
15 methods are available from the library, and can be implemented as::
17 if IM_VERSION < 0x700:
18 # ... do ImageMagick-6 methods ...
19 else
20 # ... do ImageMagick-7 methods ...
22 .. seealso::
24 #include "wand/pixel-iterator.h"
25 // Or
26 #include "MagickWand/pixel-iterator.h"
28 :param lib: the loaded ``MagickWand`` library
29 :type lib: :class:`ctypes.CDLL`
30 :param IM_VERSION: the ImageMagick version number (i.e. 0x0689)
31 :type IM_VERSION: :class:`numbers.Integral`
33 .. versionadded:: 0.5.0
35 """
36 lib.ClonePixelIterator.argtypes = [c_void_p]
37 lib.ClonePixelIterator.restype = c_void_p
38 lib.DestroyPixelIterator.argtypes = [c_void_p]
39 lib.DestroyPixelIterator.restype = c_void_p
40 lib.IsPixelIterator.argtypes = [c_void_p]
41 lib.NewPixelIterator.argtypes = [c_void_p]
42 lib.NewPixelIterator.restype = c_void_p
43 lib.PixelClearIteratorException.argtypes = [c_void_p]
44 lib.PixelGetIteratorException.argtypes = [c_void_p, POINTER(c_int)]
45 lib.PixelGetIteratorException.restype = c_magick_char_p
46 lib.PixelGetNextIteratorRow.argtypes = [c_void_p, POINTER(c_size_t)]
47 lib.PixelGetNextIteratorRow.restype = POINTER(c_void_p)
48 lib.PixelSetFirstIteratorRow.argtypes = [c_void_p]
49 lib.PixelSetIteratorRow.argtypes = [c_void_p, c_ssize_t]