kalcaddle / kodbox

kodbox is a file manager for web. It is a newly designed product based on kodexplorer. It is also a web code editor, which allows you to develop websites directly within the web browser.You can run kodbox either online or locally,on Linux, Windows or Mac based platforms
https://kodcloud.com
2.27k stars 386 forks source link

没有生成HEIC格式图片的略缩图 #231

Closed jdysya closed 12 months ago

jdysya commented 12 months ago

今天发现所有HEIC格式图片的略缩图都不显示了

image image

打开调试模式,没有相关的日志内容

image

https://demo.kodcloud.com/#

中上传HEIC格式图片发现问题也存在,并且双击打开该文件,所匹配的图片内容是其他JPG格式图片的

image
kalcaddle commented 12 months ago

heic默认是不支持的.需要自行编译ImageMagick,及libheif相关库 详情参考: https://docs.kodcloud.com/setup/others/#psd

服务器连接github慢的,可以用gitee镜像.

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
yum remove ImageMagick -y
yum install gcc gcc-c++ autoconf automake libtool
yum install -y fftw fftw-devel fftw-devel bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel zlib-devel ghostscript-devel djvulibre-devel libwmf-devel jasper-devel  libX11-devel libXext-devel libXt-devel lcms-devel libxml2-devel librsvg2-devel OpenEXR-devel openjpeg openjpeg-devel  openjpeg2 openjpeg2-devel openjpeg2-libs  gcc gcc-c++  make automake  libtool   libtool-ltdl-devel lcms2  lcms2-devel LibRaw LibRaw-devel
cd /usr/src/ 
git clone https://gitee.com/mirrors/libde265.git
git clone https://gitee.com/openkylin/libheif.git
git clone --depth 1 --branch 7.1.0-46 https://gitee.com/mirrors/ImageMagick.git
cd libde265/ && ./autogen.sh && ./configure && make && make install 
cd /usr/src/libheif/ && ./autogen.sh && ./configure && make && make install 
cd /usr/src/ImageMagick && ./configure && make -j 8 && make install && ldconfig /usr/local/lib
identify --version

编译完成后,identify --version 查看版本信息, 包含heic,说明成功. 然后再在kod后台--服务器管理--清除缓存,刷新页面即可.

image
jdysya commented 12 months ago

heic默认是不支持的.需要自行编译ImageMagick,及libheif相关库 详情参考: https://docs.kodcloud.com/setup/others/#psd

服务器连接github慢的,可以用gitee镜像.

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
yum remove ImageMagick -y
yum install gcc gcc-c++ autoconf automake libtool
yum install -y fftw fftw-devel fftw-devel bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel zlib-devel ghostscript-devel djvulibre-devel libwmf-devel jasper-devel  libX11-devel libXext-devel libXt-devel lcms-devel libxml2-devel librsvg2-devel OpenEXR-devel openjpeg openjpeg-devel  openjpeg2 openjpeg2-devel openjpeg2-libs  gcc gcc-c++  make automake  libtool   libtool-ltdl-devel lcms2  lcms2-devel LibRaw LibRaw-devel
cd /usr/src/ 
git clone https://gitee.com/mirrors/libde265.git
git clone https://gitee.com/openkylin/libheif.git
git clone --depth 1 --branch 7.1.0-46 https://gitee.com/mirrors/ImageMagick.git
cd libde265/ && ./autogen.sh && ./configure && make && make install 
cd /usr/src/libheif/ && ./autogen.sh && ./configure && make && make install 
cd /usr/src/ImageMagick && ./configure && make -j 8 && make install && ldconfig /usr/local/lib
identify --version

我是用docker部署的,内置的有ImageMagick

image