7

How do I export a PNG image without alpha channel in GIMP?

I have checked a lot, but I can’t find this. I found an option to export PNG images without alpha channel in Inkscape, but I am not familiar with that program.

Also, is there any way to check whether an image has an alpha channel in GIMP?

  • If there was no alpha channel, would this force the image to be opaque? – Evorlor Jan 2 '15 at 15:09
6

In GIMP, alpha channels exist per layer. If you go to the layers dialogue (Ctrl+L), right-click on your layer, there is an item Remove Alpha Channel, which does what you want. If it is greyed out, your layer does not have an alpha channel.

  • You can just see it in the Layers view, though. Layers without alpha channel have their names shown in bold text. – Nyerguds Apr 14 '16 at 9:32
1

To check whether an image has a alpha channel, you can have a look at the channels dialog in GIMP:

GIMP channels dialog

Having the RGBA image components in this dialog together with the other channels (think: selection masks) is not absolutely correct. They behave significantly different from the other channels there, but this is like it's ever been and nobody has changed it yet.

  • I honestly never saw much use for the Channels dialog. For a single imported image you can see the same thing in Layers; if the layer name is shown as bold text it doesn't have an alpha channel. – Nyerguds Apr 14 '16 at 8:29
1

This is actually an annoying problem in Gimp; I often find myself having projects with multiple layers, but with a bottom layer without transparency, so having an alpha channel on the final exported image is a complete waste of space on that. Gimp doesn't seem to detect that final lack of transparency, though, so when I export to png, it always ends up containing an alpha channel.

The best solution for this seems to be to either use the "Flatten Image" function before exporting (available in the right-click menu of the Layers dialog, or just in the menus under Image), or to just export the image, then open the exported file (it'll be easily accessible in the "Open Recent" menu), and then removing the now-single layer's alpha channel and using the function to export to the same filename again.

When working with Gimp xcf projects I generally prefer the second method, since it means there is no risk of accidentally saving your flattened project and losing all your layers.

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.