Links

The steps

  1. Open the original image (whether it is a 24-bit PNG, a SVG, or whatever)
  2. Select a proper background color (see the introduction above for details) and create a new layer with that background color (Layer - New layer - Layer fill type: background color). Then exchange the layer order and keep the background layer below (Dialog - Layers - select background layer - hit the Down arrow)
  3. Flatten the image (Image - Flatten image)
  4. Add an alpha channel (Layer - Transparency - Add alpha channel)
  5. Select the background color (using Selection - By color) and clear it (Edit - Clear)
  6. Convert the image to indexed color (Image - Mode - Indexed color, default settings should be fine). You may notice a background color halo around your image. That's fine, cause it will create an anti-aliased effect once you use put the PNG on your page and it's much better (believe me) than having ugly harsh edges.
  7. Save the image to the final PNG file (File - Save as) and remember to check: Save color values from transparent pixels
blog comments powered by Disqus