Gimp-Forum.net

Full Version: Exporting Alpha channel image as png
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can someone tell me now to export an alpha channel image and keep the alpha channel, when I save it, it keeps the r,g,b and removes the alpha.
I'm trying to save it as a 8bit RGB PNG

https://imgur.com/kFlL1ZP


https://imgur.com/meUTMJJ

thanks  Shy
You have to make the alpha channel an image, which is very easy.

Open the Channels list, and drag the alpha channel to the toolbox,

[attachment=9839]

This will create a new image (which is grayscale):

[attachment=9840]

Save that new image.

Mind: dragging the alpha channel in the first step has the side of effect of de-selecting it, which will cause problems if you want to do further work (it is equivalent to an alpha-lock on the whole image). So make sure to re-select it.
(05-27-2023, 08:05 AM)Ofnuts Wrote: [ -> ]You have to make the alpha channel an image, which is very easy.

Open the Channels list, and drag the alpha channel to the toolbox,



This will create a new image (which is grayscale):



Save that new image.

Mind: dragging the alpha channel in the first step has the side of effect of de-selecting it, which will cause problems if you want to do further work (it is equivalent to an alpha-lock on the whole image). So make sure to re-select it.

Hi thanks for the quick reply , I think the image is supposed to come up with a black background (its a roadmap for a game) and the original alpha channels looks like this:

without alpha layer visible:
https://imgur.com/diie88n

with alpha layer visible:
https://imgur.com/h2gZZyF
Not clear. Image 1 is a plain image where all pixels are black (R=G=B=0) (except a few red lines RGB=(255,0,0)) and opaque (A=255). Image 2 is an image where everything is black (R=G=B=0) but also transparent (A=0).

A PNG contains either 3 (RGB) or 4  (RGBA) channels, so "exporting the alpha channel" is part of exporting the image.

Unless your problem is that you are forcing the export to 8bpc RGB and not to 8bpc RGBA thus explicitly dropping the alpha channel. if you export with automatic pixelformat, you should also get 8pbc RGBA if your layer has an alpha channel.
(05-27-2023, 02:44 PM)Ofnuts Wrote: [ -> ]Not clear. Image 1 is a plain image where all pixels are black (R=G=B=0) (except a few red lines RGB=(255,0,0)) and opaque (A=255). Image 2 is an image where everything is black (R=G=B=0) but also transparent (A=0).

A PNG contains either 3 (RGB) or 4  (RGBA) channels, so "exporting the alpha channel" is part of exporting the image.

Unless your problem is that you are forcing the export to 8bpc RGB and not to 8bpc RGBA thus explicitly dropping the alpha channel. if you export with automatic pixelformat, you should also get 8pbc RGBA if your layer has an alpha channel.

thank you Smile it was choosing the 8bit rgb that was causing the issue

How would I be able to remove the old road off the red, green channel? I've found post that shows me how to apply a layer mask so I can put my new roads on.
https://imgur.com/VWdDEL5

either that or figure out why my current alpha file doesn't have the transparency over the top for it to work
https://imgur.com/ePQw5SN

(05-27-2023, 02:44 PM)Ofnuts Wrote: [ -> ]Not clear. Image 1 is a plain image where all pixels are black (R=G=B=0) (except a few red lines RGB=(255,0,0)) and opaque (A=255). Image 2 is an image where everything is black (R=G=B=0) but also transparent (A=0).

A PNG contains either 3 (RGB) or 4  (RGBA) channels, so "exporting the alpha channel" is part of exporting the image.

Unless your problem is that you are forcing the export to 8bpc RGB and not to 8bpc RGBA thus explicitly dropping the alpha channel. if you export with automatic pixelformat, you should also get 8pbc RGBA if your layer has an alpha channel.

How would I be able to remove the old road off the red, green channel? I've found post that shows me how to apply a layer mask so I can put my new roads on.
https://imgur.com/VWdDEL5

either that or figure out why my current alpha file doesn't have the transparency over the top for it to work
https://imgur.com/ePQw5SN
What you see in the RGB channels thumbnails is an indirect consequence of the layers contents.

[attachment=9841]

You can't edit them directly, you have to edit the layers. If you want to remove your red road, you paint over it  on the layer(s), where it appears. Don't put too much importance on the Channels display. There are a few tricks involving it, but by and large you can do all your editing without looking at it.

Notes: in you second image, you have deselected most channels.

Also, it is a lot easier for us if you add your pictures as forum attachments, because they appear in the text and we don't have to try to leated random names in your post to random images.
(05-27-2023, 07:41 AM)fluffypanda Wrote: [ -> ]Can someone tell me now to export an alpha channel image and keep the alpha channel, when I save it, it keeps the r,g,b and removes the alpha.
I'm trying to save it as a 8bit RGB PNG

https://imgur.com/kFlL1ZP


https://imgur.com/meUTMJJ

thanks  Shy

I am coming at this from a different viewpoint. Please bear with me because I haven't worked with 8-bit Pngs.

But for a 32 bit PNG which supports transparency, the way to get it to be transparent is to go to -
the Layer Menu > Transparency > Add Alpha Channel

Another way to know if the Alpha Channel has been enabled is if the layer name is bold, the alpha channel has not been enabled.
Once the Alpha Channel has been enabled, exporting to a PNG format will save your transparency.
(05-31-2023, 11:54 AM)AngelH Wrote: [ -> ]
(05-27-2023, 07:41 AM)fluffypanda Wrote: [ -> ]Can someone tell me now to export an alpha channel image and keep the alpha channel, when I save it, it keeps the r,g,b and removes the alpha.
I'm trying to save it as a 8bit RGB PNG

https://imgur.com/kFlL1ZP


https://imgur.com/meUTMJJ

thanks  Shy

I am coming at this from a different viewpoint. Please bear with me because I haven't worked with 8-bit Pngs.

But for a 32 bit PNG which supports transparency, the way to get it to be transparent is to go to -
the Layer Menu > Transparency > Add Alpha Channel

Another way to know if the Alpha Channel has been enabled is if the layer name is bold, the alpha channel has not been enabled.
Once the Alpha Channel has been enabled, exporting to a PNG format will save your transparency.

Thank you firstly for the bear puns! @Ofnuts previously mentioned that 8bits don't have alpha layers.  I read they have to be 8 bit and I was trying to convert and save to an 8bit file .. then the alpha layers kept dissappearing.  Maybe they will work as a different bit size as the ones generated for 7dtd have transparency.  
thanks all Smile
(06-01-2023, 10:05 AM)fluffypanda Wrote: [ -> ]Thank you firstly for the bear puns! @Ofnuts previously mentioned that 8bits don't have alpha layers.  I read they have to be 8 bit and I was trying to convert and save to an 8bit file .. then the alpha layers kept dissappearing.  Maybe they will work as a different bit size as the ones generated for 7dtd have transparency.  
thanks all Smile

I never said that... What I said is that the 8bpc RGB format has no alpha channel, while the 8bpc RGBA has one (the A in the format name is the alpha channel). So exporting to 8bpc RGB format removes the alpha channel if there is one.