GithubHelp home page GithubHelp logo

gongcf / imagemagick_lib_iphone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marforic/imagemagick_lib_iphone

0.0 0.0 0.0 44.05 MB

Scripts and instructions to compile ImageMagick as a static library to use in any iOS project

Objective-C 1.66% C 94.81% C++ 1.53% Shell 1.99%

imagemagick_lib_iphone's Introduction

Compiled downloads

You can grab the latest compiled ImageMagick directly from their ftp or any mirror.

There are always 2 packages for the compiled ImageMagick:

  • iOSMagick-VERSION-libs.zip
  • iOSMagick-VERSION.zip

The first one includes headers and compiled libraries that have been used to
compile ImageMagick. Most users would need this one.

Compiling ImageMagick and IMDelegates

The directory structure has to be:

./build/ImageMagick-VERSION/       <- ImageMagick top directory
./build/IMDelegates/               <- Some delegates: jpeg + png + tiff
./build/IMDelegates/jpeg-9a/       <- jpeg lib
./build/IMDelegates/libpng-1.6.10  <- png lib
./build/IMDelegates/tiff-4.0.3     <- tiff lib

If you don’t have this directory structure you can either create it or try
change around the script. You can find the delegate libraries on the ImageMagick ftp
or on the respective websites.

The main script to run is:

./all.sh VERSION|clean
where VERSION is the version of ImageMagick
you want to compile (e.g., 6.8.8-9), if ‘clean’ is passed, the script will
clean all the log files and the directories it created.

Upon successful compilation a folder called “IMPORT_ME” will be created from
where you start the script: you can import it into your XCode project.

The rest of the scripts are invoked by all.sh and offer the following:

./env.sh
sets up environment variables used by the other scripts.
This is most probably the script you want to modify to suit your needs (e.g.,
set up which architectures will be compiles, verbosity level, …)
./flags.sh
saves, sets up and restores compiler-related values
./utils.sh
offers some functions used in the other scripts
./compile_*.sh
are the scripts used to compile the respective component

XCode project settings

After including everything into XCode please also make sure to have these settings (Build tab of the project information):

  • Other Linker Flags: -lMagickCore -lMagickWand -lz -lbz2 -ljpeg -lpng
  • Header Search Paths: $(SRCROOT) – make it Recursive
  • Library Search Paths: $(SRCROOT) – make it Recursive

On the lower left click on the small-wheel and select: Add User-Defined Setting

  • Key: OTHER_CFLAGS
  • Value: -Dmacintosh=1

In Link Binary with Libraries under Build Phases, you may also need to add:

  • libxml2.dylib

Sample project

A more or less updated project is found in the IM_Test subfolder

imagemagick_lib_iphone's People

Contributors

marforic avatar mgod avatar roozbeh avatar soarvermont avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.