Mobile app version of vmapp.org
Login or Join
Candy945

: Avoid jagged edges after size change I have been given a PNG image of a simple logo and with a transparent background. Size needs to be reduced but the smaller image has jagged edges. I have

@Candy945

Posted in: #Gif #Gimp #Png

I have been given a PNG image of a simple logo and with a transparent background. Size needs to be reduced but the smaller image has jagged edges. I have tried to keep the resolution unchanged, and I even tried to lower the resolution but without result. In this case it may be quicker to create the logo again in the correct size but I would really appreciate a chance to learn why this happens and how to avoid it.

Please note that the logos contain white text and therefore do not display well below.

Original image:





Transformed image:

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Candy945

1 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale640

This has little to do with size change. Your small image is a GIF, and in a GIF there is no partial opacity/transparency: it’s all or nothing, so this doesn’t allow the partially transparent pixels that make smooth edges (a technique known as anti-aliasing). Below, your big image scaled down in Gimp (top) and the scaled image you posted (bottom). The top image has partially transparent pixels:



To keep the anti-aliasing, save your image in a format that support partial transparency (typically, PNG, like your source image).





(white-on-bright-yellow image above...)

If the GIF format is required (but why would it in 2018?), before exporting to GIF you can use Layer → Transparency → Semi-flatten to create anti-aliasing edge pixels over a predetermined color. But of course the picture can only be shown over a background of that color, which somehow defeats the purpose of the transparent background.

PS: If you make the image color-indexed explicitly in Gimp (Image → Mode → Indexed), then Gimp will show you the layers with the GIF “binary” opacity. If you are in full RGB mode, this only appears when the picture is exported to GIF.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme