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_image` --- Magick-Image definitions 

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

3 

4.. versionadded:: 0.5.0 

5""" 

6from ctypes import (CFUNCTYPE, POINTER, c_void_p, c_int, c_size_t, c_double, 

7 c_char_p, c_uint, c_ubyte, c_bool) 

8from wand.cdefs.wandtypes import c_ssize_t, c_magick_char_p 

9 

10__all__ = ('MagickProgressMonitor', 'load') 

11 

12 

13#: (:class:`ctypes.CFUNCTYPE`) a function type to allow ImageMagick's progress 

14#: monitoring to call a python function. For example:: 

15#: 

16#: def myCallBack(filename, offset, size, user_data): 

17#: print(filename, offset, '/', size) 

18#: return True 

19#: iMyCallBack = MagickProgressMonitor(myCallBack) 

20#: library.MagickSetImageProgressMonitor(wand_instance, 

21#: iMyCallBack, 

22#: None) 

23#: 

24#: .. note:: 

25#: 

26#: TODO - Move to isoalted module. This shouldn't be defined at time of 

27#: mload. It might be wiser to create a method to allow the user to ask for 

28#: C-function-type. 

29MagickProgressMonitor = CFUNCTYPE(c_bool, 

30 c_char_p, 

31 c_ssize_t, 

32 c_size_t, 

33 c_void_p) 

34 

35 

36def load(lib, IM_VERSION): 

37 """Define Magick Image methods. The ImageMagick version is given as a 

38 second argument for comparison. This will quick to determine which methods 

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

40 

41 if IM_VERSION < 0x700: 

42 # ... do ImageMagick-6 methods ... 

43 else 

44 # ... do ImageMagick-7 methods ... 

45 

46 .. seealso:: 

47 

48 #include "wand/magick-image.h" 

49 // Or 

50 #include "MagickWand/magick-image.h" 

51 

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

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

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

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

56 

57 .. versionadded:: 0.5.0 

58 

59 """ 

60 is_im_6 = IM_VERSION < 0x700 

61 is_im_7 = IM_VERSION >= 0x700 

62 lib.GetImageFromMagickWand.argtypes = [c_void_p] 

63 lib.GetImageFromMagickWand.restype = c_void_p 

64 lib.MagickAdaptiveBlurImage.argtypes = [c_void_p, c_double, c_double] 

65 lib.MagickAdaptiveBlurImage.restype = c_bool 

66 if is_im_6: 

67 lib.MagickAdaptiveBlurImageChannel.argtypes = [ 

68 c_void_p, c_int, c_double, c_double 

69 ] 

70 lib.MagickAdaptiveBlurImageChannel.restype = c_bool 

71 lib.MagickAdaptiveResizeImage.argtypes = [c_void_p, c_size_t, c_size_t] 

72 lib.MagickAdaptiveResizeImage.restype = c_bool 

73 lib.MagickAdaptiveSharpenImage.argtypes = [c_void_p, c_double, c_double] 

74 lib.MagickAdaptiveSharpenImage.restype = c_bool 

75 if is_im_6: 

76 lib.MagickAdaptiveSharpenImageChannel.argtypes = [ 

77 c_void_p, c_int, c_double, c_double 

78 ] 

79 lib.MagickAdaptiveSharpenImageChannel.restype = c_bool 

80 if is_im_6: 

81 lib.MagickAdaptiveThresholdImage.argtypes = [ 

82 c_void_p, c_size_t, c_size_t, c_ssize_t 

83 ] 

84 lib.MagickAdaptiveThresholdImage.restype = c_bool 

85 else: 

86 lib.MagickAdaptiveThresholdImage.argtypes = [ 

87 c_void_p, c_size_t, c_size_t, c_double 

88 ] 

89 lib.MagickAdaptiveThresholdImage.restype = c_bool 

90 lib.MagickAddImage.argtypes = [c_void_p, c_void_p] 

91 if is_im_6: 

92 lib.MagickAddNoiseImage.argtypes = [c_void_p, c_int] 

93 lib.MagickAddNoiseImage.restype = c_bool 

94 else: 

95 lib.MagickAddNoiseImage.argtypes = [c_void_p, c_int, c_double] 

96 lib.MagickAddNoiseImage.restype = c_bool 

97 if is_im_6: 

98 lib.MagickAddNoiseImageChannel.argtypes = [c_void_p, c_int, c_int] 

99 lib.MagickAddNoiseImageChannel.restype = c_bool 

100 lib.MagickAffineTransformImage.argtypes = [c_void_p, c_void_p] 

101 lib.MagickAffineTransformImage.restype = c_bool 

102 lib.MagickAnnotateImage.argtypes = [ 

103 c_void_p, c_void_p, c_double, c_double, c_double, c_char_p 

104 ] 

105 lib.MagickAnnotateImage.restype = c_int 

106 lib.MagickAnimateImages.argtypes = [c_void_p, c_char_p] 

107 lib.MagickAnimateImages.restype = c_bool 

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

109 lib.MagickAppendImages.restype = c_void_p 

110 lib.MagickAutoGammaImage.argtypes = [c_void_p] 

111 lib.MagickAutoGammaImage.restype = c_bool 

112 if is_im_6: 

113 lib.MagickAutoGammaImageChannel.argtypes = [c_void_p, c_int] 

114 lib.MagickAutoGammaImageChannel.restype = c_bool 

115 lib.MagickAutoLevelImage.argtypes = [c_void_p] 

116 lib.MagickAutoLevelImage.restype = c_bool 

117 if is_im_6: 

118 lib.MagickAutoLevelImageChannel.argtypes = [c_void_p, c_int] 

119 lib.MagickAutoLevelImageChannel.restype = c_bool 

120 try: 

121 lib.MagickAutoOrientImage.argtypes = [c_void_p] 

122 except AttributeError: 

123 # MagickAutoOrientImage was added in 6.8.9+, we have a fallback 

124 # function, so we pass silently if we cannot import it. 

125 pass 

126 if IM_VERSION >= 0x708: 

127 try: 

128 lib.MagickAutoThresholdImage.argtypes = [c_void_p, c_int] 

129 lib.MagickAutoThresholdImage.restype = c_bool 

130 except AttributeError: 

131 lib.MagickAutoThresholdImage = None 

132 else: 

133 lib.MagickAutoThresholdImage = None 

134 lib.MagickBlackThresholdImage.argtypes = [c_void_p, c_void_p] 

135 lib.MagickBlackThresholdImage.restype = c_bool 

136 lib.MagickBlueShiftImage.argtypes = [c_void_p, c_double] 

137 lib.MagickBlueShiftImage.restype = c_bool 

138 lib.MagickBlurImage.argtypes = [c_void_p, c_double, c_double] 

139 lib.MagickBlurImage.restype = c_bool 

140 if is_im_6: 

141 lib.MagickBlurImageChannel.argtypes = [c_void_p, c_int, c_double, 

142 c_double] 

143 lib.MagickBlurImageChannel.restype = c_bool 

144 border_image_args = [c_void_p, c_void_p, c_size_t, c_size_t] 

145 if is_im_7: 

146 border_image_args.append(c_int) 

147 lib.MagickBorderImage.argtypes = border_image_args 

148 lib.MagickBorderImage.restype = c_bool 

149 lib.MagickBrightnessContrastImage.argtypes = [c_void_p, c_double, c_double] 

150 lib.MagickBrightnessContrastImage.restype = c_bool 

151 if is_im_6: 

152 lib.MagickBrightnessContrastImageChannel.argtypes = [ 

153 c_void_p, c_int, c_double, c_double 

154 ] 

155 lib.MagickBrightnessContrastImageChannel.restype = c_bool 

156 if IM_VERSION >= 0x708: 

157 try: 

158 lib.MagickCannyEdgeImage.argtypes = [c_void_p, c_double, c_double, 

159 c_double, c_double] 

160 lib.MagickCannyEdgeImage.restype = c_bool 

161 except AttributeError: 

162 lib.MagickCannyEdgeImage = None 

163 else: 

164 lib.MagickCannyEdgeImage = None 

165 lib.MagickCharcoalImage.argtypes = [c_void_p, c_double, c_double] 

166 lib.MagickCharcoalImage.restype = c_bool 

167 lib.MagickChopImage.argtypes = [ 

168 c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t 

169 ] 

170 lib.MagickChopImage.restype = c_bool 

171 if is_im_7: 

172 try: 

173 lib.MagickCLAHEImage.argtypes = [c_void_p, c_size_t, c_size_t, 

174 c_double, c_double] 

175 lib.MagickCLAHEImage.restype = c_bool 

176 except AttributeError: 

177 lib.MagickCLAHEImage = None 

178 else: 

179 lib.MagickCLAHEImage = None 

180 lib.MagickClampImage.argtypes = [c_void_p] 

181 lib.MagickClampImage.restype = c_bool 

182 if is_im_6: 

183 lib.MagickClampImageChannel.argtypes = [c_void_p, c_int] 

184 lib.MagickClampImageChannel.restype = c_bool 

185 lib.MagickClipImage.argtypes = [c_void_p] 

186 lib.MagickClipImage.restype = c_bool 

187 lib.MagickClipImagePath.argtypes = [c_void_p, c_char_p, c_bool] 

188 lib.MagickClipImagePath.restype = c_bool 

189 if is_im_7: 

190 lib.MagickClutImage.argtypes = [c_void_p, c_void_p, c_int] 

191 lib.MagickClutImage.restype = c_bool 

192 else: 

193 lib.MagickClutImage.argtypes = [c_void_p, c_void_p] 

194 lib.MagickClutImage.restype = c_bool 

195 if is_im_6: 

196 lib.MagickClutImageChannel.argtypes = [c_void_p, c_int, c_void_p] 

197 lib.MagickClutImageChannel.restype = c_bool 

198 lib.MagickCoalesceImages.argtypes = [c_void_p] 

199 lib.MagickCoalesceImages.restype = c_void_p 

200 lib.MagickColorDecisionListImage.argtypes = [c_void_p, c_char_p] 

201 lib.MagickColorDecisionListImage.restype = c_bool 

202 lib.MagickColorizeImage.argtypes = [c_void_p, c_void_p, c_void_p] 

203 lib.MagickColorizeImage.restype = c_bool 

204 lib.MagickColorMatrixImage.argtypes = [c_void_p, c_void_p] 

205 lib.MagickColorMatrixImage.restype = c_bool 

206 lib.MagickCommentImage.argtypes = [c_void_p, c_char_p] 

207 lib.MagickCommentImage.restype = c_bool 

208 lib.MagickCombineImages.argtypes = [c_void_p, c_int] 

209 lib.MagickCombineImages.restype = c_void_p 

210 if is_im_6: 

211 lib.MagickCompareImageChannels.argtypes = [ 

212 c_void_p, c_void_p, c_int, c_double 

213 ] 

214 lib.MagickCompareImageChannels.restype = c_void_p 

215 lib.MagickCompareImageLayers.argtypes = [c_void_p, c_int] 

216 lib.MagickCompareImageLayers.restype = c_void_p 

217 lib.MagickCompareImages.argtypes = [ 

218 c_void_p, c_void_p, c_int, POINTER(c_double) 

219 ] 

220 lib.MagickCompareImages.restype = c_void_p 

221 if is_im_6: 

222 try: 

223 lib.MagickCompareImageLayers.argtypes = [c_void_p, c_int] 

224 lib.MagickCompareImageLayers.restype = c_void_p 

225 except AttributeError: 

226 lib.MagickCompareImageLayers = None 

227 else: 

228 try: 

229 lib.MagickCompareImagesLayers.argtypes = [c_void_p, c_int] 

230 lib.MagickCompareImagesLayers.restype = c_void_p 

231 except AttributeError: 

232 lib.MagickCompareImagesLayers = None 

233 if IM_VERSION >= 0x708: 

234 try: 

235 lib.MagickComplexImages.argtypes = [c_void_p, c_int] 

236 lib.MagickComplexImages.restype = c_void_p 

237 except AttributeError: 

238 lib.MagickComplexImages = None 

239 else: 

240 lib.MagickComplexImages = None 

241 if is_im_6: 

242 lib.MagickCompositeImage.argtypes = [ 

243 c_void_p, c_void_p, c_int, c_ssize_t, c_ssize_t 

244 ] 

245 else: 

246 lib.MagickCompositeImage.argtypes = [ 

247 c_void_p, c_void_p, c_int, c_bool, c_ssize_t, c_ssize_t 

248 ] 

249 lib.MagickCompositeImage.restype = c_bool 

250 try: 

251 lib.MagickCompositeLayers.argtypes = [ 

252 c_void_p, c_void_p, c_int, c_ssize_t, c_ssize_t 

253 ] 

254 lib.MagickCompositeLayers.restype = c_bool 

255 except AttributeError: 

256 lib.MagickCompositeLayers = None 

257 if is_im_6: 

258 lib.MagickCompositeImageChannel.argtypes = [ 

259 c_void_p, c_int, c_void_p, c_int, c_ssize_t, c_ssize_t 

260 ] 

261 lib.MagickCompositeImageChannel.restype = c_bool 

262 else: 

263 lib.MagickCompositeImageChannel = None 

264 if IM_VERSION >= 0x708: 

265 try: 

266 lib.MagickConnectedComponentsImage.argtypes = [ 

267 c_void_p, c_size_t, POINTER(c_void_p) 

268 ] 

269 lib.MagickConnectedComponentsImage.restype = c_bool 

270 except AttributeError: 

271 lib.MagickConnectedComponentsImage = None 

272 else: 

273 lib.MagickConnectedComponentsImage = None 

274 lib.MagickConstituteImage.argtypes = [ 

275 c_void_p, c_size_t, c_size_t, c_char_p, c_int, c_void_p 

276 ] 

277 lib.MagickContrastImage.argtypes = [c_void_p, c_bool] 

278 lib.MagickContrastImage.restype = c_bool 

279 lib.MagickContrastStretchImage.argtypes = [c_void_p, c_double, c_double] 

280 if is_im_6: 

281 lib.MagickContrastStretchImageChannel.argtypes = [ 

282 c_void_p, c_int, c_double, c_double 

283 ] 

284 else: 

285 lib.MagickContrastStretchImageChannel = None 

286 lib.MagickConvolveImage.argtypes = [c_void_p, c_size_t, c_double] 

287 lib.MagickConvolveImage.restype = c_bool 

288 if is_im_6: 

289 lib.MagickConvolveImageChannel.argtypes = [ 

290 c_void_p, c_int, c_size_t, c_double 

291 ] 

292 lib.MagickConvolveImageChannel.restype = c_bool 

293 lib.MagickCropImage.argtypes = [ 

294 c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t 

295 ] 

296 lib.MagickCropImage.restype = c_bool 

297 lib.MagickCycleColormapImage.argtypes = [c_void_p, c_ssize_t] 

298 lib.MagickCycleColormapImage.restype = c_bool 

299 lib.MagickDecipherImage.argtypes = [c_void_p, c_char_p] 

300 lib.MagickDecipherImage.restype = c_bool 

301 lib.MagickDeconstructImages.argtypes = [c_void_p] 

302 lib.MagickDeconstructImages.restype = c_void_p 

303 lib.MagickDeskewImage.argtypes = [c_void_p, c_double] 

304 lib.MagickDeskewImage.restype = c_bool 

305 lib.MagickDespeckleImage.argtypes = [c_void_p] 

306 lib.MagickDespeckleImage.restype = c_bool 

307 lib.MagickDestroyImage.argtypes = [c_void_p] 

308 lib.MagickDestroyImage.restype = c_void_p 

309 lib.MagickDisplayImage.argtypes = [c_void_p, c_char_p] 

310 lib.MagickDisplayImage.restype = c_bool 

311 lib.MagickDisplayImages.argtypes = [c_void_p, c_char_p] 

312 lib.MagickDisplayImages.restype = c_bool 

313 lib.MagickDistortImage.argtypes = [ 

314 c_void_p, c_int, c_size_t, POINTER(c_double), c_int 

315 ] 

316 lib.MagickDistortImage.restype = c_int 

317 lib.MagickDrawImage.argtypes = [c_void_p, c_void_p] 

318 lib.MagickDrawImage.restype = c_int 

319 lib.MagickEdgeImage.argtypes = [c_void_p, c_double] 

320 lib.MagickEdgeImage.restype = c_bool 

321 lib.MagickEmbossImage.argtypes = [c_void_p, c_double, c_double] 

322 lib.MagickEmbossImage.restype = c_bool 

323 lib.MagickEncipherImage.argtypes = [c_void_p, c_char_p] 

324 lib.MagickEncipherImage.restype = c_bool 

325 lib.MagickEnhanceImage.argtypes = [c_void_p] 

326 lib.MagickEnhanceImage.restype = c_bool 

327 lib.MagickEqualizeImage.argtypes = [c_void_p] 

328 lib.MagickEqualizeImage.restype = c_bool 

329 if is_im_6: 

330 lib.MagickEqualizeImageChannel.argtypes = [c_void_p, c_int] 

331 lib.MagickEqualizeImageChannel.restype = c_bool 

332 lib.MagickEvaluateImage.argtypes = [c_void_p, c_int, c_double] 

333 if is_im_6: 

334 lib.MagickEvaluateImageChannel.argtypes = [ 

335 c_void_p, c_int, c_int, c_double 

336 ] 

337 else: 

338 lib.MagickEvaluateImageChannel = None 

339 lib.MagickEvaluateImages.argtypes = [c_void_p, c_int] 

340 lib.MagickEvaluateImages.restype = c_void_p 

341 lib.MagickExportImagePixels.argtypes = [ 

342 c_void_p, c_ssize_t, c_ssize_t, c_size_t, c_size_t, c_char_p, c_int, 

343 c_void_p 

344 ] 

345 lib.MagickExportImagePixels.restype = c_bool 

346 lib.MagickExtentImage.argtypes = [ 

347 c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t 

348 ] 

349 lib.MagickExtentImage.restype = c_bool 

350 if is_im_6: 

351 lib.MagickFilterImage.argtypes = [c_void_p, c_void_p] 

352 lib.MagickFilterImage.restype = c_bool 

353 lib.MagickFilterImageChannel.argtypes = [c_void_p, c_int, c_void_p] 

354 lib.MagickFilterImageChannel.restype = c_bool 

355 lib.MagickFlipImage.argtypes = [c_void_p] 

356 lib.MagickFlipImage.restype = c_bool 

357 lib.MagickFloodfillPaintImage.argtypes = [ 

358 c_void_p, c_int, c_void_p, c_double, c_void_p, c_ssize_t, c_ssize_t, 

359 c_bool 

360 ] 

361 lib.MagickFloodfillPaintImage.restype = c_bool 

362 lib.MagickFlopImage.argtypes = [c_void_p] 

363 lib.MagickFlopImage.restype = c_bool 

364 lib.MagickForwardFourierTransformImage.argtypes = [c_void_p, c_bool] 

365 lib.MagickForwardFourierTransformImage.restype = c_bool 

366 if is_im_6: 

367 lib.MagickFrameImage.argtypes = [ 

368 c_void_p, c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t 

369 ] 

370 else: 

371 lib.MagickFrameImage.argtypes = [ 

372 c_void_p, c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t, 

373 c_int 

374 ] 

375 lib.MagickFrameImage.restype = c_bool 

376 lib.MagickFunctionImage.argtypes = [ 

377 c_void_p, c_int, c_size_t, POINTER(c_double) 

378 ] 

379 lib.MagickFunctionImage.restype = c_bool 

380 if is_im_6: 

381 lib.MagickFunctionImageChannel.argtypes = [ 

382 c_void_p, c_int, c_int, c_size_t, POINTER(c_double) 

383 ] 

384 lib.MagickFunctionImageChannel.restype = c_bool 

385 else: 

386 lib.MagickFunctionImageChannel = None 

387 lib.MagickFxImage.argtypes = [c_void_p, c_char_p] 

388 lib.MagickFxImage.restype = c_void_p 

389 if is_im_6: 

390 lib.MagickFxImageChannel.argtypes = [c_void_p, c_int, c_char_p] 

391 lib.MagickFxImageChannel.restype = c_void_p 

392 else: 

393 lib.MagickFxImageChannel = None 

394 lib.MagickGammaImage.argtypes = [c_void_p, c_double] 

395 lib.MagickGammaImage.restype = c_bool 

396 if is_im_6: 

397 lib.MagickGammaImageChannel.argtypes = [c_void_p, c_int, c_double] 

398 lib.MagickGammaImageChannel.restype = c_bool 

399 else: 

400 lib.MagickGammaImageChannel = None 

401 lib.MagickGaussianBlurImage.argtypes = [c_void_p, c_double, c_double] 

402 lib.MagickGaussianBlurImage.restype = c_bool 

403 if is_im_6: 

404 lib.MagickGaussianBlurImageChannel.argtypes = [ 

405 c_void_p, c_double, c_double 

406 ] 

407 lib.MagickGaussianBlurImageChannel.restype = c_bool 

408 else: 

409 lib.MagickGaussianBlurImageChannel = None 

410 lib.MagickGetImage.argtypes = [c_void_p] 

411 lib.MagickGetImage.restype = c_void_p 

412 lib.MagickGetImageAlphaChannel.argtypes = [c_void_p] 

413 lib.MagickGetImageAlphaChannel.restype = c_bool 

414 lib.MagickGetImageBackgroundColor.argtypes = [c_void_p, c_void_p] 

415 lib.MagickGetImageBackgroundColor.restype = c_bool 

416 lib.MagickGetImageBlob.argtypes = [c_void_p, POINTER(c_size_t)] 

417 lib.MagickGetImageBlob.restype = POINTER(c_ubyte) 

418 if is_im_6: 

419 lib.MagickGetImageBluePrimary.argtypes = [ 

420 c_void_p, POINTER(c_double), POINTER(c_double) 

421 ] 

422 else: 

423 lib.MagickGetImageBluePrimary.argtypes = [ 

424 c_void_p, POINTER(c_double), POINTER(c_double), POINTER(c_double) 

425 ] 

426 lib.MagickGetImageBluePrimary.restype = c_bool 

427 lib.MagickGetImageBorderColor.argtypes = [c_void_p, c_void_p] 

428 lib.MagickGetImageBorderColor.restype = c_bool 

429 if is_im_6: 

430 lib.MagickGetImageChannelDepth.argtypes = [c_void_p, c_int] 

431 lib.MagickGetImageChannelDepth.restype = c_size_t 

432 lib.MagickGetImageChannelFeatures.argtypes = [c_void_p, c_size_t] 

433 lib.MagickGetImageChannelFeatures.restype = c_void_p 

434 lib.MagickGetImageChannelKurtosis.argtypes = [ 

435 c_void_p, c_int, POINTER(c_double), POINTER(c_double) 

436 ] 

437 lib.MagickGetImageChannelKurtosis.restype = c_bool 

438 lib.MagickGetImageChannelMean.argtypes = [ 

439 c_void_p, c_int, POINTER(c_double), POINTER(c_double) 

440 ] 

441 lib.MagickGetImageChannelMean.restype = c_bool 

442 lib.MagickGetImageChannelRange.argtypes = [ 

443 c_void_p, c_int, POINTER(c_double), POINTER(c_double) 

444 ] 

445 lib.MagickGetImageChannelRange.restype = c_bool 

446 lib.MagickGetImageChannelStatistics.argtypes = [c_void_p] 

447 lib.MagickGetImageChannelStatistics.restype = c_void_p 

448 lib.MagickGetImageClipMask.argtypes = [c_void_p] 

449 lib.MagickGetImageClipMask.restype = c_void_p 

450 else: 

451 lib.MagickGetImageChannelDepth = None 

452 lib.MagickGetImageColormapColor.argtypes = [c_void_p, c_size_t, c_void_p] 

453 lib.MagickGetImageColormapColor.restype = c_bool 

454 lib.MagickGetImageColors.argtypes = [c_void_p] 

455 lib.MagickGetImageColors.restype = c_size_t 

456 lib.MagickGetImageColorspace.argtypes = [c_void_p] 

457 lib.MagickGetImageColorspace.restype = c_int 

458 lib.MagickGetImageCompose.argtypes = [c_void_p] 

459 lib.MagickGetImageCompose.restype = c_int 

460 lib.MagickGetImageCompression.argtypes = [c_void_p] 

461 lib.MagickGetImageCompression.restype = c_int 

462 lib.MagickGetImageCompressionQuality.argtypes = [c_void_p] 

463 lib.MagickGetImageCompressionQuality.restype = c_ssize_t 

464 try: 

465 lib.MagickGetImageEndian.argtypes = [c_void_p] 

466 lib.MagickGetImageEndian.restype = c_int 

467 except AttributeError: 

468 lib.MagickGetImageEndian = None 

469 lib.MagickGetImageDelay.argtypes = [c_void_p] 

470 lib.MagickGetImageDelay.restype = c_size_t 

471 lib.MagickGetImageDepth.argtypes = [c_void_p] 

472 lib.MagickGetImageDepth.restype = c_size_t 

473 lib.MagickGetImageDispose.argtypes = [c_void_p] 

474 lib.MagickGetImageDispose.restype = c_int 

475 lib.MagickGetImageDistortion.argtypes = [ 

476 c_void_p, c_void_p, c_int, POINTER(c_double) 

477 ] 

478 lib.MagickGetImageDistortion.restype = c_bool 

479 if is_im_7: 

480 lib.MagickGetImageFeatures.argtypes = [c_void_p, c_size_t] 

481 lib.MagickGetImageFeatures.restype = c_void_p 

482 lib.MagickGetImageFilename.argtypes = [c_void_p] 

483 lib.MagickGetImageFilename.restype = c_magick_char_p 

484 lib.MagickGetImageFormat.argtypes = [c_void_p] 

485 lib.MagickGetImageFormat.restype = c_magick_char_p 

486 lib.MagickGetImageFuzz.argtypes = [c_void_p] 

487 lib.MagickGetImageFuzz.restype = c_double 

488 lib.MagickGetImageGamma.argtypes = [c_void_p] 

489 lib.MagickGetImageGamma.restype = c_double 

490 lib.MagickGetImageGravity.argtypes = [c_void_p] 

491 lib.MagickGetImageGravity.restype = c_int 

492 if is_im_6: 

493 lib.MagickGetImageGreenPrimary.argtypes = [ 

494 c_void_p, POINTER(c_double), POINTER(c_double) 

495 ] 

496 else: 

497 lib.MagickGetImageGreenPrimary.argtypes = [ 

498 c_void_p, POINTER(c_double), POINTER(c_double), POINTER(c_double) 

499 ] 

500 lib.MagickGetImageGreenPrimary.restype = c_bool 

501 lib.MagickGetImageHeight.argtypes = [c_void_p] 

502 lib.MagickGetImageHeight.restype = c_size_t 

503 lib.MagickGetImageHistogram.argtypes = [c_void_p, POINTER(c_size_t)] 

504 lib.MagickGetImageHistogram.restype = POINTER(c_void_p) 

505 lib.MagickGetImageInterlaceScheme.argtypes = [c_void_p] 

506 lib.MagickGetImageInterlaceScheme.restype = c_bool 

507 lib.MagickGetImageIterations.argtypes = [c_void_p] 

508 lib.MagickGetImageIterations.restype = c_size_t 

509 lib.MagickGetImageInterpolateMethod.argtypes = [c_void_p] 

510 lib.MagickGetImageInterpolateMethod.restype = c_int 

511 if is_im_7: 

512 lib.MagickGetImageKurtosis.argtypes = [ 

513 c_void_p, POINTER(c_double), POINTER(c_double) 

514 ] 

515 lib.MagickGetImageKurtosis.restype = c_bool 

516 lib.MagickGetImageLength.argtypes = [c_void_p, POINTER(c_size_t)] 

517 lib.MagickGetImageLength.restype = c_bool 

518 if is_im_7: 

519 lib.MagickGetImageMask.argtypes = [c_void_p, c_int] 

520 lib.MagickGetImageMask.restype = c_void_p 

521 else: 

522 lib.MagickGetImageMask = None 

523 lib.MagickGetImageMatteColor.argtypes = [c_void_p, c_void_p] 

524 lib.MagickGetImageMatteColor.restype = c_bool 

525 if is_im_7: 

526 lib.MagickGetImageMean.argtypes = [ 

527 c_void_p, POINTER(c_double), POINTER(c_double) 

528 ] 

529 lib.MagickGetImageMean.restype = c_bool 

530 lib.MagickGetImageOrientation.argtypes = [c_void_p] 

531 lib.MagickGetImageOrientation.restype = c_int 

532 lib.MagickGetImagePage.argtypes = [ 

533 c_void_p, POINTER(c_uint), POINTER(c_uint), POINTER(c_int), 

534 POINTER(c_int) 

535 ] 

536 lib.MagickGetImagePage.restype = c_bool 

537 lib.MagickGetImagePixelColor.argtypes = [ 

538 c_void_p, c_ssize_t, c_ssize_t, c_void_p 

539 ] 

540 lib.MagickGetImagePixelColor.restype = c_bool 

541 lib.MagickGetImageRange.argtypes = [ 

542 c_void_p, POINTER(c_double), POINTER(c_double) 

543 ] 

544 lib.MagickGetImageRange.restype = c_bool 

545 if is_im_6: 

546 lib.MagickGetImageRedPrimary.argtypes = [ 

547 c_void_p, POINTER(c_double), POINTER(c_double) 

548 ] 

549 else: 

550 lib.MagickGetImageRedPrimary.argtypes = [ 

551 c_void_p, POINTER(c_double), POINTER(c_double), POINTER(c_double) 

552 ] 

553 lib.MagickGetImageRedPrimary.restype = c_bool 

554 lib.MagickGetImageRegion.argtypes = [ 

555 c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t 

556 ] 

557 lib.MagickGetImageRegion.restype = c_void_p 

558 lib.MagickGetImageResolution.argtypes = [ 

559 c_void_p, POINTER(c_double), POINTER(c_double) 

560 ] 

561 lib.MagickGetImageRenderingIntent.argtypes = [c_void_p] 

562 lib.MagickGetImageRenderingIntent.restype = c_int 

563 lib.MagickGetImageResolution.argtypes = [ 

564 c_void_p, POINTER(c_double), POINTER(c_double) 

565 ] 

566 lib.MagickGetImageResolution.restype = c_bool 

567 lib.MagickGetImagesBlob.argtypes = [c_void_p, POINTER(c_size_t)] 

568 lib.MagickGetImagesBlob.restype = POINTER(c_ubyte) 

569 lib.MagickGetImageScene.argtypes = [c_void_p] 

570 lib.MagickGetImageScene.restype = c_size_t 

571 lib.MagickGetImageSignature.argtypes = [c_void_p] 

572 lib.MagickGetImageSignature.restype = c_magick_char_p 

573 lib.MagickGetImageTicksPerSecond.argtypes = [c_void_p] 

574 lib.MagickGetImageTicksPerSecond.restype = c_size_t 

575 lib.MagickGetImageTotalInkDensity.argtypes = [c_void_p] 

576 lib.MagickGetImageTotalInkDensity.restype = c_double 

577 lib.MagickGetImageType.argtypes = [c_void_p] 

578 lib.MagickGetImageType.restype = c_int 

579 lib.MagickGetImageUnits.argtypes = [c_void_p] 

580 lib.MagickGetImageVirtualPixelMethod.argtypes = [c_void_p] 

581 if is_im_6: 

582 lib.MagickGetImageWhitePoint.argtypes = [ 

583 c_void_p, POINTER(c_double), POINTER(c_double) 

584 ] 

585 else: 

586 lib.MagickGetImageWhitePoint.argtypes = [ 

587 c_void_p, POINTER(c_double), POINTER(c_double), POINTER(c_double) 

588 ] 

589 lib.MagickGetImageWhitePoint.restype = c_bool 

590 lib.MagickGetImageWidth.argtypes = [c_void_p] 

591 lib.MagickGetImageWidth.restype = c_size_t 

592 lib.MagickGetNumberImages.argtypes = [c_void_p] 

593 lib.MagickGetNumberImages.restype = c_size_t 

594 lib.MagickHaldClutImage.argtypes = [c_void_p, c_void_p] 

595 lib.MagickHaldClutImage.restype = c_bool 

596 if is_im_6: 

597 lib.MagickHaldClutImageChannel.argtypes = [c_void_p, c_int, c_void_p] 

598 lib.MagickHaldClutImageChannel.restype = c_bool 

599 else: 

600 lib.MagickHaldClutImageChannel = None 

601 lib.MagickHasNextImage.argtypes = [c_void_p] 

602 lib.MagickHasNextImage.restype = c_bool 

603 lib.MagickHasPreviousImage.argtypes = [c_void_p] 

604 lib.MagickHasPreviousImage.restype = c_bool 

605 if IM_VERSION >= 0x708: 

606 try: 

607 lib.MagickHoughLineImage.argtypes = [c_void_p, c_size_t, c_size_t, 

608 c_size_t] 

609 lib.MagickHoughLineImage.restype = c_bool 

610 except AttributeError: 

611 lib.MagickHoughLineImage = None 

612 else: 

613 lib.MagickHoughLineImage = None 

614 lib.MagickIdentifyImage.argtypes = [c_void_p] 

615 lib.MagickIdentifyImage.restype = c_magick_char_p 

616 if is_im_6: 

617 lib.MagickImplodeImage.argtypes = [c_void_p, c_double] 

618 else: 

619 lib.MagickImplodeImage.argtypes = [c_void_p, c_double, c_int] 

620 lib.MagickImplodeImage.restype = c_bool 

621 lib.MagickImportImagePixels.argtypes = [ 

622 c_void_p, c_ssize_t, c_ssize_t, c_size_t, c_size_t, c_char_p, c_int, 

623 c_void_p 

624 ] 

625 lib.MagickImportImagePixels.restype = c_bool 

626 lib.MagickInverseFourierTransformImage.argtypes = [ 

627 c_void_p, c_void_p, c_double 

628 ] 

629 lib.MagickInverseFourierTransformImage.restype = c_bool 

630 if IM_VERSION >= 0x708: 

631 try: 

632 lib.MagickKuwaharaImage.argtypes = [c_void_p, c_double, c_double] 

633 lib.MagickKuwaharaImage.restype = c_bool 

634 except AttributeError: 

635 lib.MagickKuwaharaImage = None 

636 else: 

637 lib.MagickKuwaharaImage = None 

638 lib.MagickLabelImage.argtypes = [c_void_p, c_char_p] 

639 lib.MagickLabelImage.restype = c_bool 

640 lib.MagickLevelImage.argtypes = [c_void_p, c_double, c_double, c_double] 

641 lib.MagickLevelImage.restype = c_bool 

642 if is_im_6: 

643 lib.MagickLevelImageChannel.argtypes = [ 

644 c_void_p, c_int, c_double, c_double, c_double 

645 ] 

646 lib.MagickLevelImageChannel.restype = c_bool 

647 else: 

648 lib.MagickLevelImageChannel = None 

649 if IM_VERSION >= 0x708: 

650 try: 

651 lib.MagickLevelImageColors.argtypes = [ 

652 c_void_p, c_void_p, c_void_p, c_bool 

653 ] 

654 lib.MagickLevelImageColors.restype = c_bool 

655 except AttributeError: 

656 lib.MagickLevelImageColors = None 

657 try: 

658 lib.MagickLevelizeImage.argtypes = [c_void_p, c_double, c_double, 

659 c_double] 

660 lib.MagickLevelizeImage.restype = c_bool 

661 except AttributeError: 

662 lib.MagickLevelizeImage = None 

663 else: 

664 lib.MagickLevelImageColors = None 

665 lib.MagickLevelizeImage = None 

666 lib.MagickLinearStretchImage.argtypes = [c_void_p, c_double, c_double] 

667 lib.MagickLinearStretchImage.restype = c_bool 

668 lib.MagickLiquidRescaleImage.argtypes = [ 

669 c_void_p, c_size_t, c_size_t, c_double, c_double 

670 ] 

671 lib.MagickLiquidRescaleImage.restype = c_bool 

672 try: 

673 lib.MagickLocalContrastImage.argtypes = [c_void_p, c_double, c_double] 

674 lib.MagickLocalContrastImage.restype = c_bool 

675 except AttributeError: 

676 lib.MagickLocalContrastImage = None 

677 lib.MagickMagnifyImage.argtypes = [c_void_p] 

678 lib.MagickMagnifyImage.restype = c_bool 

679 if IM_VERSION >= 0x708: 

680 try: 

681 lib.MagickMeanShiftImage.argtypes = [c_void_p, c_size_t, c_size_t, 

682 c_double] 

683 lib.MagickMeanShiftImage.restype = c_bool 

684 except AttributeError: 

685 lib.MagickMeanShiftImage = None 

686 else: 

687 lib.MagickMeanShiftImage = None 

688 if is_im_6: 

689 lib.MagickMedianFilterImage.argtypes = [c_void_p, c_double] 

690 lib.MagickMedianFilterImage.restype = c_bool 

691 lib.MagickMergeImageLayers.argtypes = [c_void_p, c_int] 

692 lib.MagickMergeImageLayers.restype = c_void_p 

693 lib.MagickMinifyImage.argtypes = [c_void_p] 

694 lib.MagickMinifyImage.restype = c_bool 

695 try: 

696 lib.MagickModeImage.argtypes = [c_void_p, c_double] 

697 lib.MagickModeImage.restype = c_bool 

698 except AttributeError: 

699 pass 

700 lib.MagickModulateImage.argtypes = [c_void_p, c_double, c_double, c_double] 

701 lib.MagickModulateImage.restype = c_bool 

702 lib.MagickMontageImage.argtypes = [ 

703 c_void_p, c_void_p, c_char_p, c_char_p, c_int, c_char_p 

704 ] 

705 lib.MagickMontageImage.restype = c_void_p 

706 lib.MagickMorphImages.argtypes = [c_void_p, c_size_t] 

707 lib.MagickMorphImages.restype = c_void_p 

708 lib.MagickMorphologyImage.argtypes = [c_void_p, c_int, c_ssize_t, c_void_p] 

709 lib.MagickMorphologyImage.restype = c_bool 

710 if is_im_6: 

711 lib.MagickMorphologyImageChannel.argtypes = [ 

712 c_void_p, c_int, c_int, c_ssize_t, c_void_p 

713 ] 

714 lib.MagickMorphologyImageChannel.restype = c_bool 

715 else: 

716 lib.MagickMorphologyImageChannel = None 

717 lib.MagickMotionBlurImage.argtypes = [ 

718 c_void_p, c_double, c_double, c_double 

719 ] 

720 lib.MagickMotionBlurImage.restype = c_bool 

721 if is_im_6: 

722 lib.MagickMotionBlurImageChannel.argtypes = [ 

723 c_void_p, c_int, c_double, c_double, c_double 

724 ] 

725 lib.MagickMotionBlurImageChannel.restype = c_bool 

726 else: 

727 lib.MagickMotionBlurImageChannel = None 

728 lib.MagickNegateImage.argtypes = [c_void_p, c_int] 

729 lib.MagickNegateImage.restype = c_bool 

730 if is_im_6: 

731 lib.MagickNegateImageChannel.argtypes = [c_void_p, c_int, c_int] 

732 lib.MagickNegateImageChannel.restype = c_bool 

733 else: 

734 lib.MagickNegateImageChannel = None 

735 lib.MagickNewImage.argtypes = [c_void_p, c_int, c_int, c_void_p] 

736 lib.MagickNewImage.restype = c_bool 

737 lib.MagickNextImage.argtypes = [c_void_p] 

738 lib.MagickNextImage.restype = c_bool 

739 lib.MagickNormalizeImage.argtypes = [c_void_p] 

740 lib.MagickNormalizeImage.restype = c_bool 

741 if is_im_6: 

742 lib.MagickNormalizeImageChannel.argtypes = [c_void_p, c_int] 

743 lib.MagickNormalizeImageChannel.restype = c_bool 

744 else: 

745 lib.MagickNormalizeImageChannel = None 

746 if is_im_6: 

747 lib.MagickOilPaintImage.argtypes = [c_void_p, c_double] 

748 lib.MagickOilPaintImage.restype = c_bool 

749 else: 

750 lib.MagickOilPaintImage.argtypes = [c_void_p, c_double, c_double] 

751 lib.MagickOilPaintImage.restype = c_bool 

752 lib.MagickOpaquePaintImage.argtypes = [ 

753 c_void_p, c_void_p, c_void_p, c_double, c_bool 

754 ] 

755 lib.MagickOpaquePaintImage.restype = c_bool 

756 if is_im_6: 

757 lib.MagickOpaquePaintImageChannel.argtypes = [ 

758 c_void_p, c_int, c_void_p, c_void_p, c_double, c_bool 

759 ] 

760 lib.MagickOpaquePaintImageChannel.restype = c_bool 

761 lib.MagickOptimizeImageLayers.argtypes = [c_void_p] 

762 lib.MagickOptimizeImageLayers.restype = c_void_p 

763 try: 

764 lib.MagickOptimizeImageTransparency.argtypes = [c_void_p] 

765 lib.MagickOptimizeImageTransparency.restype = c_bool 

766 except AttributeError: 

767 lib.MagickOptimizeImageTransparency = None 

768 if is_im_7: 

769 lib.MagickOrderedDitherImage.argtypes = [c_void_p, c_char_p] 

770 lib.MagickOrderedDitherImage.restype = c_bool 

771 if is_im_6: 

772 lib.MagickOrderedPosterizeImage.argtypes = [c_void_p, c_char_p] 

773 lib.MagickOrderedPosterizeImage.restype = c_bool 

774 lib.MagickOrderedPosterizeImageChannel.argtypes = [ 

775 c_void_p, c_int, c_char_p 

776 ] 

777 lib.MagickOrderedPosterizeImageChannel.restype = c_bool 

778 lib.MagickPingImage.argtypes = [c_void_p, c_char_p] 

779 lib.MagickPingImage.restype = c_bool 

780 lib.MagickPingImageBlob.argtypes = [c_void_p, c_void_p, c_size_t] 

781 lib.MagickPingImageBlob.restype = c_bool 

782 lib.MagickPingImageFile.argtypes = [c_void_p, c_void_p] 

783 lib.MagickPingImageFile.restype = c_bool 

784 if is_im_6: 

785 lib.MagickPolaroidImage.argtypes = [c_void_p, c_void_p, c_double] 

786 lib.MagickPolaroidImage.restype = c_bool 

787 else: 

788 lib.MagickPolaroidImage.argtypes = [ 

789 c_void_p, c_void_p, c_char_p, c_double, c_int 

790 ] 

791 lib.MagickPolaroidImage.restype = c_bool 

792 if IM_VERSION >= 0x708: 

793 try: 

794 lib.MagickPolynomialImage.argtypes = [c_void_p, c_size_t, 

795 POINTER(c_double)] 

796 lib.MagickPolynomialImage.restype = c_bool 

797 except AttributeError: 

798 lib.MagickPolynomialImage = None 

799 else: 

800 lib.MagickPolynomialImage = None 

801 lib.MagickPosterizeImage.argtypes = [c_void_p, c_size_t, c_bool] 

802 lib.MagickPosterizeImage.restype = c_bool 

803 lib.MagickPreviewImages.argtypes = [c_void_p, c_int] 

804 lib.MagickPreviewImages.restype = c_void_p 

805 lib.MagickPreviousImage.argtypes = [c_void_p] 

806 lib.MagickPreviousImage.restype = c_bool 

807 if IM_VERSION < 0x700: 

808 lib.MagickQuantizeImage.argtypes = [ 

809 c_void_p, c_size_t, c_int, c_size_t, c_bool, c_bool 

810 ] 

811 lib.MagickQuantizeImage.restypes = c_bool 

812 lib.MagickQuantizeImages.argtypes = [ 

813 c_void_p, c_size_t, c_int, c_size_t, c_bool, c_bool 

814 ] 

815 lib.MagickQuantizeImages.restype = c_bool 

816 else: 

817 lib.MagickQuantizeImage.argtypes = [ 

818 c_void_p, c_size_t, c_int, c_size_t, c_int, c_bool 

819 ] 

820 lib.MagickQuantizeImage.restypes = c_bool 

821 lib.MagickQuantizeImages.argtypes = [ 

822 c_void_p, c_size_t, c_int, c_size_t, c_int, c_bool 

823 ] 

824 lib.MagickQuantizeImages.restype = c_bool 

825 lib.MagickRaiseImage.argtypes = [ 

826 c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t, c_bool 

827 ] 

828 lib.MagickRandomThresholdImage.argtypes = [c_void_p, c_double, c_double] 

829 lib.MagickRandomThresholdImage.restype = c_bool 

830 if is_im_6: 

831 lib.MagickRandomThresholdImageChannel.argtypes = [ 

832 c_void_p, c_int, c_double, c_double 

833 ] 

834 lib.MagickRandomThresholdImageChannel.restype = c_bool 

835 if IM_VERSION >= 0x708: 

836 try: 

837 lib.MagickRangeThresholdImage.argtypes = [c_void_p, c_double, 

838 c_double, c_double, 

839 c_double] 

840 lib.MagickRangeThresholdImage.restype = c_bool 

841 except AttributeError: 

842 lib.MagickRangeThresholdImage = None 

843 else: 

844 lib.MagickRangeThresholdImage = None 

845 lib.MagickReadImage.argtypes = [c_void_p, c_char_p] 

846 lib.MagickReadImage.restype = c_bool 

847 lib.MagickReadImageBlob.argtypes = [c_void_p, c_void_p, c_size_t] 

848 lib.MagickReadImageBlob.restype = c_bool 

849 lib.MagickReadImageFile.argtypes = [c_void_p, c_void_p] 

850 lib.MagickReadImageFile.restype = c_bool 

851 try: 

852 lib.MagickReduceNoiseImage.argtypes = [c_void_p, c_double] 

853 lib.MagickReduceNoiseImage.restype = c_bool 

854 except AttributeError: 

855 pass 

856 lib.MagickRemapImage.argtypes = [c_void_p, c_void_p, c_int] 

857 lib.MagickRemapImage.restype = c_bool 

858 lib.MagickRemoveImage.argtypes = [c_void_p] 

859 lib.MagickRemoveImage.restype = c_bool 

860 lib.MagickResampleImage.argtypes = [ 

861 c_void_p, c_double, c_double, c_int, c_double 

862 ] 

863 lib.MagickResampleImage.restype = c_bool 

864 lib.MagickResetImagePage.argtypes = [c_void_p, c_char_p] 

865 lib.MagickResetImagePage.restype = c_bool 

866 lib.MagickResizeImage.argtypes = [ 

867 c_void_p, c_size_t, c_size_t, c_int, c_double 

868 ] 

869 lib.MagickResizeImage.restype = c_bool 

870 lib.MagickRollImage.argtypes = [c_void_p, c_ssize_t, c_ssize_t] 

871 lib.MagickRollImage.restype = c_bool 

872 lib.MagickRotateImage.argtypes = [c_void_p, c_void_p, c_double] 

873 lib.MagickRotateImage.restype = c_bool 

874 try: 

875 lib.MagickRotationalBlurImage.argtypes = [c_void_p, c_double] 

876 lib.MagickRotationalBlurImage.restype = c_bool 

877 if is_im_6: 

878 lib.MagickRotationalBlurImageChannel.argtypes = [ 

879 c_void_p, c_int, c_double 

880 ] 

881 lib.MagickRotationalBlurImageChannel.restype = c_bool 

882 except AttributeError: 

883 lib.MagickRotationalBlurImage = None 

884 pass 

885 lib.MagickSampleImage.argtypes = [c_void_p, c_size_t, c_size_t] 

886 lib.MagickSampleImage.restype = c_bool 

887 lib.MagickScaleImage.argtypes = [c_void_p, c_size_t, c_size_t] 

888 lib.MagickScaleImage.restype = c_bool 

889 lib.MagickSegmentImage.argtypes = [ 

890 c_void_p, c_int, c_bool, c_double, c_double 

891 ] 

892 lib.MagickSegmentImage.restype = c_bool 

893 lib.MagickSelectiveBlurImage.argtypes = [ 

894 c_void_p, c_double, c_double, c_double 

895 ] 

896 lib.MagickSelectiveBlurImage.restype = c_bool 

897 if is_im_6: 

898 lib.MagickSelectiveBlurImageChannel.argtypes = [ 

899 c_void_p, c_int, c_double, c_double, c_double 

900 ] 

901 lib.MagickSelectiveBlurImageChannel.restype = c_bool 

902 lib.MagickSepiaToneImage.argtypes = [c_void_p, c_double] 

903 lib.MagickSepiaToneImage.restype = c_bool 

904 if is_im_6: 

905 lib.MagickSeparateImage = None 

906 lib.MagickSeparateImageChannel.argtypes = [c_void_p, c_int] 

907 lib.MagickSeparateImageChannel.restype = c_bool 

908 else: 

909 lib.MagickSeparateImage.argtypes = [c_void_p, c_int] 

910 lib.MagickSeparateImage.restype = c_bool 

911 lib.MagickSeparateImageChannel = None 

912 lib.MagickSetImage.argtypes = [c_void_p, c_void_p] 

913 lib.MagickSetImage.restype = c_bool 

914 lib.MagickSetImageAlphaChannel.argtypes = [c_void_p, c_int] 

915 lib.MagickSetImageAlphaChannel.restype = c_bool 

916 lib.MagickSetImageBackgroundColor.argtypes = [c_void_p, c_void_p] 

917 lib.MagickSetImageBackgroundColor.restype = c_bool 

918 if is_im_6: 

919 lib.MagickSetImageBias.argtypes = [c_void_p, c_double] 

920 lib.MagickSetImageBias.restype = c_bool 

921 else: 

922 lib.MagickSetImageBias = None 

923 if is_im_6: 

924 lib.MagickSetImageBluePrimary.argtypes = [ 

925 c_void_p, c_double, c_double 

926 ] 

927 else: 

928 lib.MagickSetImageBluePrimary.argtypes = [ 

929 c_void_p, c_double, c_double, c_double 

930 ] 

931 lib.MagickSetImageBluePrimary.restype = c_bool 

932 lib.MagickSetImageBorderColor.argtypes = [c_void_p, c_void_p] 

933 lib.MagickSetImageBorderColor.restype = c_bool 

934 if is_im_6: 

935 lib.MagickSetImageChannelDepth.argtypes = [c_void_p, c_int, c_size_t] 

936 lib.MagickSetImageClipMask.argtypes = [c_void_p, c_void_p] 

937 lib.MagickSetImageClipMask.restype = c_bool 

938 else: 

939 lib.MagickSetImageChannelDepth = None 

940 lib.MagickSetImageClipMask = None 

941 if is_im_7: 

942 lib.MagickSetImageChannelMask.argtypes = [c_void_p, c_int] 

943 lib.MagickSetImageChannelMask.restype = c_int 

944 lib.MagickSetImageColor.argtypes = [c_void_p, c_void_p] 

945 lib.MagickSetImageColor.restype = c_bool 

946 lib.MagickSetImageColormapColor.argtypes = [c_void_p, c_size_t, c_void_p] 

947 lib.MagickSetImageColormapColor.restype = c_bool 

948 lib.MagickSetImageColorspace.argtypes = [c_void_p, c_int] 

949 lib.MagickSetImageColorspace.restype = c_bool 

950 lib.MagickSetImageCompose.argtypes = [c_void_p, c_int] 

951 lib.MagickSetImageCompose.restype = c_bool 

952 lib.MagickSetImageCompression.argtypes = [c_void_p, c_int] 

953 lib.MagickSetImageCompression.restype = c_bool 

954 lib.MagickSetImageCompressionQuality.argtypes = [c_void_p, c_ssize_t] 

955 lib.MagickSetImageCompressionQuality.restype = c_bool 

956 lib.MagickSetImageDelay.argtypes = [c_void_p, c_ssize_t] 

957 lib.MagickSetImageDelay.restype = c_bool 

958 lib.MagickSetImageDepth.argtypes = [c_void_p] 

959 lib.MagickSetImageDepth.restype = c_bool 

960 lib.MagickSetImageDispose.argtypes = [c_void_p, c_int] 

961 lib.MagickSetImageDispose.restype = c_bool 

962 try: 

963 lib.MagickSetImageEndian.argtypes = [c_void_p, c_int] 

964 lib.MagickSetImageEndian.restype = c_bool 

965 except AttributeError: 

966 lib.MagickSetImageEndian = None 

967 lib.MagickSetImageExtent.argtypes = [c_void_p, c_size_t, c_size_t] 

968 lib.MagickSetImageExtent.restype = c_bool 

969 lib.MagickSetImageFilename.argtypes = [c_void_p, c_char_p] 

970 lib.MagickSetImageFilename.restype = c_bool 

971 lib.MagickSetImageFormat.argtypes = [c_void_p, c_char_p] 

972 lib.MagickSetImageFormat.restype = c_bool 

973 lib.MagickSetImageFuzz.argtypes = [c_void_p, c_double] 

974 lib.MagickSetImageFuzz.restype = c_bool 

975 lib.MagickSetImageGamma.argtypes = [c_void_p, c_double] 

976 lib.MagickSetImageGamma.restype = c_bool 

977 lib.MagickSetImageGravity.argtypes = [c_void_p, c_int] 

978 lib.MagickSetImageGravity.restype = c_bool 

979 if is_im_6: 

980 lib.MagickSetImageGreenPrimary.argtypes = [ 

981 c_void_p, c_double, c_double 

982 ] 

983 else: 

984 lib.MagickSetImageGreenPrimary.argtypes = [ 

985 c_void_p, c_double, c_double, c_double 

986 ] 

987 lib.MagickSetImageGreenPrimary.restype = c_bool 

988 lib.MagickSetImageInterlaceScheme.argtypes = [c_void_p, c_int] 

989 lib.MagickSetImageInterlaceScheme.restype = c_bool 

990 lib.MagickSetImageInterpolateMethod.argtypes = [c_void_p, c_int] 

991 lib.MagickSetImageInterpolateMethod.restype = c_bool 

992 lib.MagickSetImageIterations.argtypes = [c_void_p, c_size_t] 

993 lib.MagickSetImageIterations.restype = c_bool 

994 if is_im_7: 

995 lib.MagickSetImageMask.argtypes = [c_void_p, c_int, c_void_p] 

996 lib.MagickSetImageMask.restype = c_bool 

997 else: 

998 lib.MagickSetImageMask = None 

999 lib.MagickSetImageMatte.argtypes = [c_void_p, c_bool] 

1000 lib.MagickSetImageMatteColor.argtypes = [c_void_p, c_void_p] 

1001 if is_im_6: 

1002 lib.MagickSetImageOpacity.argtypes = [c_void_p, c_double] 

1003 lib.MagickSetImageOpacity.restype = c_bool 

1004 else: 

1005 lib.MagickSetImageOpacity = None 

1006 lib.MagickSetImageOrientation.argtypes = [c_void_p, c_int] 

1007 lib.MagickSetImagePage.argtypes = [ 

1008 c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t 

1009 ] 

1010 lib.MagickSetImagePage.restype = c_int 

1011 lib.MagickSetImageProgressMonitor.argtypes = [ 

1012 c_void_p, MagickProgressMonitor, c_void_p 

1013 ] 

1014 if is_im_6: 

1015 lib.MagickSetImageRedPrimary.argtypes = [ 

1016 c_void_p, c_double, c_double 

1017 ] 

1018 else: 

1019 lib.MagickSetImageRedPrimary.argtypes = [ 

1020 c_void_p, c_double, c_double, c_double 

1021 ] 

1022 lib.MagickSetImageRedPrimary.restype = c_bool 

1023 lib.MagickSetImageRenderingIntent.argtypes = [c_void_p, c_int] 

1024 lib.MagickSetImageRenderingIntent.restype = c_bool 

1025 lib.MagickSetImageResolution.argtypes = [c_void_p, c_double, c_double] 

1026 lib.MagickSetImageScene.argtypes = [c_void_p, c_size_t] 

1027 lib.MagickSetImageScene.restype = c_bool 

1028 lib.MagickSetImageTicksPerSecond.argtypes = [c_void_p, c_ssize_t] 

1029 lib.MagickSetImageTicksPerSecond.restype = c_bool 

1030 lib.MagickSetImageType.argtypes = [c_void_p, c_int] 

1031 lib.MagickSetImageUnits.argtypes = [c_void_p, c_int] 

1032 lib.MagickSetImageVirtualPixelMethod.argtypes = [c_void_p, c_int] 

1033 if is_im_6: 

1034 lib.MagickSetImageWhitePoint.argtypes = [ 

1035 c_void_p, c_double, c_double 

1036 ] 

1037 else: 

1038 lib.MagickSetImageWhitePoint.argtypes = [ 

1039 c_void_p, c_double, c_double, c_double 

1040 ] 

1041 lib.MagickSetImageWhitePoint.restype = c_bool 

1042 try: 

1043 lib.MagickSetResolution.argtypes = [c_void_p, c_double, c_double] 

1044 except AttributeError: 

1045 lib.MagickSetResolution = None 

1046 lib.MagickShadeImage.argtypes = [c_void_p, c_bool, c_double, c_double] 

1047 lib.MagickShadeImage.restype = c_bool 

1048 lib.MagickShadowImage.argtypes = [ 

1049 c_void_p, c_double, c_double, c_ssize_t, c_ssize_t 

1050 ] 

1051 lib.MagickShadowImage.restype = c_bool 

1052 lib.MagickSharpenImage.argtypes = [c_void_p, c_double, c_double] 

1053 lib.MagickSharpenImage.restype = c_bool 

1054 if is_im_6: 

1055 lib.MagickSharpenImageChannel.argtypes = [ 

1056 c_void_p, c_int, c_double, c_double 

1057 ] 

1058 lib.MagickSharpenImageChannel.restype = c_bool 

1059 else: 

1060 lib.MagickSharpenImageChannel = None 

1061 lib.MagickShaveImage.argtypes = [c_void_p, c_size_t, c_size_t] 

1062 lib.MagickShaveImage.restype = c_void_p 

1063 lib.MagickShearImage.argtypes = [c_void_p, c_void_p, c_double, c_double] 

1064 lib.MagickShearImage.restype = c_bool 

1065 lib.MagickSigmoidalContrastImage.argtypes = [ 

1066 c_void_p, c_bool, c_double, c_double 

1067 ] 

1068 lib.MagickSigmoidalContrastImage.restype = c_bool 

1069 if is_im_6: 

1070 lib.MagickSigmoidalContrastImageChannel.argtypes = [ 

1071 c_void_p, c_int, c_bool, c_double, c_double 

1072 ] 

1073 lib.MagickSigmoidalContrastImageChannel.restype = c_bool 

1074 else: 

1075 lib.MagickSigmoidalContrastImageChannel = None 

1076 if is_im_6: 

1077 lib.MagickSimilarityImage.argtypes = [ 

1078 c_void_p, c_void_p, c_void_p, POINTER(c_double) 

1079 ] 

1080 lib.MagickSimilarityImage.restype = c_void_p 

1081 else: 

1082 lib.MagickSimilarityImage.argtypes = [ 

1083 c_void_p, c_void_p, c_int, c_double, c_void_p, POINTER(c_double) 

1084 ] 

1085 lib.MagickSimilarityImage.restype = c_void_p 

1086 lib.MagickSketchImage.argtypes = [c_void_p, c_double, c_double, c_double] 

1087 lib.MagickSketchImage.restype = c_bool 

1088 lib.MagickSmushImages.argtypes = [c_void_p, c_bool, c_ssize_t] 

1089 lib.MagickSmushImages.restype = c_void_p 

1090 lib.MagickSolarizeImage.argtypes = [c_void_p, c_double] 

1091 lib.MagickSolarizeImage.restype = c_bool 

1092 try: 

1093 lib.MagickSolarizeImageChannel.argtypes = [c_void_p, c_int, c_double] 

1094 lib.MagickSolarizeImageChannel.restype = c_bool 

1095 except AttributeError: 

1096 lib.MagickSolarizeImageChannel = None 

1097 if is_im_6: 

1098 lib.MagickSparseColorImage.argtypes = [ 

1099 c_void_p, c_int, c_int, c_size_t, POINTER(c_double) 

1100 ] 

1101 else: 

1102 lib.MagickSparseColorImage.argtypes = [ 

1103 c_void_p, c_int, c_size_t, POINTER(c_double) 

1104 ] 

1105 lib.MagickSparseColorImage.restype = c_bool 

1106 lib.MagickSpliceImage.argtypes = [ 

1107 c_void_p, c_size_t, c_size_t, c_ssize_t, c_ssize_t 

1108 ] 

1109 lib.MagickSpliceImage.restype = c_bool 

1110 if is_im_6: 

1111 lib.MagickSpreadImage.argtypes = [c_void_p, c_double] 

1112 lib.MagickSpreadImage.restype = c_bool 

1113 else: 

1114 lib.MagickSpreadImage.argtypes = [c_void_p, c_int, c_double] 

1115 lib.MagickSpreadImage.restype = c_bool 

1116 lib.MagickStatisticImage.argtypes = [c_void_p, c_int, c_size_t, c_size_t] 

1117 lib.MagickStatisticImage.restype = c_bool 

1118 if is_im_6: 

1119 try: 

1120 # TODO - Arguments for MagickStatisticImageChannel changed 

1121 # around commit 2d8a006b @ Feb 9 13:02:53 2013. Use IM_VERSION 

1122 # to determine correct method signature/arguments. 

1123 lib.MagickStatisticImageChannel.argtypes = [ 

1124 c_void_p, c_int, c_int, c_size_t, c_size_t 

1125 ] 

1126 lib.MagickStatisticImageChannel.restype = c_bool 

1127 except AttributeError: 

1128 lib.MagickStatisticImageChannel = None 

1129 else: 

1130 lib.MagickStatisticImageChannel = None 

1131 lib.MagickSteganoImage.argtypes = [c_void_p, c_void_p, c_ssize_t] 

1132 lib.MagickSteganoImage.restype = c_void_p 

1133 lib.MagickStereoImage.argtypes = [c_void_p, c_void_p] 

1134 lib.MagickStereoImage.restype = c_void_p 

1135 lib.MagickStripImage.argtypes = [c_void_p] 

1136 lib.MagickStripImage.restype = c_bool 

1137 if is_im_6: 

1138 lib.MagickSwirlImage.argtypes = [c_void_p, c_double] 

1139 lib.MagickSwirlImage.restype = c_bool 

1140 else: 

1141 lib.MagickSwirlImage.argtypes = [c_void_p, c_double, c_int] 

1142 lib.MagickSwirlImage.restype = c_bool 

1143 lib.MagickTextureImage.argtypes = [c_void_p, c_void_p] 

1144 lib.MagickTextureImage.restype = c_void_p 

1145 lib.MagickTintImage.argtypes = [c_void_p, c_void_p, c_void_p] 

1146 lib.MagickTintImage.restype = c_bool 

1147 lib.MagickThresholdImage.argtypes = [c_void_p, c_double] 

1148 lib.MagickThresholdImage.restype = c_bool 

1149 lib.MagickThresholdImageChannel.argtypes = [c_void_p, c_int, c_double] 

1150 lib.MagickThresholdImageChannel.restype = c_bool 

1151 lib.MagickThumbnailImage.argtypes = [c_void_p, c_size_t, c_size_t] 

1152 lib.MagickThumbnailImage.restype = c_bool 

1153 if is_im_6: 

1154 lib.MagickTransformImage.argtypes = [c_void_p, c_char_p, c_char_p] 

1155 lib.MagickTransformImage.restype = c_void_p 

1156 else: 

1157 lib.MagickTransformImage = None 

1158 lib.MagickTransformImageColorspace.argtypes = [c_void_p, c_int] 

1159 lib.MagickTransformImageColorspace.restype = c_bool 

1160 lib.MagickTransparentPaintImage.argtypes = [ 

1161 c_void_p, c_void_p, c_double, c_double, c_int 

1162 ] 

1163 lib.MagickTransparentPaintImage.restype = c_bool 

1164 lib.MagickTransposeImage.argtypes = [c_void_p] 

1165 lib.MagickTransposeImage.restype = c_bool 

1166 lib.MagickTransverseImage.argtypes = [c_void_p] 

1167 lib.MagickTransverseImage.restype = c_bool 

1168 lib.MagickTrimImage.argtypes = [c_void_p, c_double] 

1169 lib.MagickTrimImage.restype = c_bool 

1170 lib.MagickUniqueImageColors.argtypes = [c_void_p] 

1171 lib.MagickUniqueImageColors.restype = c_bool 

1172 lib.MagickUnsharpMaskImage.argtypes = [ 

1173 c_void_p, c_double, c_double, c_double, c_double 

1174 ] 

1175 lib.MagickUnsharpMaskImage.restype = c_bool 

1176 if is_im_6: 

1177 lib.MagickUnsharpMaskImageChannel.argtypes = [ 

1178 c_void_p, c_int, c_double, c_double, c_double, c_double 

1179 ] 

1180 lib.MagickUnsharpMaskImageChannel.restype = c_bool 

1181 else: 

1182 lib.MagickUnsharpMaskImageChannel = None 

1183 lib.MagickVignetteImage.argtypes = [ 

1184 c_void_p, c_double, c_double, c_ssize_t, c_ssize_t 

1185 ] 

1186 lib.MagickVignetteImage.restype = c_bool 

1187 if is_im_6: 

1188 lib.MagickWaveImage.argtypes = [c_void_p, c_double, c_double] 

1189 lib.MagickWaveImage.restype = c_bool 

1190 else: 

1191 lib.MagickWaveImage.argtypes = [c_void_p, c_double, c_double, c_int] 

1192 lib.MagickWaveImage.restype = c_bool 

1193 if IM_VERSION >= 0x708: 

1194 try: 

1195 lib.MagickWaveletDenoiseImage.argtypes = [c_void_p, c_double, 

1196 c_double] 

1197 lib.MagickWaveletDenoiseImage.restype = c_bool 

1198 except AttributeError: 

1199 lib.MagickWaveletDenoiseImage = None 

1200 else: 

1201 lib.MagickWaveletDenoiseImage = None 

1202 lib.MagickWhiteThresholdImage.argtypes = [c_void_p, c_void_p] 

1203 lib.MagickWhiteThresholdImage.restype = c_bool 

1204 lib.MagickWriteImage.argtypes = [c_void_p, c_char_p] 

1205 lib.MagickWriteImage.restype = c_bool 

1206 lib.MagickWriteImageFile.argtypes = [c_void_p, c_void_p] 

1207 lib.MagickWriteImageFile.restype = c_bool 

1208 lib.MagickWriteImages.argtypes = [c_void_p, c_char_p, c_int] 

1209 lib.MagickWriteImages.restype = c_bool 

1210 lib.MagickWriteImagesFile.argtypes = [c_void_p, c_void_p] 

1211 lib.MagickWriteImagesFile.restype = c_bool