Commit 5c0b79b6 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

Fix compilation with older Jasper library

JPEG XL is now offcialy supported by ImageMagick codecs and KImageFormat Qt plugins.
BUGS: 436533
FIXED-IN: 7.6.0
parent 3d97133a
Pipeline #125504 passed with stage
in 39 minutes and 12 seconds
......@@ -12,9 +12,9 @@ JPEG2K Done Done Done Done N.A yes yes libjasper
HEIF Done Done Done Done N.A yes yes libheif / libde265 (internal) + libx265 (external)
Others file formats are supported:
- in 8 bits/color/pixel only using Qt plugin loaders (QImage and KImageFormat plugins - "KIMG") and mostly in read only.
- in 8 or 16 bits/color/pixel only using Qt plugin loaders (QImage and KImageFormat plugins - "KIMG") and mostly in read only.
https://doc.qt.io/qt-5/qimage.html#reading-and-writing-image-files
https://cgit.kde.org/kimageformats.git/tree/src/imageformats
https://invent.kde.org/frameworks/kimageformats
- in 8 or 16 bits/color/pixel using ImageMagick codecs (optional - "IM").
https://www.imagemagick.org/script/formats.php
......@@ -29,6 +29,9 @@ Format Read Write Description Codec
KRA yes no Krita Raster image KIMG
ORA yes no OpenRaster image KIMG
PIC yes no Softimage Raster image KIMG
ANI yes no Windows Animated Cursor KIMG
PIC yes yes PCPaint image format KIMG
AVIF yes yes AV1 Image File Format KIMG | IM
DDS yes yes Microsoft Direct Draw Surface KIMG | IM
EPS yes yes Adobe Encapsulated PostScript KIMG | IM
EXR yes yes ILM High dynamic range image KIMG | IM
......@@ -48,6 +51,7 @@ PGM yes yes Portable graymap format KIMG | I
PPM yes yes Portable pixmap format KIMG | IM
XBM yes yes X Windows system bitmap KIMG | IM
XPM yes yes X Windows system pixmap KIMG | IM
JXL yes yes JPEG Extended Long-term KIMG | IM
PCD yes yes PhotoCD IM
SGI yes yes Irix RGB image IM
ICO yes no Windows icon format IM
......@@ -57,12 +61,8 @@ WEBP yes yes Weppy image format I
FIT/FITS yes yes Flexible Image Transport System IM
FLIF yes yes Free Lossless Image Format IM
JBIG yes yes Joint Bi-level Image IM
BPG Better Portable Graphics
BPG yes yes Better Portable Graphics IM
DJVU yes no Deja-Vu IM
JXR yes yes JPEG Extended Range IM
-----------------------------------------------------------------------------------
TODO :
Remove Jasper dependency and replace by OpenJpeg http://www.openjpeg.org
Add AV1 plugin based on libaom (https://aomedia.googlesource.com/aom/)
Add JPEG-XR plugin based on libjxr (https://github.com/4creators/jxrlib)
Add WebP plugin based on libwebp (https://github.com/webmproject/libwebp)
......@@ -151,9 +151,10 @@ bool DImgJPEG2000Loader::load(const QString& filePath, DImgLoaderObserver* const
int fmt = jas_image_strtofmt(QByteArray("jp2").data());
// See bug 447240 and UPSTREAM https://github.com/jasper-software/jasper/issues/315#issuecomment-1007872809
qCDebug(DIGIKAM_DIMG_LOG_JP2K) << "jas_image_decode decoder options string:" << decoderOptions;
jp2_image = jas_image_decode(jp2_stream, fmt, decoderOptions.toLatin1().constData());
jp2_image = jas_image_decode(jp2_stream, fmt, decoderOptions.toLatin1().data());
if (jp2_image == nullptr)
{
......@@ -252,7 +253,7 @@ bool DImgJPEG2000Loader::load(const QString& filePath, DImgLoaderObserver* const
++number_components;
}
// FIXME: image->colorspace=YCbCrColorspace;
// FIXME: image->colorspace = YCbCrColorspace;
colorModel = DImg::YCBCR;
break;
......@@ -504,7 +505,7 @@ bool DImgJPEG2000Loader::load(const QString& filePath, DImgLoaderObserver* const
}
}
// use 0-10% and 90-100% for pseudo-progress
// Use 0-10% and 90-100% for pseudo-progress
if (observer && y >= (long)checkPoint)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment