Skip to content

Commit

Permalink
Adjusting MagicCore mapping to IM7/windows [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
emcconville committed Dec 26, 2018
1 parent 02afc92 commit 6f305a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion wand/api.py
Expand Up @@ -184,7 +184,7 @@ def load_library():
libmagick.GetMagickQuantumDepth(ctypes.byref(IM_QUANTUM_DEPTH))
# Does the library support HDRI?
IM_HDRI = 'HDRI' in str(libmagick.GetMagickFeatures())
core.load_with_version(libmagick, IM_VERSION)
core.load_with_version(libmagick, IM_VERSION.value)
magick_wand.load(library, IM_VERSION.value)
magick_property.load(library, IM_VERSION.value)
magick_image.load(library, IM_VERSION.value)
Expand Down
15 changes: 11 additions & 4 deletions wand/cdefs/core.py
Expand Up @@ -86,9 +86,16 @@ def load(libmagick):


def load_with_version(libmagick, IM_VERSION):
libmagick.AcquireKernelBuiltIn.argtypes = [c_void_p, c_void_p]
libmagick.AcquireKernelBuiltIn.restype = c_void_p
libmagick.AcquireKernelInfo.argtypes = [c_char_p]
libmagick.AcquireKernelInfo.restype = c_void_p
if IM_VERSION < 0x700:
libmagick.AcquireKernelBuiltIn.argtypes = [c_int, c_void_p]
libmagick.AcquireKernelBuiltIn.restype = c_void_p
libmagick.AcquireKernelInfo.argtypes = [c_char_p]
libmagick.AcquireKernelInfo.restype = c_void_p
else:
libmagick.AcquireKernelBuiltIn.argtypes = [c_int, c_void_p,
c_void_p]
libmagick.AcquireKernelBuiltIn.restype = c_void_p
libmagick.AcquireKernelInfo.argtypes = [c_char_p, c_void_p]
libmagick.AcquireKernelInfo.restype = c_void_p
libmagick.DestroyKernelInfo.argtypes = [c_void_p]
libmagick.DestroyKernelInfo.restype = c_void_p

0 comments on commit 6f305a9

Please sign in to comment.