Long boring post warning.Going back to the OP's original information
Quote:
...I have a gimp xcf file with just black pixels and fully transparent pixels.
and later
...Color mode for both the xcf and the exported png is rgb, but imagemagick reads it as bilevel...
I can not reproduce Gimp xcf RGB image -> png bilevel.
Taking the first statement and making a RGB transparent canvas, painting on it with black. Two cases say, using the pencil tool for just black / transparent or the brush tool which will introduce some anti-aliasing.
Makes no difference as far as colorspace only to the depth of the alpha channel.
Imagemagick (IM) identify -verbose gives
for pure black and transparency
Type: PaletteAlpha
Endianess: Undefined
Colorspace: sRGB
Depth: 8/1-bit
Channel depth:
red: 1-bit
green: 1-bit
blue: 1-bit
alpha: 1-bit
and for a bit of anti-aliasing
Type: PaletteAlpha
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 1-bit
green: 1-bit
blue: 1-bit
alpha: 8-bit
Neither are bilevel, started as RGB and are still RGB
Similar pair of images but starting as a Grayscale / transparent Gimp canvas, does give bilevel
IM gives
Type: Bilevel
Base type: Bilevel
Endianess: Undefined
Colorspace: Gray
Depth: 8/1-bit
Channel depth:
gray: 1-bit
alpha: 1-bit
and
Type: Bilevel
Base type: Bilevel
Endianess: Undefined
Colorspace: Gray
Depth: 8-bit
Channel depth:
gray: 1-bit
alpha: 8-bit
A similar result, add a bit of anti-aliasing and the alpha bumps up to 8 bits.
As a test, starting with a grayscale black/transparent xcf image and changing the mode to RGB, a default png export gives a palettealpha rgb image.
I think the OP needs to give more information on how the original xcf image was made and what is expected
Quote:
..Is there a way I can force gimp to export to RGBA?..
AFAIK exporting from Gimp in RGB mode.
Is there something more expected? maybe truecolor 8 bits per channel? I do not thing that is possible with a black/transparent image.
You can force a 32 bit png using IM
convert in.png -colorspace sRGB PNG32:out.png but that gets the same as a Gimp RGB exported png, 1 bit per channel.