我目前正在使用CentOS 6.5服务器。 我试图使用openjp2作为ImageMagick中的代表之一。
由于CentOS的openjpeg已经过时(1.3),我已经使用RPM软件包安装了一个新的。
$ find /usr | grep openj /usr/lib64/libopenjp2.so /usr/lib64/libopenjp2.so.2.0.0 /usr/lib64/openjpeg-2.0 /usr/lib64/openjpeg-2.0/OpenJPEGConfig.cmake /usr/lib64/openjpeg-2.0/OpenJPEGTargets.cmake /usr/lib64/openjpeg-2.0/OpenJPEGTargets-release.cmake find: `/usr/lib64/audit': Permission denied /usr/lib64/libopenjp2.so.6 /usr/share/doc/openjpeg2 /usr/share/doc/openjpeg2/CHANGES /usr/share/doc/openjpeg2/LICENSE /usr/share/doc/openjpeg-2.0 /usr/share/doc/openjpeg-2.0/CHANGES /usr/share/doc/openjpeg-2.0/LICENSE /usr/share/man/man3/libopenjp2.3.gz /usr/share/man/man3/libopenjp2.3 /usr/lib/libopenjp2.so /usr/lib/libopenjp2.so.2.0.0 /usr/lib/openjpeg-2.0 /usr/lib/openjpeg-2.0/OpenJPEGConfig.cmake /usr/lib/openjpeg-2.0/OpenJPEGTargets-noconfig.cmake /usr/lib/openjpeg-2.0/OpenJPEGTargets.cmake /usr/lib/libopenjp2.so.6 /usr/include/openjpeg-2.0 /usr/include/openjpeg-2.0/openjpeg.h /usr/include/openjpeg-2.0/opj_config.h /usr/include/openjpeg-2.0/opj_stdint.h
接下来,我正在尝试使用以下configuration设置来构buildIM版本6.8.8-2。
./configure --prefix=/usr --with-modules --with-openjp2 --with-jpeg --with-png --with-tiff --enable-shared --disable-static
但是,在检查(日志),我发现这一点。
------------------------------------------------------------- checking for LIBOPENJP2... no
结果代表是:
bzlib djvu mpeg fontconfig freetype gslib jng jpeg lcms openexr png ps rsvg tiff x xml zlib
运行./configure --help ,我看到了一些可以通过的标志。
LIBOPENJP2_CFLAGS C compiler flags for LIBOPENJP2, overriding pkg-config LIBOPENJP2_LIBS linker flags for LIBOPENJP2, overriding pkg-config
在./configure过程中是否需要指定某些内容? 它看起来像IM不能看到已安装的openjpeg。
谢谢!
你没有提到你安装了什么软件包,但是你的错误表明你没有安装相关的-devel软件包,这是编译软件所必需的。
我刚碰到这个问题(在CentOS 7上),发现问题是因为我没有安装openjpeg-devel软件包。
yum install openjpeg2-devel
在寻找解决scheme的同时,ImageMagick目前只支持OpenJPEG 2.1。
编译这是有点痛苦,我应该学会阅读日志:( … …确实,你需要从这里使用jp2的源然后编译INSTALL.md所需:
cmake . make && make install
默认情况下,安装位于/ usr / local
转到ImageMagick源代码目录,然后设置:
export LIBOPENJP2_CFLAGS=/usr/local/include/openjpeg-2.1 export LIBOPENJP2_LIBS=/usr/local/lib export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
那你可以编译! (我用perl,tiff,jpeg和jpeg2000编译)。
./configure --enable-delegate-build --with-perl --enable-shared=yes --with-jpeg=yes --with-tiff=yes --with-openjp2=yes && make && make install
完成!
$> convert -list Version: ImageMagick 7.0.5-0 Q16 x86_64 2017-03-02 http://www.imagemagick.org Copyright: © 1999-2017 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC HDRI OpenMP Delegates (built-in): fontconfig freetype jng jp2 jpeg png tiff x zlib Usage: convert [options ...] file [ [options ...] file ...] [options ...] file