Re: [Gimp-developer] Flatten image into image and alpha
I believe you can do what you describe (if I understand correctly) using just the current PDB. You will have to convert your image to Indexed Mode and then back to RGB in order to create the previews (as Andreas stated, you can only have 1-bit alpha when using using the GIMP's Indexed Mode). Below you will find a link to a short Script-fu which I think provides close to what you want (or perhaps you might just otherwise gain some inspiration from it). You will have to provide your own code to save the Indexed version and the resulting layer mask (which is the N-bit Alpha channel), as well as create any miniaturized previews; the script is merely intended for demonstration of a technique. http://www.postbrickfilms.com/saulgoode/GIMP/Scripts/alpha-preview.scm ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Flatten image into image and alpha
Hi Andreas, On Wed, May 10, 2006 at 08:00:58PM +0200, Andreas Henriksson wrote: > > What do you mean by "apply the alpha again for preview"? > > I want radio boxes with the ability to choose between the different texture > formats, and a preview thing to see which looks best, so at first, I don't > do the entire conversation, just enough to make Gimp help me show what it > will look like. > > >You could also > >"merge visible layers" which preserves the alpha channel. Then you only > >need to remove invisible layers and may convert to indexed with up to > >255 colors, so you get 1 bit alpha. > > The problem is that I don't want 1 bit of alpha all the time, it depends on > the format. One has 5 bits, one has 3 and a couple of them have none. Then I can't help you - looks like core developer issue (I'm more of an experienced user). Bye, Tino. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Flatten image into image and alpha
Thank you for your answerOn 5/9/06, Tino Schwarze <[EMAIL PROTECTED]> wrote: What do you mean by "apply the alpha again for preview"? I want radio boxes with the ability to choose between the different texture formats, and a preview thing to see which looks best, so at first, I don't do the entire conversation, just enough to make Gimp help me show what it will look like.You could also"merge visible layers" which preserves the alpha channel. Then you only need to remove invisible layers and may convert to indexed with up to255 colors, so you get 1 bit alpha.The problem is that I don't want 1 bit of alpha all the time, it depends on the format. One has 5 bits, one has 3 and a couple of them have none. Andreas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Flatten image into image and alpha
Hi Andreas, On Tue, May 09, 2006 at 05:57:30PM +0200, Andreas Henriksson wrote: > Looking through the API specifications, I can't find a good way to flatten > an image into image and alpha. I'm trying to make a save plugin for the > Nintendo DS's texture formats, there is a list of them at > http://dualis.1emulation.com/dsti.html#lcdioteximgparam . What I really want > to do is probably to extract the alpha data, flatten the image, convert the > image to indexed, convert the alpha, then apply the alpha again for preview. What do you mean by "apply the alpha again for preview"? You could also "merge visible layers" which preserves the alpha channel. Then you only need to remove invisible layers and may convert to indexed with up to 255 colors, so you get 1 bit alpha. HTH, Tino. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer