Reply to topic  [ 2 posts ] 
ImageMagick 
Author Message
What's a life?
User avatar

Joined: Thu Apr 23, 2009 6:27 pm
Posts: 12251
Reply with quote
Has anyone here managed to build a truly portable version of ImageMagick? I’m asking because I am making an app in LiveCode, and it uses ImageMagick to process images. I used MacPorts to install a version on my Macs, but if I throw the app out into the wider world, it needs to be self-contained. There is a self-contained .exe for Windows, but no such facility for Mac folk. We’re expected to build our own.

Now, I do know that some Photoshop plugins use ImageMagick, so what I am asking is possible, but there seems to be a lot of chatter about how it could be down on the ImageMagick forums, and the ImageMagick people themselves go so far in explaining and then tell people to use Google. Using Google takes you to the same sites and same pages - there seems to be little else out there that can help.

The main issue is the inclusion of PNG and JPEG libraries - you need to build them into ImageMagick - but, for reasons I am not sure about, it’s taking my Mac Ports build as the source of these libraries, rather than using the ones I’m building (as per various instructions). The problem here is that while these builds work on MY Mac, if I move them to my wife’s, they don’t because those libraries are not present. They are in /opt/local and the advice is to rename to /opt/local~ to make the building process not see them, but if you do this, the PNG libraries don’t get added.

I lost count of how many times I’ve tried building this today - all with the same results. It’s very frustrating, and while I’m waiting for replies on the IM forum, I’m not expecting much given the replies others who have asked the same question have had. They seem happy to help people sue the software, but to too keen to help people build it so thatchy can deploy it.

_________________
All the best,
Paul
brataccas wrote:
your posts are just combo chains of funny win

I’m on Twitter, tweeting away... My Photos Random Avatar Explanation


Mon Mar 07, 2016 7:41 pm
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 6:27 pm
Posts: 12251
Reply with quote
To answer my own question, I believe I have what I what now - the version of ImageMagick I have just built runs on my wife’s Mac - I processed a PNG to be sure. It seems to do what I what. It seems that I had to put the path to a certain folder in the png source into PKG_CONFIG_PATH to force it to see the thing.

I wrote and sh script to compile IM with PNG libraries. It’s a result of a lot of frustration and hitting things with mallets until something sticks, so it may be a bit messy. I’ll post it here to add it to the repository of all knowledge and wisdom.

Code:
#!/usr/bin/env bash
MYPATH=$PATH
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
cd ~/Desktop
mkdir ImageMagick-Final
tar xvzf ImageMagick.tar.gz
cd ImageMagick-6.9.3-7
tar xvzf ~/Desktop/jpegsrc.v9a.tar.gz
mv jpeg-9a jpeg
tar xvzf ~/Desktop/libpng-1.6.21.tar.gz
mv libpng-1.6.21 png
cd png
./configure --disable-shared --disable-dependency-tracking --enable-static=no --prefix="/Users/paul/Desktop/ImageMagick-6.9.3-7/png"
make clean;make
make install
cd ../jpeg
./configure --disable-shared --disable-dependency-tracking --enable-static=no  --prefix="/Users/paul/Desktop/ImageMagick-6.9.3-7/jpeg"
make clean;make
make install
cd ../
export PKG_CONFIG_PATH=/Users/paul/Desktop/ImageMagick-6.9.3-7/png/
./configure --disable-installed --disable-shared --enable-delegate-build --disable-dependency-tracking --with-x=no --without-perl --with-freetype=no --with-magick-plus-plus=no --without-frozenpaths --with-bzlib=no --with-png=yes --with-jpeg=yes --prefix=/Users/paul/Desktop/ImageMagick-Final  LDFLAGS="-L/Users/paul/Desktop/ImageMagick-6.9.3-7/png" CPPFLAGS='-I/Users/paul/Desktop/ImageMagick-6.9.3-7/png'
make clean;make
make install
echo ""
echo $PATH
export PATH=$MYPATH
echo ""
echo $PATH

_________________
All the best,
Paul
brataccas wrote:
your posts are just combo chains of funny win

I’m on Twitter, tweeting away... My Photos Random Avatar Explanation


Tue Mar 08, 2016 12:20 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.