marforic / imagemagick_lib_iphone

Scripts and instructions to compile ImageMagick as a static library to use in any iOS project
314 stars 71 forks source link

Adding Delegates to newer ImageMagick versions. #24

Open paulasiimwe opened 4 years ago

paulasiimwe commented 4 years ago

Hi, I've managed to add libWebp delegate with your scripts to version 6.8.8 (which i believe is closer to the one you developed the scripts with), however, my ultimate goal is to use 6.9.11 as this has support for libHeic and greater support for Raw images via libRaw. However, it appears with your compile_im.sh script I can't get it to find compiled raw and webp libs.....

When compiling 6.8.8, these are the set IM config as per the attached log. Webp is seen and included 6.8.8.log

-------------------------------------------------------------
checking for WEBP... 
checking webp/decode.h usability... yes
checking webp/decode.h presence... yes
checking for webp/decode.h... yes
checking for WebPPictureInitInternal in -lwebp... yes
checking if WEBP package is complete... yes
-------------------------------------------------------------

compiling flags:

Options used to compile and link:
  PREFIX          = /Users/paulasiimwe/Workspace/IM/target/imagemagick
  EXEC-PREFIX     = /Users/paulasiimwe/Workspace/IM/target/imagemagick
  VERSION         = 6.8.8
  CC              = /Applications/Xcode.app/Contents/Developer/usr/bin/gcc
  CFLAGS          = -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -miphoneos-version-min=13.6 -O3 -DTARGET_OS_IPHONE -Wall -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=8
  CPPFLAGS        = -I/Users/paulasiimwe/Workspace/IM/target/imagemagick/include/ImageMagick-6
  PCFLAGS         = -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=8
  DEFS            = -DHAVE_CONFIG_H
  LDFLAGS         = -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -miphoneos-version-min=13.6 -L/Users/paulasiimwe/Workspace/IM/target/im_libs/jpeg_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/png_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/tiff_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/webp_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/raw_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs
  MAGICK_LDFLAGS  = -L/Users/paulasiimwe/Workspace/IM/target/imagemagick/lib -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -miphoneos-version-min=13.6 -L/Users/paulasiimwe/Workspace/IM/target/im_libs/jpeg_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/png_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/tiff_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/webp_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/raw_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs
  LIBS            = -ltiff -ljpeg -lpng -lwebp -lz -lm
  CXX             = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
  CXXFLAGS        = -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -miphoneos-version-min=13.6 -miphoneos-version-min=13.6 -D_THREAD_SAFE -pthread
  FEATURES        = DPC
  DELEGATES       = mpeg jng jpeg png tiff webp zlib

For 6.9.11, webp and raw aren't seen : 6.9.11.log

checking for libraw_r >= 0.14.8... no
-------------------------------------------------------------
checking for libwebp... no
checking for libwebpmux >= 0.5.0 libwebpdemux >= 0.5.0... no

RAW               --with-raw=yes        no
WEBP              --with-webp=yes       no

Compiling flags, different from 6.8.8 yet compile_im.sh file stays the same:

Options used to compile and link:
  PREFIX          = /Users/paulasiimwe/Workspace/IM/target/imagemagick
  EXEC-PREFIX     = /Users/paulasiimwe/Workspace/IM/target/imagemagick
  VERSION         = 6.9.11
  CC              = /Applications/Xcode.app/Contents/Developer/usr/bin/gcc
  CFLAGS          =     -Wall -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk -miphoneos-version-min=13.7 -O3 -DTARGET_OS_IPHONE -fexceptions -D_FORTIFY_SOURCE=0 -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=8
  CPPFLAGS        =  -I/Users/paulasiimwe/Workspace/IM/target/im_libs/include/jpeg -I/Users/paulasiimwe/Workspace/IM/target/im_libs/include/png -I/Users/paulasiimwe/Workspace/IM/target/im_libs/include/tiff -I/Users/paulasiimwe/Workspace/IM/target/im_libs/include/webp -I/Users/paulasiimwe/Workspace/IM/target/im_libs/include/raw -I/Users/paulasiimwe/Workspace/IM/target/imagemagick/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=8
  PCFLAGS         = 
  DEFS            = -DHAVE_CONFIG_H
  LDFLAGS         = -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk -miphoneos-version-min=13.7 -L/Users/paulasiimwe/Workspace/IM/target/im_libs/jpeg_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/png_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/tiff_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/webp_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs/raw_arm64_dylib/ -L/Users/paulasiimwe/Workspace/IM/target/im_libs
  LIBS            =    -ltiff   -ljpeg                           -lxml2  -lz     -lm    -lpthread 
  CXX             = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
  CXXFLAGS        = -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk -miphoneos-version-min=13.7 -miphoneos-version-min=13.7 -pthread
  FEATURES        = DPC Cipher
  DELEGATES       = mpeg jpeg tiff xml zlib
==============================================================================

Where might the problem lie? I've attached the scripts here.

compile_raw.txt compile_webp.txt compile_im.txt