Gimp-Forum.net
Removing Alpha Channel? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions)
+---- Thread: Removing Alpha Channel? (/Thread-Removing-Alpha-Channel--7110)

Pages: 1 2


RE: Removing Alpha Channel? - david - 07-28-2022

@Ofnuts,

Thanks for the reply. I have now fixed the problem by pasting the image into a new RGB layer. However, it does not explain what I detailed in #3 of this thread!

Running that code and then continuing with the subsequent steps (duplicate, pixelise, invert, etc.) produces different results with my test images. My test image with alpha channel was deliberately extreme in order to show differences.

Whilst this is no longer relevant for me, an explanation may help others in the future.

I greatly appreciate the help you provide - may you long continue!

david.


RE: Removing Alpha Channel? - Ofnuts - 07-28-2022

(07-28-2022, 09:34 AM)david Wrote: @Ofnuts,

Thanks for the reply. I have now fixed the problem by pasting the image into a new RGB layer. However, it does not explain what I detailed in #3 of this thread!

Running that code and then continuing with the subsequent steps (duplicate, pixelise, invert, etc.) produces different results with my test images. My test image with alpha channel was deliberately extreme in order to show differences.

Whilst this is no longer relevant for me, an explanation may help others in the future.

I greatly appreciate the help you provide - may you long continue!

david.

Did you try to fix as I indicated, which could fix the root cause, instead of just fixing the symptom?


RE: Removing Alpha Channel? - david - 07-28-2022

@Ofnuts,

Please forgive my persistence.

I have a perfectly working plug-in which does everything I require.

The purpose of my last question was to find out if the code at #5 of this thread actually removes the alpha channel. It gives the appearance of removing it as shown in #3, but if I save the image, using Save or Save As, close GIMP and then reload the image it re-appears with the alpha channel. This is confirmed by looking at the channels palette. The alpha channel of my test image has a distinct appearance as it is 50% grey.

The answer to this question may well be buried in the source code of GIMP!

So this is more of an intellectual question.