#1 Add patch to skip huge images in thumbnailer
Merged 4 years ago by rdieter. Opened 4 years ago by smani.
Unknown source master  into  master

file modified
+8 -1
@@ -8,7 +8,7 @@

  

  Name:    kio-extras

  Version: 19.12.3

- Release: 1%{?dist}

+ Release: 2%{?dist}

  Summary: Additional components to increase the functionality of KIO Framework

  

  License: GPLv2+
@@ -28,6 +28,10 @@

  # https://github.com/cygwinports/kf5-kio-extras/blob/master/16.08.3-nfs-libtirpc.patch

  Patch1000: kio-extras-19.12.1-nfs-libtirpc.patch

  

+ # Don't eat up memory attempting to create thumbnail of huge images

+ # https://bugs.kde.org/show_bug.cgi?id=420173

+ Patch1001: kio-extras_largeimages.patch

+ 

  ## upstream patches

  

  # filter plugin provides
@@ -229,6 +233,9 @@

  

  

  %changelog

+ * Fri Apr 17 2020 Sandro Mani <manisandro@gmail.com> - 19.12.3-2

+ - Add patch to skip huge images in thumbnailer

+ 

  * Sat Mar 07 2020 Rex Dieter <rdieter@fedoraproject.org> - 19.12.3-1

  - 19.12.3

  

@@ -0,0 +1,13 @@

+ diff -rupN kio-extras-19.12.3/thumbnail/imagecreator.cpp kio-extras-19.12.3-new/thumbnail/imagecreator.cpp

+ --- kio-extras-19.12.3/thumbnail/imagecreator.cpp	2020-03-03 20:33:29.000000000 +0100

+ +++ kio-extras-19.12.3-new/thumbnail/imagecreator.cpp	2020-04-17 03:13:31.630526008 +0200

+ @@ -34,6 +34,9 @@ bool ImageCreator::create(const QString

+  {

+      // create image preview

+      QImageReader ir(path);

+ +    QSize sz = ir.size();

+ +    if(sz.width() > 10240 || sz.height() > 10240)

+ +        return false;

+      ir.setDecideFormatFromContent(true);

+      img = ir.read();

+      if (img.isNull())