IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
-
mta
- Posts: 3
- Joined: 2017-03-14T07:01:38-07:00
- Authentication code: 1151
Post
by mta » 2017-03-14T08:31:06-07:00
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
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)?
-
fmw42
- Posts: 24462
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Post
by fmw42 » 2017-03-14T09:22:06-07:00
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.
-
mta
- Posts: 3
- Joined: 2017-03-14T07:01:38-07:00
- Authentication code: 1151
Post
by mta » 2017-03-14T10:53:33-07:00
Is there no way to add a delegate after installing through the package manager?
-
fmw42
- Posts: 24462
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Post
by fmw42 » 2017-03-14T11:58:14-07:00
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.
-
mta
- Posts: 3
- Joined: 2017-03-14T07:01:38-07:00
- Authentication code: 1151
Post
by mta » 2017-03-15T01:41:59-07:00
OK so the solution for the 'error while loading shared libraries' was to set up cache
Job done!