5

This is a followup question to gimp: Background removal gives gray fringe, when exported as pdf:

To reproduce the problem you have to follow these five steps:

  1. In GIMP, create a New Fileo with Advanced Options → Color space: RGB color and Fill with: Background color (should be white to see the problem).
  2. Add an alpha channel to your background.
  3. Take the Free Select Tool and select an arbitrary area of the picture like this:

    enter image description here

  4. Press delete and you will end up with something like this:

    enter image description here

  5. Choose File → Export as... → PDF and open it in your PDF viewer. You will end up with this:

    enter image description here

Why does this gray line appear? How can I get rid of it without flattening the image? Note that the gray line also appears, when first exporting the image as PNG and converting it to PDF afterwards. It seems as if the different exporting options have no effect on the outcome.

  • 1
    Please not that this kind of behavior is better reported as application bugs at bugzilla.gnome.org. Most things people can do here is to provide workarounds, while you've stumbled in what is obvious an application bug. If you don't report it there, the authors may never find about it so it may be corrected one day. – jsbueno Jul 21 '15 at 12:15
  • 1
    I had tracked the bug to the Cairo lib which is used by GIMP to generate PDF files. It was already known and reported at bugs.freedesktop.org/show_bug.cgi?id=63302 – jsbueno Jul 25 '15 at 6:13
2

As soon as you select 'Export as' option in the file menu, you are directed to a dialog box where you specify the name of the file. When you click export you get an option dialog box. Select the Convert bitmaps to vector graphics where possible in export dialog box. Resulting PDF won't have a fringe. option

pdf

  • That is indeed true. However this works only with such simple shapes. I edited my question accordingly. – Wamseln Jul 24 '15 at 10:02
2

I had the same problem and solved it by creating new layer from visible "New from Visible" and then exported this new layer to pdf. I am not sure if that helps Wamseln but in my case it was enough.

  • This is a neat work-around and worked on all pdfs where I had problems. – Edgar H Jun 5 at 7:31
1

I found a workaround for the malfunction: before exporting to PDF, create a new layer mask for layers that have transparencies - when creating the mask, pick the option "Transfer Layer's Alpha Channel". The layer should look the same. Then, export the image as PDF and check the "Apply layer masks before saving". The transparency specified in the layer mask does not contain the artifacts.

BTW, thank you for opening the bug report.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.