ImageMagick with JP2 support

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
redserpent7
Posts: 10
Joined: 2016-01-19T08:15:42-07:00
Authentication code: 1151

ImageMagick with JP2 support

Post by redserpent7 »

I am trying to install ImageMagick with JP2 compatibility but I cannot seem to be able to do that.

I downloaded the OpenJPEG2 delegate from https://github.com/uclouvain/openjpeg and installed it to /usr, Downloaded the latest ImageMagick and when I run ./configure I get the following:

Code: Select all

Delegate Library Configuration:
  BZLIB             --with-bzlib=yes            yes
  Autotrace         --with-autotrace=no         no
  DJVU              --with-djvu=yes             no
  DPS               --with-dps=yes              no
  FFTW              --with-fftw=yes             no
  FlashPIX          --with-fpx=yes              no
  FontConfig        --with-fontconfig=yes       no
  FreeType          --with-freetype=yes         yes
  Ghostscript lib   --with-gslib=no             no
  Graphviz          --with-gvc=yes              no
  JBIG              --with-jbig=yes             yes
  JPEG v1           --with-jpeg=yes             yes
  LCMS              --with-lcms=yes             no
  LQR               --with-lqr=yes              no
  LTDL              --with-ltdl=yes             no
  LZMA              --with-lzma=yes             yes
  Magick++          --with-magick-plus-plus=yes yes
  OpenEXR           --with-openexr=yes          no
  OpenJP2           --with-openjp2=yes          no
  PANGO             --with-pango=yes            no
  PERL              --with-perl=no              no
  PNG               --with-png=yes              yes
  RAQM              --with-raqm=yes             no
  RSVG              --with-rsvg=no              no
  TIFF              --with-tiff=yes             yes
  WEBP              --with-webp=yes             yes
  WMF               --with-wmf=yes              yes
  X11               --with-x=                   yes
  XML               --with-xml=yes              yes
  ZLIB              --with-zlib=yes             yes
Not sure what I'm doing wrong but I always get

Code: Select all

OpenJP2 --with-openjp2=yes       no

In the config.log file I see the following:
configure:32568: checking for LIBOPENJP2
configure:32575: $PKG_CONFIG --exists --print-errors "libopenjp2 >= 2.1.0"
Requested 'libopenjp2 >= 2.1.0' but version of openjp2 is 2.0.0
You may find new versions of openjp2 at http://www.openjpeg.org/

I am not sure where it got that idea as I can see:

Code: Select all

ls -l /usr/lib/libopenjp2*

lrwxrwxrwx 1 ubuntu ubuntu     15 Apr 29  2014 /usr/lib/libopenjp2.so -> libopenjp2.so.7
-rw-r--r-- 1 ubuntu ubuntu 255731 Mar 27 10:41 /usr/lib/libopenjp2.so.2.1.0
lrwxrwxrwx 1 ubuntu ubuntu     19 Apr 29  2014 /usr/lib/libopenjp2.so.7 -> libopenjp2.so.2.1.0
Not sure where its finding the 2.0.0 version?

Please can someone explain how can I install ImageMagick with OpenJP2 support on Ubuntu 14.04?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick with JP2 support

Post by fmw42 »

I do not know much about Ubuntu installs. But you need OpenJPEG 2.1.0 and Imagemagick at or higher than 6.8.9-1. You do not say what your IM version is? Please always provide that information.
redserpent7
Posts: 10
Joined: 2016-01-19T08:15:42-07:00
Authentication code: 1151

Re: ImageMagick with JP2 support

Post by redserpent7 »

Sorry for not being clear, I pulled the IM code from Github which I assume is 7.0.0 ATM. I also must say that I was able to configure and build IM on a clean server so I am not entirely sure why its failing. I wish to know where IM is looking for the OpenJPEG library and how its determining that its 2.0.0 and not 2.1.0 as the same installation for OpenJPEG worked on a different server
Post Reply