After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644544 - Let GIMP allow to switch of antialiasing in PDF
Let GIMP allow to switch of antialiasing in PDF
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.6.8
Other All
: Normal enhancement
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2011-03-12 02:18 UTC by Christopher Yeleighton
Modified: 2012-02-02 16:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (4.99 KB, patch)
2012-02-02 14:22 UTC, Massimo
none Details | Review
Test case mentioned in the previous comment (8.35 KB, application/pdf)
2012-02-02 14:25 UTC, Massimo
  Details

Description Christopher Yeleighton 2011-03-12 02:18:17 UTC
When I choose to open a PDF file in GIMP, there is no way to tell poppler not to use antialiasing.  The resulting image is not reducible to a small number of colours: important colours merge while antialiasing colours remain.  Moreover, altialiasing patterns dramatically reduce the efficiency of lossless compression.

Workaround: call poppler directly:

{ pdftoppm -aa no -aaVector no x.pdf x; }
Comment 1 Michael Natterer 2011-03-12 23:22:34 UTC
I have a better soluion: provide a patch please :)
Comment 2 Mukund Sivaraman 2011-05-08 05:12:52 UTC
This is currently not possible as poppler-glib doesn't expose API for it, and we'd have to use C++ code. I'll try to make a patch for poppler-glib first.
Comment 3 Mukund Sivaraman 2011-05-08 05:43:03 UTC
I guess this bug's answer is going to remain "No" for a while till poppler's cairo output device implements it.
Comment 4 Massimo 2012-02-02 14:22:17 UTC
Created attachment 206637 [details] [review]
Proposed patch

Switching off cairo context's antialiasing seems to work:

with the attached patch (and cairo and pango from git master),
the colorcube analysis of the imported pdf file attached to the next
comment shows 258/4 unique colors with antialiasing enabled/disabled

for the record
pkg-config --modversion poppler
0.18.0
Comment 5 Massimo 2012-02-02 14:25:22 UTC
Created attachment 206638 [details]
Test case mentioned in the previous comment
Comment 6 Mukund Sivaraman 2012-02-02 16:34:16 UTC
Pushed to master. Resolving bug as FIXED, milestone 2.8.

commit 389c73d4929d883bf2a28499cd9254eb722f1b01
Author: Massimo Valentini <mvalentini@src.gnome.org>
Date:   Thu Feb 2 15:04:07 2012 +0100

    file-pdf-load: Bug 644544: Let GIMP allow to switch off antialiasing in PDF