Hello community,

here is the log from the commit of package kimageformats for openSUSE:Leap:15.2 
checked in at 2020-04-21 19:05:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/kimageformats (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.kimageformats.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kimageformats"

Tue Apr 21 19:05:10 2020 rev:63 rq:794315 version:5.69.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/kimageformats/kimageformats.changes    
2020-03-21 16:44:54.385508900 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.kimageformats.new.2738/kimageformats.changes  
2020-04-21 19:05:13.699708565 +0200
@@ -1,0 +2,11 @@
+Sun Apr  5 19:45:37 UTC 2020 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Update to 5.69.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.69.0
+- Changes since 5.68.0:
+  * Port the HDR plugin from sscanf() to QRegularExpression. Fixes FreeBSD.
+  * autotests: print QImageReader::supportedImageFormats, to debug CI failures
+
+-------------------------------------------------------------------

Old:
----
  kimageformats-5.68.0.tar.xz
  kimageformats-5.68.0.tar.xz.sig

New:
----
  kimageformats-5.69.0.tar.xz
  kimageformats-5.69.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kimageformats.spec ++++++
--- /var/tmp/diff_new_pack.JkF8yG/_old  2020-04-21 19:05:14.111709404 +0200
+++ /var/tmp/diff_new_pack.JkF8yG/_new  2020-04-21 19:05:14.111709404 +0200
@@ -16,7 +16,7 @@
 #
 
 
-%define _tar_path 5.68
+%define _tar_path 5.69
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
@@ -24,7 +24,7 @@
 # Only needed for the package signature condition
 %bcond_without lang
 Name:           kimageformats
-Version:        5.68.0
+Version:        5.69.0
 Release:        0
 Summary:        Image format plugins for Qt
 License:        LGPL-2.1-or-later


++++++ kimageformats-5.68.0.tar.xz -> kimageformats-5.69.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.68.0/CMakeLists.txt 
new/kimageformats-5.69.0/CMakeLists.txt
--- old/kimageformats-5.68.0/CMakeLists.txt     2020-03-07 09:52:35.000000000 
+0100
+++ new/kimageformats-5.69.0/CMakeLists.txt     2020-04-05 00:35:32.000000000 
+0200
@@ -3,7 +3,7 @@
 project(KImageFormats)
 
 include(FeatureSummary)
-find_package(ECM 5.68.0  NO_MODULE)
+find_package(ECM 5.69.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -49,7 +49,7 @@
 # 050d00 (5.13) triggers a BIC in qimageiohandler.h, in Qt 5.13, so do not 
enable that until we can require 5.14
 # https://codereview.qt-project.org/c/qt/qtbase/+/279215
 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050c00)
-add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054300)
+add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400)
 add_subdirectory(src)
 if (BUILD_TESTING)
     add_subdirectory(autotests)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.68.0/autotests/readtest.cpp 
new/kimageformats-5.69.0/autotests/readtest.cpp
--- old/kimageformats-5.68.0/autotests/readtest.cpp     2020-03-07 
09:52:35.000000000 +0100
+++ new/kimageformats-5.69.0/autotests/readtest.cpp     2020-04-05 
00:35:32.000000000 +0200
@@ -127,6 +127,12 @@
         << "Starting basic read tests for "
         << suffix << " images *********\n";
 
+    const QList<QByteArray> formats = QImageReader::supportedImageFormats();
+    QStringList formatStrings;
+    formatStrings.reserve(formats.size());
+    std::transform(formats.begin(), formats.end(), 
std::back_inserter(formatStrings), [](const QByteArray &format) { return 
QString(format); });
+    QTextStream(stdout) << "QImageReader::supportedImageFormats: " << 
formatStrings.join(", ") << "\n";
+
     const QFileInfoList lstImgDir = imgdir.entryInfoList();
     for (const QFileInfo &fi : lstImgDir) {
         int suffixPos = fi.filePath().count() - suffix.count();
@@ -134,7 +140,7 @@
         QString expfile = fi.filePath().replace(suffixPos, suffix.count(), 
QStringLiteral("png"));
         QString expfilename = QFileInfo(expfile).fileName();
 
-        QImageReader inputReader(inputfile, format.constData());
+        QImageReader inputReader(inputfile, format);
         QImageReader expReader(expfile, "png");
 
         QImage inputImage;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.68.0/src/imageformats/eps.cpp 
new/kimageformats-5.69.0/src/imageformats/eps.cpp
--- old/kimageformats-5.68.0/src/imageformats/eps.cpp   2020-03-07 
09:52:35.000000000 +0100
+++ new/kimageformats-5.69.0/src/imageformats/eps.cpp   2020-04-05 
00:35:32.000000000 +0200
@@ -17,7 +17,7 @@
 #include <QCoreApplication>
 
 // logging category for this framework, default: log stuff >= warning
-Q_LOGGING_CATEGORY(EPSPLUGIN, "epsplugin", QtWarningMsg)
+Q_LOGGING_CATEGORY(EPSPLUGIN, "kf5.kimageformats.epsplugin", QtWarningMsg)
 
 //#define EPS_PERFORMANCE_DEBUG 1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.68.0/src/imageformats/hdr.cpp 
new/kimageformats-5.69.0/src/imageformats/hdr.cpp
--- old/kimageformats-5.68.0/src/imageformats/hdr.cpp   2020-03-07 
09:52:35.000000000 +0100
+++ new/kimageformats-5.69.0/src/imageformats/hdr.cpp   2020-04-05 
00:35:32.000000000 +0200
@@ -12,11 +12,15 @@
 
 #include <QImage>
 #include <QDataStream>
+#include <QLoggingCategory>
+#include <QRegularExpressionMatch>
 
 #include <QDebug>
 
 typedef unsigned char uchar;
 
+Q_LOGGING_CATEGORY(HDRPLUGIN, "kf5.kimageformats.hdrplugin", QtWarningMsg)
+
 namespace   // Private.
 {
 
@@ -95,6 +99,7 @@
     // Create dst image.
     img = QImage(width, height, QImage::Format_RGB32);
     if (img.isNull()) {
+        qCDebug(HDRPLUGIN) << "Couldn't create image with size" << width << 
height << "and format RGB32";
         return false;
     }
 
@@ -141,6 +146,7 @@
         }
 
         if ((image[2] << 8 | image[3]) != width) {
+            qCDebug(HDRPLUGIN) << "Line of pixels had width" << (image[2] << 8 
| image[3]) << "instead of" << width;
             return false;
         }
 
@@ -149,6 +155,7 @@
             for (int j = 0; j < width;) {
                 s >> code;
                 if (s.atEnd()) {
+                    qCDebug(HDRPLUGIN) << "Truncated HDR file";
                     return false;
                 }
                 if (code > 128) {
@@ -182,39 +189,48 @@
 bool HDRHandler::read(QImage *outImage)
 {
     int len;
-    char line[MAXLINE];
-    //bool validHeader = false;
-    bool validFormat = false;
+    QByteArray line(MAXLINE + 1, Qt::Uninitialized);
+    QByteArray format;
 
     // Parse header
     do {
-        len = device()->readLine(line, MAXLINE);
+        len = device()->readLine(line.data(), MAXLINE);
 
-        /*if (strcmp(line, "#?RADIANCE\n") == 0 || strcmp(line, "#?RGBE\n") == 
0)
-        {
-            validHeader = true;
-        }*/
-        if (strcmp(line, "FORMAT=32-bit_rle_rgbe\n") == 0) {
-            validFormat = true;
+        if (line.startsWith("FORMAT=")) {
+            format = line.mid(7, len - 7 - 1 /*\n*/);
         }
 
     } while ((len > 0) && (line[0] != '\n'));
 
-    if (/*!validHeader ||*/ !validFormat) {
-        // qDebug() << "Unknown HDR format.";
+    if (format != "32-bit_rle_rgbe") {
+        qCDebug(HDRPLUGIN) << "Unknown HDR format:" << format;
         return false;
     }
 
-    device()->readLine(line, MAXLINE);
+    len = device()->readLine(line.data(), MAXLINE);
+    line.resize(len);
 
-    char s1[3], s2[3];
-    int width, height;
-    if (sscanf(line, "%2[+-XY] %d %2[+-XY] %d\n", s1, &height, s2, &width) != 
4)
-        //if( sscanf(line, "-Y %d +X %d", &height, &width) < 2 )
-    {
-        // qDebug() << "Invalid HDR file.";
+    /*
+       TODO: handle flipping and rotation, as per the spec below
+       The single resolution line consists of 4 values, a X and Y label each 
followed by a numerical
+       integer value. The X and Y are immediately preceded by a sign which can 
be used to indicate
+       flipping, the order of the X and Y indicate rotation. The standard 
coordinate system for
+       Radiance images would have the following resolution string -Y N +X N. 
This indicates that the
+       vertical axis runs down the file and the X axis is to the right 
(imagining the image as a
+       rectangular block of data). A -X would indicate a horizontal flip of 
the image. A +Y would
+       indicate a vertical flip. If the X value appears before the Y value 
then that indicates that
+       the image is stored in column order rather than row order, that is, it 
is rotated by 90 degrees.
+       The reader can convince themselves that the 8 combinations cover all 
the possible image orientations
+       and rotations.
+    */
+    QRegularExpression resolutionRegExp(QStringLiteral("([+\\-][XY]) ([0-9]+) 
([+\\-][XY]) ([0-9]+)\n"));
+    QRegularExpressionMatch match = 
resolutionRegExp.match(QString::fromLatin1(line));
+    if (!match.hasMatch()) {
+        qCDebug(HDRPLUGIN) << "Invalid HDR file, the first line after the 
header didn't have the expected format:" << line;
         return false;
     }
+    const int width = match.captured(2).toInt();
+    const int height = match.captured(4).toInt();
 
     QDataStream s(device());
 


Reply via email to