Hide keyboard shortcuts

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.magick_property` --- Magick-Property definitions 

2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

3 

4.. versionadded:: 0.5.0 

5""" 

6from ctypes import (POINTER, c_void_p, c_char_p, c_size_t, c_ubyte, c_uint, 

7 c_int, c_ulong, c_double) 

8from wand.cdefs.wandtypes import c_magick_char_p 

9 

10__all__ = ('load',) 

11 

12 

13def load(lib, IM_VERSION): 

14 """Define Magick Wand property methods. The ImageMagick version is given as 

15 a second argument for comparison. This will quick to determine which 

16 methods are available from the library, and can be implemented as:: 

17 

18 if IM_VERSION < 0x700: 

19 # ... do ImageMagick-6 methods ... 

20 else 

21 # ... do ImageMagick-7 methods ... 

22 

23 .. seealso:: 

24 

25 #include "wand/magick-property.h" 

26 // Or 

27 #include "MagickWand/magick-property.h" 

28 

29 :param lib: the loaded ``MagickWand`` library 

30 :type lib: :class:`ctypes.CDLL` 

31 :param IM_VERSION: the ImageMagick version number (i.e. 0x0689) 

32 :type IM_VERSION: :class:`numbers.Integral` 

33 

34 .. versionadded:: 0.5.0 

35 

36 """ 

37 lib.MagickDeleteImageArtifact.argtypes = [c_void_p, c_char_p] 

38 lib.MagickDeleteImageArtifact.restype = c_int 

39 lib.MagickDeleteImageProperty.argtypes = [c_void_p, c_char_p] 

40 lib.MagickDeleteImageProperty.restype = c_int 

41 lib.MagickDeleteOption.argtypes = [c_void_p, c_char_p] 

42 lib.MagickDeleteOption.restype = c_int 

43 lib.MagickGetAntialias.argtypes = [c_void_p] 

44 lib.MagickGetAntialias.restype = c_int 

45 lib.MagickGetBackgroundColor.argtypes = [c_void_p] 

46 lib.MagickGetBackgroundColor.restype = c_void_p 

47 lib.MagickGetColorspace.argtypes = [c_void_p] 

48 lib.MagickGetColorspace.restype = c_int 

49 lib.MagickGetCompression.argtypes = [c_void_p] 

50 lib.MagickGetCompression.restype = c_int 

51 lib.MagickGetCompressionQuality.argtypes = [c_void_p] 

52 lib.MagickGetCompressionQuality.restype = c_size_t 

53 lib.MagickGetFont.argtypes = [c_void_p] 

54 lib.MagickGetFont.restype = c_char_p 

55 lib.MagickGetGravity.argtypes = [c_void_p] 

56 lib.MagickGetGravity.restype = c_int 

57 lib.MagickGetImageArtifact.argtypes = [c_void_p, c_char_p] 

58 lib.MagickGetImageArtifact.restype = c_magick_char_p 

59 lib.MagickGetImageArtifacts.argtypes = [ 

60 c_void_p, c_char_p, POINTER(c_size_t) 

61 ] 

62 lib.MagickGetImageArtifacts.restype = POINTER(c_char_p) 

63 lib.MagickGetImageProfile.argtypes = [ 

64 c_void_p, c_char_p, POINTER(c_size_t) 

65 ] 

66 lib.MagickGetImageProfile.restype = POINTER(c_ubyte) 

67 lib.MagickGetImageProfiles.argtypes = [ 

68 c_void_p, c_char_p, POINTER(c_size_t) 

69 ] 

70 lib.MagickGetImageProfiles.restype = POINTER(c_char_p) 

71 lib.MagickGetImageProperty.argtypes = [c_void_p, c_char_p] 

72 lib.MagickGetImageProperty.restype = c_magick_char_p 

73 lib.MagickGetImageProperties.argtypes = [ 

74 c_void_p, c_char_p, POINTER(c_size_t) 

75 ] 

76 lib.MagickGetImageProperties.restype = POINTER(c_char_p) 

77 lib.MagickGetInterlaceScheme.argtypes = [c_void_p] 

78 lib.MagickGetInterlaceScheme.restype = c_int 

79 lib.MagickGetOption.argtypes = [c_void_p, c_char_p] 

80 lib.MagickGetOption.restype = c_char_p 

81 lib.MagickGetPointsize.argtypes = [c_void_p] 

82 lib.MagickGetPointsize.restype = c_double 

83 lib.MagickGetQuantumRange.argtypes = [POINTER(c_size_t)] 

84 lib.MagickGetResource.argtypes = [c_int] 

85 lib.MagickGetResource.restype = c_size_t 

86 lib.MagickGetResourceLimit.argtypes = [c_int] 

87 lib.MagickGetResourceLimit.restype = c_size_t 

88 lib.MagickGetSize.argtypes = [c_void_p, POINTER(c_uint), POINTER(c_uint)] 

89 lib.MagickGetSize.restype = c_int 

90 lib.MagickQueryConfigureOption.argtypes = [c_char_p] 

91 lib.MagickQueryConfigureOption.restype = c_magick_char_p 

92 lib.MagickQueryConfigureOptions.argtypes = [c_char_p, POINTER(c_size_t)] 

93 lib.MagickQueryConfigureOptions.restype = POINTER(c_magick_char_p) 

94 lib.MagickQueryFontMetrics.argtypes = [c_void_p, c_void_p, c_char_p] 

95 lib.MagickQueryFontMetrics.restype = POINTER(c_double) 

96 lib.MagickQueryFonts.argtypes = [c_char_p, POINTER(c_size_t)] 

97 lib.MagickQueryFonts.restype = POINTER(c_magick_char_p) 

98 lib.MagickQueryFormats.argtypes = [c_char_p, POINTER(c_size_t)] 

99 lib.MagickQueryFormats.restype = POINTER(c_magick_char_p) 

100 lib.MagickQueryMultilineFontMetrics.argtypes = [ 

101 c_void_p, c_void_p, c_char_p 

102 ] 

103 lib.MagickQueryMultilineFontMetrics.restype = POINTER(c_double) 

104 lib.MagickRemoveImageProfile.argtypes = [ 

105 c_void_p, c_char_p, POINTER(c_size_t) 

106 ] 

107 lib.MagickRemoveImageProfile.restype = POINTER(c_ubyte) 

108 lib.MagickSetAntialias.argtypes = [c_void_p, c_int] 

109 lib.MagickSetAntialias.restype = c_int 

110 lib.MagickSetColorspace.argtypes = [c_void_p, c_int] 

111 lib.MagickSetColorspace.restype = c_int 

112 lib.MagickSetCompression.argtypes = [c_void_p, c_int] 

113 lib.MagickSetCompression.restype = c_int 

114 lib.MagickSetCompressionQuality.argtypes = [c_void_p, c_size_t] 

115 lib.MagickSetCompressionQuality.restype = c_int 

116 lib.MagickSetBackgroundColor.argtypes = [c_void_p, c_void_p] 

117 lib.MagickSetBackgroundColor.restype = c_int 

118 lib.MagickSetDepth.argtypes = [c_void_p, c_uint] 

119 lib.MagickSetDepth.restype = c_int 

120 lib.MagickSetFilename.argtypes = [c_void_p, c_char_p] 

121 lib.MagickSetFont.argtypes = [c_void_p, c_char_p] 

122 lib.MagickSetFont.restype = c_int 

123 lib.MagickSetFormat.argtypes = [c_void_p, c_char_p] 

124 lib.MagickSetFormat.restype = c_int 

125 lib.MagickSetGravity.argtypes = [c_void_p, c_int] 

126 lib.MagickSetGravity.restype = c_int 

127 lib.MagickSetImageArtifact.argtypes = [c_void_p, c_char_p, c_char_p] 

128 lib.MagickSetImageProfile.argtypes = [ 

129 c_void_p, c_char_p, c_void_p, c_size_t 

130 ] 

131 lib.MagickSetImageProfile.restype = c_int 

132 lib.MagickSetImageProperty.argtypes = [c_void_p, c_char_p, c_char_p] 

133 lib.MagickSetInterlaceScheme.argtypes = [c_void_p, c_int] 

134 lib.MagickSetInterlaceScheme.restype = c_int 

135 lib.MagickSetOption.argtypes = [c_void_p, c_char_p, c_char_p] 

136 lib.MagickSetOption.restype = c_int 

137 lib.MagickSetPointsize.argtypes = [c_void_p, c_double] 

138 lib.MagickSetPointsize.restype = c_int 

139 lib.MagickSetResourceLimit.argtypes = [c_int, c_size_t] 

140 lib.MagickSetResourceLimit.restype = c_int 

141 if IM_VERSION >= 0x708: 

142 try: 

143 lib.MagickSetSeed.argtypes = [c_void_p, c_ulong] 

144 except AttributeError: 

145 lib.MagickSetSeed = None 

146 else: 

147 lib.MagickSetSeed = None 

148 lib.MagickSetSize.argtypes = [c_void_p, c_uint, c_uint] 

149 lib.MagickSetSize.restype = c_int