Page 1 of 1

J2K delegate support Linux Mint

Posted: 2017-03-14T08:31:06-07:00
by mta
I'm using imagemagick in PHP 5.6 on linux (mint)

I get this error when trying to convert a DCM file:

IMAGICK: no decode delegate for this image format `J2K' @ error/constitute.c/ReadImage/501

Usually I would install imagemagick with sudo apt-get etc...but after some searching on this forum, I tried installing openjpg 2, and then installing ImageMagick-7.0.5-2 from source

Code: Select all

./configure --with-jp2
make
sudo make install 
When I run

Code: Select all

identify -list format
identify: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.2: cannot open shared object file: No such file or directory

So it didn't install. How do I do this with linux mint (sarah)?

Re: J2K delegate support Linux Mint

Posted: 2017-03-14T09:22:06-07:00
by fmw42
I am not an expert on this, but you need to have openjpeg 2.1.0 or higher installed. I do not think you need --with jp2, which may refer to the older Jasper delegate which is no longer used by Imagemagick. Check your config.log to see if it got installed without error.

If you install from source, then you need to install all your needed delegates before installing Imagemagick, such as for TIFF, PNG, JPEG, Freetype, Fontconfig, zlib, Ghostscript, etc. Each of these may need other delegates installed before them.

So you probably got the error message because IM does not have the proper delegates installed.

Re: J2K delegate support Linux Mint

Posted: 2017-03-14T10:53:33-07:00
by mta
Is there no way to add a delegate after installing through the package manager?

Re: J2K delegate support Linux Mint

Posted: 2017-03-14T11:58:14-07:00
by fmw42
Sorry, I do not know much about installing on Linux. I use a Mac and install all my delegates with MacPorts before installing IM from source.

Re: J2K delegate support Linux Mint

Posted: 2017-03-15T01:41:59-07:00
by mta
OK so the solution for the 'error while loading shared libraries' was to set up cache

Code: Select all

ldconfig /usr/local/lib
Job done!