2. Does GIMP support the PNG alpha channel?
3. Is there a way to specifically set the alpha of a pixel (or
perhaps your brush)?
> 1. How do you save an image as RGBA?
Add an alpha channel and save it.
> 2. Does GIMP support the PNG alpha channel?
Yes.
> 3. Is there a way to specifically set the alpha of a pixel (or
> perhaps your brush)?
You can set the opacity of a brush. I don't know if it is possible to
set the opacity of an arbitrary pixel to a specific value, though. Never
had to do this.
Michael
>You can set the opacity of a brush. I don't know if it is possible to
>set the opacity of an arbitrary pixel to a specific value, though. Never
>had to do this.
You can do this using a layer mask.
After you have added an alpha channel, select <Image>/Layers/Layers,
Channels & Paths...
In the resulting dialog, select the Layers tab (usually this is the
default and you won't have to explicitely select it).
Right click on the layer of which you want to change the transparency.
Select Add Layer Mask. After clicking on of the option, select a grey
brush and start painting in the image. Select a dark grey, and you
will get much transparency. Select a light grey, and you will get
little transparency.
See <http://gug.sunsite.dk/docs/Grokking-the-GIMP-v1.0/node44.html>
for a better explanation. (This is a mirror, but it has the distinct
advantage of lacking frames and javascript.)
--
branko collin
col...@xs4all.nl
> 1. How do you save an image as RGBA?
What do you mean? As "raw" format? Or RGBA capable formats like TGA and
PNG?
> 2. Does GIMP support the PNG alpha channel?
Yes. 8 bit alpha in RGB mode, but only 1 bit alpha in indexed mode.
> 3. Is there a way to specifically set the alpha of a pixel (or
> perhaps your brush)?
You can specify the opacity of the brush in it's tool options. Double
click on the brush icon opens the dialog.
Ciao,
Marc 'BlackJack' Rintsch
Thanks for the answers Marc! See below.
> > 1. How do you save an image as RGBA?
>
> What do you mean? As "raw" format? Or RGBA capable formats like TGA and
> PNG?
Occasionally, when I try to create a new brush GIMP complains that the
image must be RGBA. I try "adding an alpha channel" and that does not
seem to solve the problem.
ANOTHER QUESTION
How does GIMP specify LAYERS in the PNG file format. Does PNG
inherently support layers? Or does GIMP use some sort of extended
data in the file format?
I am writing a OpenGL graphics engine (its a hobby of mine.. perhaps I
will open source it or sell it some day) and I want to use PNG since
it supports transparency... and seemingly layers as well. Currently I
use BMP files which are quite pathetic to tell you the truth.
Cheers,
Robin
I don't think it does.
>Does PNG inherently support layers? Or does GIMP use some
>sort of extended data in the file format?
I don't think the GIMP stores layers in PNGs either. The only graphics
tool I know of that uses PNG as its native file format and there
probably needs some extensions to the specification is Macromedia
Fireworks.
What GIMP does save in PNGs is the layer offset.
Quoth the docs:
:Save layer offset
:
:If you are saving a single layer which has been shifted (offset)
:from the top-left of the image, this will add a oFFs chunk to your
:PNG file to preserve this offset factor in other viewers. Adding
:this chunk if it's needed increases file size slightly.
:
:
:Save resolution
:
:This adds a pHYs chunk to your PNG which records the physical
:resolution of the image. This is needed by GIMP and other viewers
:for printing or actual size previews. Adding this chunk increases
:file size slightly.
>I am writing a OpenGL graphics engine (its a hobby of mine.. perhaps I
>will open source it or sell it some day) and I want to use PNG since
>it supports transparency... and seemingly layers as well. Currently I
>use BMP files which are quite pathetic to tell you the truth.
I do not know yet of a well-defined, public format that can store
layers. The GIMP developers have been discussing the need of such a
format with one of the Image Magick developers for a short while, but
nothing came of it. I fear the problem is that every tool has
different things they want to preserve, and that a format that has all
these features would be rather unwieldy.
Perhaps SVG is such a format, but perhaps then you would still have to
store the layers in separate files.
Of course, GIMPs native format stores layes, as do the Photoshop file
format and PSP's one, both which can be read to some extent by the
GIMP.
Adobe used to publish a specification of its file format, but now you
have to be a paid developer to get access to it. I don't know if GIMP
and PSP publish their file format.
--
branko collin
col...@xs4all.nl
> How does GIMP specify LAYERS in the PNG file format. Does PNG
> inherently support layers? Or does GIMP use some sort of extended
> data in the file format?
PNG doesn't support layers. The native format of GIMP is XCF.
Ciao,
Marc 'BlackJack' Rintsch