Bug#1059943: libpoppler126: Wrong image rendering on big endian machines
Hilmar Preusse
hille42 at web.de
Wed Jan 3 22:17:35 GMT 2024
Package: libpoppler126
Version: 22.12.0-2+b1
Severity: important
Dear Maintainer,
don't care about the system information below, these are just from the
system, running reportbug.
The poppler library has an issue rendering images / fonts correctly, when
running on big endian machines. Assume the following code:
#include <memory>
#include <poppler-document.h>
#include <poppler-page.h>
#include <poppler-page-renderer.h>
int main() {
std::unique_ptr<poppler::document> doc{poppler::document::load_from_file("poppler-data.pdf")};
std::unique_ptr<poppler::page> page{doc->create_page(0)};
poppler::page_renderer renderer;
poppler::image img = renderer.render_page(page.get());
img.save("test.png", "png");
return 0;
}
, which renders a file called "poppler-data.pdf" and creates a file called
"test.png". The mentioned sample file can be found here [1]. When compiling
and linking on amd64 the resulting png file looks reasonable...some
glyphs are missing.
Doing the same on a Big Endian box (in my case PowerPC) the picture looks
broken: the colors are different. As far as I know s390x is affected too.
Attached are the two sample files for Little and Big Endian.
Hilmar
[1] https://github.com/TeXworks/texworks/blob/main/testcases/poppler-data.pdf
-- System Information:
Debian Release: 12.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-16-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libpoppler126 depends on:
ii libc6 2.36-9+deb12u3
ii libfontconfig1 2.14.1-4
ii libfreetype6 2.12.1+dfsg-5
ii libjpeg62-turbo 1:2.1.5-2
ii liblcms2-2 2.14-2
ii libnspr4 2:4.35-1
ii libnss3 2:3.87.1-1
ii libopenjp2-7 2.5.0-2
ii libpng16-16 1.6.39-2
ii libstdc++6 12.2.0-14
ii libtiff6 4.5.0-6+deb12u1
ii zlib1g 1:1.2.13.dfsg-1
Versions of packages libpoppler126 recommends:
ii poppler-data 0.4.12-1
libpoppler126 suggests no packages.
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_be.png
Type: image/png
Size: 7194 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-freedesktop-maintainers/attachments/20240103/024b572c/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_le.png
Type: image/png
Size: 7280 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-freedesktop-maintainers/attachments/20240103/024b572c/attachment-0001.png>
More information about the Pkg-freedesktop-maintainers
mailing list