PAID: Build self-contained macOS binary

Do you need consulting from ImageMagick experts and are willing to pay for their expertise? Or are you well versed in ImageMagick and offer paid consulting? If so, post here otherwise post elsewhere for free assistance.
Post Reply
blue-j
Posts: 68
Joined: 2007-06-12T14:03:18-07:00

PAID: Build self-contained macOS binary

Post by blue-j »

Hi there! Thanks to all for such wonderful work and collaboration.

I'm writing in hopes of finding someone intimate with the build process who can build a macOS binary of ImageMagick 7.x whose sole purpose is to extract embedded previews from Photoshop files: filename.psd[0]

I believe this only requires LCMS and JPEG but am unsure. We'd want Q16 and HDRI. This is a pressing need.

Thanks in advance!
-J
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PAID: Build self-contained macOS binary

Post by fmw42 »

You can install all your delegates using MacPorts and then install Imagemagick from source. I do that all the time. See viewtopic.php?f=1&t=21502&p=88202&hilit ... rts#p88202 and viewtopic.php?f=2&t=31844
blue-j
Posts: 68
Joined: 2007-06-12T14:03:18-07:00

Re: PAID: Build self-contained macOS binary

Post by blue-j »

Thanks, Fred. But will this create a self-contained portable binary I can distribute with my software? That is my aim.
blue-j
Posts: 68
Joined: 2007-06-12T14:03:18-07:00

Re: PAID: Build self-contained macOS binary

Post by blue-j »

I am trying this but it will not configure with JPEG or LCMS with this command:

Code: Select all

./configure --disable-shared --disable-installed --without-magick-plus-plus --without-perl --without-bzlib --without-fftw --without-fontconfig --without-freetype --with-jpeg=yes --with-lcms=yes --without-openexr --without-openjp2 --without-pango --without-png --without-tiff --without-webp --without-x --without-xml --without-zlib
the result is:

Code: Select all

              Option                        Value
  ------------------------------------------------------------------------------
  Shared libraries  --enable-shared=no		no
  Static libraries  --enable-static=yes		yes
  Module support    --with-modules=no		no
  GNU ld            --with-gnu-ld=no		no
  Quantum depth     --with-quantum-depth=16	16
  High Dynamic Range Imagery
                    --enable-hdri=yes		yes

  Install documentation:			yes

       Delegate Library Configuration:
  BZLIB             --with-bzlib=no		no
  Autotrace         --with-autotrace=no		no
  DJVU              --with-djvu=yes		no
  DPS               --with-dps=yes		no
  FFTW              --with-fftw=no		no
  FLIF              --with-flif=yes		no
  FlashPIX          --with-fpx=yes		no
  FontConfig        --with-fontconfig=no	no
  FreeType          --with-freetype=no		no
  Ghostscript lib   --with-gslib=no		no
  Graphviz          --with-gvc=yes		no
  HEIC              --with-heic=yes    	no
  JBIG              --with-jbig=yes		no
  JPEG v1           --with-jpeg=yes		no
  LCMS              --with-lcms=yes		no
  LQR               --with-lqr=yes		no
  LTDL              --with-ltdl=yes		no
  LZMA              --with-lzma=yes		no
  Magick++          --with-magick-plus-plus=no	no
  OpenEXR           --with-openexr=no		no
  OpenJP2           --with-openjp2=no		no
  PANGO             --with-pango=no		no
  PERL              --with-perl=no		no
  PNG               --with-png=no		no
  RAQM              --with-raqm=yes		no
  RAW               --with-raw=yes    no
  RSVG              --with-rsvg=no		no
  TIFF              --with-tiff=no		no
  WEBP              --with-webp=no		no
  WMF               --with-wmf=yes		no
  X11               --with-x=no			no
  XML               --with-xml=no		no
  ZLIB              --with-zlib=no		no
which is a surprise to me. I'd assume the JPEG and LCMS=yes would work...

But without JPEG, I get an "invalid JPEG marker type" in the extracted JPEG. Well, at least I assume this is happening without the JPEG delegate... Photoshop will not open it.

-J
blue-j
Posts: 68
Joined: 2007-06-12T14:03:18-07:00

Re: PAID: Build self-contained macOS binary

Post by blue-j »

This is the best thread on this topic - http://www.imagemagick.org/discourse-se ... hp?t=13145

I have tried per Magick's instructions but the JPEG build fails when IM build is attempted:

checking for JPEG...
checking jconfig.h usability... yes
checking jconfig.h presence... yes
checking for jconfig.h... yes
checking jerror.h usability... yes
checking jerror.h presence... yes
checking for jerror.h... yes
checking jmorecfg.h usability... yes
checking jmorecfg.h presence... yes
checking for jmorecfg.h... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... no
checking for JPEG library is version 6b or later... yes
checking if JPEG package is complete... no -- some components failed test

when I configure JPEG with

Code: Select all

./configure --disable-shared --disable-dependency-tracking
with jpeg 9c then attempt to configure IM with

Code: Select all

./configure --disable-shared --disable-installed --disable-dependency-tracking --enable-delegate-build
JPEG v1 --with-jpeg=yes no (failed tests)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PAID: Build self-contained macOS binary

Post by fmw42 »

Did you actually install libjpeg and lcms2 before compiling imagemagick?
blue-j
Posts: 68
Joined: 2007-06-12T14:03:18-07:00

Re: PAID: Build self-contained macOS binary

Post by blue-j »

I built JPEG per Magick’s instructions, moved it into the IM directory, then built IM. It saw it fine it just failed to include it because it didn’t pass all tests (see above).
blue-j
Posts: 68
Joined: 2007-06-12T14:03:18-07:00

Re: PAID: Build self-contained macOS binary

Post by blue-j »

It appears it failed this test only:

checking for jpeg_read_header in -ljpeg... no
Post Reply