summaryrefslogtreecommitdiff
path: root/user/prison/endian.patch
blob: b812bc46e1e6f800c029313e06ca66f05ee7c875 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
We write things in byte ordering-dependent format, so use that.

--- prison-5.94.0/src/lib/qrcodebarcode.cpp.old	2022-05-06 06:22:05.000000000 -0500
+++ prison-5.94.0/src/lib/qrcodebarcode.cpp	2022-06-04 16:38:40.211478102 -0500
@@ -93,7 +93,7 @@
     }
 
     const auto result =
-        QImage(img, code->width + 2 * margin, code->width + 2 * margin, QImage::Format_ARGB32).copy(); // deep copy as we are going to delete img
+        QImage(img, code->width + 2 * margin, code->width + 2 * margin, QImage::Format_RGBA8888).copy(); // deep copy as we are going to delete img
     delete[] img;
     return result;
 }
--- prison-5.94.0/src/lib/datamatrixbarcode.cpp.old	2022-05-06 06:22:05.000000000 -0500
+++ prison-5.94.0/src/lib/datamatrixbarcode.cpp	2022-06-04 16:39:00.459255774 -0500
@@ -37,7 +37,7 @@
     QImage ret;
 
     if (foregroundColor() == Qt::black && backgroundColor() == Qt::white) {
-        QImage tmp(enc->image->pxl, enc->image->width, enc->image->height, QImage::Format_ARGB32);
+        QImage tmp(enc->image->pxl, enc->image->width, enc->image->height, QImage::Format_RGBA8888);
         // we need to copy, because QImage generated from a char pointer requires the
         // char pointer to be kept around forever, and manually deleted.
         ret = tmp.copy();
@@ -66,7 +66,7 @@
                     img[i - 1 + j] = color[j];
                 }
             }
-            QImage tmp(img, enc->image->width, enc->image->height, QImage::Format_ARGB32);
+            QImage tmp(img, enc->image->width, enc->image->height, QImage::Format_RGBA8888);
             // we need to copy, because QImage generated from a char pointer requires the
             // char pointer to be kept around forever, and manually deleted.
             ret = tmp.copy();