Hi
I’m writing a plugin to work with Gimp CCE and whenever I try to do a conversion involving non-RGB babl formats (like “CIE Lab float”) the program crashes with a segfault. Since it’s the CCE version, it’s linked with Elle’s modified babl (GitHub - ellelstone/babl: This version of babl has been modified for use with GIMP-CCE (https://github.com/ellelstone/gimp):). I then ran a simple conversion test that is bundled with babl and it also crashed like the plugin. When I linked this same test to babl’s master branch, it worked without problems. It seems there is a null pointer being passed to the babl_get_user_data function when we try to create a non-RGB babl_format. I’m attaching the test and the backtrace generated when it crashed. Could someone help me to figure out what’s happening with this version of babl?
Does your code retrieve/specify colorant info to feed to babl? Most cce code retrieves the image colorants. But eg gimp/plug-ins/common/compose.c at master · ellelstone/gimp · GitHub specifies sRGB colorants as I haven’t written code to allow user-specified colorants such as from an ICC profile from disk.
cce is an interim project to fill a temporary gap in default gimp functionality. cce is currently one xcf version behind default gimp 2.9, and I don’t know if/when i’ll be able to update cce (strained wrist, currently typing with one hand). It would be better to write a default gimp plug-in.
Hi, Elle
My code indeed didn’t feed the colorants to babl. That was the mistake. What is the recommended way to get the image colorants? Or should I hardcode this info like in the compose plugin?
I really loved your version of Gimp. I plan to use it until the official version gets all of the cce functionality. As this plugin is only for personal use I prefer to make it work with Gimp CCE. I’m completely new to Gimp’s code and learned it’s plugin API just few days ago but I may help you with some simple tasks to update cce.
Since @Elle has an hard time to write, I can give you some assistance to retrieve the gimp working color space, and from there the colorants… if that’s what you need.
Thank you very much, @Elle and @Carmelo_DrRaw!
Now I have babl correctly initialized. Here is the code I’m using (without any error checking!) in case someone else needs it in the future.