summaryrefslogtreecommitdiff
path: root/user/prison/endian.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/prison/endian.patch')
-rw-r--r--user/prison/endian.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/prison/endian.patch b/user/prison/endian.patch
new file mode 100644
index 000000000..b812bc46e
--- /dev/null
+++ b/user/prison/endian.patch
@@ -0,0 +1,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();