Skip to content

eps export of rasterized grayscale images leads to compression artifacts #4207

@jaschau

Description

@jaschau

Dear all,

when exporting figures containing rasterized grayscale images to eps, the resulting files show strange compression artifacts when distillation with xpdf is used. In particular, the above problem occurs whenever imshow is used in conjunction with grayscale colormaps, which is a relevant use case. I could eventually solve this problem by adding the line

-dAutoFilterGrayImages=false -sGrayImageFilter=FlateEncode \

to the call to ps2pdf in line 1576 of backend/backend_ps.py. Currently, this set of parameters only gets used for color images, which leads to the inconsistent behavior with grayscale images described above. I would thus suggest to include this line per default in matplotlib. I am using matplotlib version 1.4.2.
Best,

jaschau

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions