4

I cut a region out of this Wikimedia Commons picture: cout-out

I simply used the free select tool to cut out the part (ctrl+x) and inserted it into another image without background.

However, when I export the project as PDF (File → Export as → Select file type → PDF), I get gray fringes around the border of the cut-out:

gray fringes

Closer look:

closer look at the gray fringe

Why do these fringes appear? The image looks perfectly normal in GIMP, as shown in this picture:

looks like no fringe inside gimp

Also in my default image viewer, when exported as PNG, the borders look perfectly normal:

PNG shows no signs of gary fringes, or does it?

Why do these fringes appear? Is there a way to remove them?

  • Was perhaps your selection feathered? – Paolo Gibellini Sep 17 '15 at 9:29
  • Based on your comment to Phil's answer, it looks like your png -> PDF conversion is actually happening at the LaTeX stage. Have you tried asking this question on tex.stackexchange? – Scribblemacher Jan 15 '16 at 12:41
1

The gray fringe appears at the boundary between "opaque white pixels" and "transparent pixels".

When you zoom in, GIMP is showing each pixel as a large square which is either white or transparent, so it appears to be OK.

When you zoom in a PDF document, the PDF engine smooths the image so that squares do not appear. So it has to smooth both the color (RGB channels) and opacity (the alpha channel). And here it surfaces that transparent pixels also must have some color to be interpolated. In most cases the "color" of transparent pixels turns out to be black. As a result, halfway between centers of white and transparent pixels you get a half opacity and a half-white, half-black color, which yields this very gray fringe.

One possibility to solve this is to make transparent pixels not fully transparent. In GIMP, add a new layer below the current one, fill it with white color, and make it "almost transparent" (opacity 1 of 255). It will become invisible to the eye. Then, flatten your image and export to PDF. Since the "transparent" pixels are now not fully transparent, they will retain their original white color which will always interpolate as white.

0

Simply convert this to vector as it looks solid black so could be done easily.

  • 1
    The community frowns upon one line answers, as they should be comments. Try to expand your answer into how to do this. Or I'm afraid this will be quite quickly closed. – joojaa Dec 16 '15 at 12:08
0

Try something different: totally remove the white (so you only get the black lines):

  1. Crop/edit the picture
  2. Color>Color to alpha and remove the white background, to just keep the black lines.
  3. Save as PNG

enter image description here

-1

Try flattening the layers before export.

  • Thanks for your answer, but this does not solve the problem since it deletes the alpha information. My actual workflow is png -> gimp -> png -> Latex -> pdf The bad thing is, that these fringes also appear in this workflow. – Wamseln Jul 19 '15 at 10:58

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.