SDL_image with XCF files question

Can anyone tell me the state of the XCF support in SDL_image?

I’ve been using it for a number of weeks, without incident, until
I tried to use it with alpha blending. I’ve discovered what
I believe to be a major hole in the XCF loading routines in
that they don’t seem to support alpha AT ALL.

Can anyone confirm?

-> Tim

Tim Oertel wrote:

Can anyone tell me the state of the XCF support in SDL_image?

Included as unsupported and turned off by default. Known shaky code.

The Gimp developers themselves discourage the use of XCF as an interchange
format, partly because they want the freedom of being able to change it
at whim, but also because it is not very suitable for that purpose.

For instance, the XCF format allows many complex blending modes between
layers, few (if any) are supported in SDL_image.

Note that you can use Gimp itself as a file converter in batch mode
(the -batch command line flag, if I recall correctly)

I’ve been using it for a number of weeks, without incident, until
I tried to use it with alpha blending. I’ve discovered what
I believe to be a major hole in the XCF loading routines in
that they don’t seem to support alpha AT ALL.

I’m not going to do anything to fix the XCF loader myself, but if you
send us a patch it’s almost guaranteed to be applied without further
inspection. The code can’t become much messier than it already is :slight_smile:

Mattias Engdegard wrote (in part):

For instance, the XCF format allows many complex blending modes
between layers, few (if any) are supported in SDL_image.

So, have you run across any docs on the format, or do I just have
to crawl through the Gimp source?

Tim Oertel <@Tim_Oertel> wrote:

Note that you can use Gimp itself as a file converter in batch mode
(the -batch command line flag, if I recall correctly)

Very useful, thanks. Should have guessed there’d be one.

I’ve been using it for a number of weeks, without incident, until
I tried to use it with alpha blending. I’ve discovered what
I believe to be a major hole in the XCF loading routines in
that they don’t seem to support alpha AT ALL.

I’m not going to do anything to fix the XCF loader myself, but if you
send us a patch it’s almost guaranteed to be applied without further
inspection. The code can’t become much messier than it already is :slight_smile:

That’s fine, although I’ll probably only patch it in so far as it’ll
fix my problem, but docs would certainly help…

  • Tim

Tim Oertel wrote:

So, have you run across any docs on the format, or do I just have
to crawl through the Gimp source?

It is documented in some file in the gimp source distribution (I don’t
remember which). But as I said, it’s not recommended for use outside Gimp