Color-managed Cairo is slipping away

Color-managed Cairo is slipping away

Can you let a bit of drama enter your life? OK, some more drama? Apparently, Inkscape isn't getting the long anticipated color-managed PDF exporting ability it needs despite the initial work that's already been done.

In July of this year, Adrian Johnson announced the availability of patches that introduce the basics of color management in the PDF backend of Cairo, as well as the relevant functionality in the Cairo-based PDF exporter in Inkscape, a famous free vector-graphics editor. The patches have been bitrotting in a public Git repo ever since then.

What was done

Earlier this year Adrian Johnson, one of Cairo contributors, patched several components to implement tagging PDF objects with color spaces. The following software and system components were affected:

  • Cairo, the 2D vector graphics library used by Inkscape, GIMP, Scribus and all GTK+ based applications. PDF and PNG backends were patched.
  • Pixman, Cairo's pixel manipulation library. Adrian added QCMS and LittleCMS based backends to it.
  • Poppler, a PDF rendering library used by apps like GIMP and Evince (PDF reader in GNOME).
  • Inkscape, the vector graphics editor.

In the proposed patches, the PDF backend does not do any color conversions. All PDF objects are tagged with their original color space.

PDF exporting options in GIMP

PDF exporting options in GIMP

As Adrian explained in a private conversation, he would like to see all of the PDF color space models supported eventually. He started with an RGB only implementation as it significantly simplifies the implementation and it covers most users' needs.

What happened next

On July 11 he mailed the inkscape-devel@ list to tell about his project and ask some specific questions. Unfortunately he got very little feedback.

Two weeks later Adrian mailed the list for Cairo developers and didn't quite get the expected response either. The thread slowly continued to early August and then stopped with no agreements made. No member of 3rd party apps (such as Inkscape) joined in to discuss practical aspects of the proposed API.

So what's the problem exactly?

Why wasn't the work finished? Adrian names three reasons.

First of all, he worked on Cairo in his spare time only, and he doesn't have that time anymore.

The second reason is the lack of interest in his patches:

  • no feedback on the Cairo list from any color management experts or Cairo users in support of the patches;
  • no consensus among Cairo developers on whether Cairo should be involved in color management.

Finally, the new API needs a working implementation in Cairo's image backend. Adrian only has experience with the PS/PDF backends, and very little experience with the image backend:

My patches are largely a hack to get something working. I was hoping my API proposal and prototype implementation would generate enough interest in CMS for Cairo to get some help. That has not worked out.

And thus the code is bitrotting in the Git repository now.

Are we in trouble?

Yes, we are. Writing untagged bitmap images (Inkscape only exports PNG) and PDF objects is simply evil. Printing quality becomes pretty much unpredictable, and that could ruin someone's design business.

Furthermore, color managed PDF exporting would open the door to color separated PDF exporting. Without it, we are still down to horrible workarounds like passing the whole design through Scribus and hoping like hell we didn't use any SVG features unsupported by this free desktop publishing app.

CMYK color from Inkscape in Scribus

CMYK color from Inkscape in Scribus via an ICC profile

As if that wasn't quite enough, Cairo team seems to be somewhat slow at applying patches to the main development branch. For instance, it took the team at least two years to get the gradient mesh support released in a stable version.

None of the big guys to save us?

Inkscape is not the only project that would benefit with color management in Cairo. GIMP also uses Cairo for quite a few things, from rendering tools' widgets on canvas to PDF exporting. And while Scribus already uses it's own internal library to do PDF exporting, it still makes use of Cairo for on-screen rendering on all systems, as well as for printing on Windows. For instance, a PDF spec compliant on-screen rendering with complex transparencies and blend modes would be a certain bonus.

Maybe these teams could get involved?

So far it's unlikely that anyone's from the Inkscape camp is going to take care of color management. Tav seems to be less at home with color, and he's already busy up to his neck with SVG 2.0 related projects. Jon Cruz, the all-things-color developer has an on-and-off relationship with the project. Felipe Sanches who did some relevant development in the past is now busy with his own 3D printing business.

Color management indicators in Inkscape

Color management improvements by Felipe Sanches, GSoC2009 project, available since v0.48

The GIMP team is still short-handed, so it's unlikely that they will meddle into the business of such a huge external project. Besides, the top priority right now is to finalize the transition to GEGL and high bit depth processing. All color management related work in the project is handled by one person, and she still is learning as she goes.

I briefly discussed this issue with Jean Ghali from the Scribus project as well. He confirmed that Adrian's patches would be an improvement as complete on-screen rendering as per PDF standards, with all color conversions involved, is currently an extremely difficult task for an opensource project. He also doesn't have time to participate.

So yes — the big guys are out; at least, for now.

Next step

Let's try to put this story into a more constructive perspective. What could you do? Here's what Adrian says:

It would be more helpful to get the support from Cairo users that are using SVG or PDF to talk about what they need.

For example the need to support ICC profiles as a source color space, the need for intermediate blending space (sRGB and linear RGB for SVG, ICC for PDF).

This is at the level that Cairo developers can understand, it would help to shape the API to achieve this.

If you are an advanced user who understands color management, subscribe to the Cairo mailing list and explain exactly what you need Cairo to do.

If you are a developer who needs Cairo to do handle color management, have a go at the patches (each of the components has a "color-space" branch in Git) and talk to Cairo developers about the proposed API. Explain to them what you need Cairo to do for you.

Unless somebody takes action and fixes the issue, we are going to live with lousy PDF exporting and on-screen rendering for years to come.

Edit (Oct 17, 2012): the discussion in the list for Cairo developers resumed after this article went online. Let's see what happens next.

Was it useful? There's more:

26 Comments

Leave a comment
  1. Sorry but what do you mean with “any color management experts” Adrian got an invitation to the Linux ColorManagement Hackfest, no response from him!

  2. “no consensus among Cairo developers on whether Cairo should be involved in color management”

    That’s a bit out of the blue. As I talked with Carl Worth and others, colour management in Cairo was mainly issue of getting the API right from the beginning, and no doubt that it will be useful.

  3. Alexandre Prokoudine 16 October 2012 at 6:45 am

    Kai-Uwe, this is about an exact discussion that took place few months ago and an exact API proposal that was discussed and concerns that were raised. It’s not about something you discussed somewhere with somebody.

  4. It feels a bit tragic that such an important feature just fizzles out due to lack of interest from developers.
    Also finger pointing and blaming is hardly a constructive start of a discussion how to remedy this.
    Hopefully someone that can help will realise they are needed.

  5. CMS in Cairo is not a new API issue only. Color managed rendering means graphics processing in any color space (CMYK, Lab, Grayscale etc.). This will require a complete Cairo reimplementation.

  6. That’s the problem with open source user applications. With servers, where open source thrives because a lot of companies supports development of various kernel and web server software.

    Most user apps however still developed by only a handful of people, who doing it mostly in their free time. Many of them drifting away from these projects because they became bored with it, and there is no one who takes their place. So, the development on these vital parts halts, which seriously hinder the progress of lot of applications. We have to wait years for the new version to arrive, and when it finally does, it feels like a ‘one step forward, two steps back’ situation(See Gimp 2.8).

    There needs to be a company or foundation for these applications. One that would help these projects thrive, make them work well with each other, advertise and propagate them, find a way to make money from them (within reasonable limits of course), and make them an appealing and well payed carrier path for programmers and designers, so there would be enough people to work on each subsystem.

    Currently, most of the users aren’t supporting these projects financially because either they aren’t have much money to begin with (that’s why they use free software), or they don’t trust that their donation will make a difference. If done properly, such foundation/company would convince the average user, that while they could get the application for free, why is it important in the long term to donate, - even if just a dollar -, instead of buying/pirating a copy-protected closed-source counterpart.

  7. Yep I have stated it in the past. Their needs to be a “Graphics Foundation”. For everything from Gimp, Inkscape, etc. But this seems to fall on DEAF ears. And this is the sad result of open source, and why proprietary kicks it’s ass in the graphics arena, for the lack of a better term. Windows 8 will flop, Linux will still go on being an IT operating system, since “developers” don’t care about Linux being a nice desktop or workstation graphics platform, like the WAY over priced Mac!.  who46

  8. Thanks for the update, but this is really disheartening. As a front end dev and web/print designer who was looking to finally fully migrate to opensource applications (ie;  giving the boot to adobe), it looks like I’ll need to keep my windows partitions for some time yet.

    Alexandre, as an aside, do you have any insight as to why Blender does so well in garnering willing devs? Would it be easier to expand the Blender foundation than to create a whole new Image/Graphics foundation?

    And thanks for all your work in the OS graphics realm.

  9. @ DooMHeaD16

    Totally agreed. I would donate my money to the devs if it’s for the better. But as I can see now, it’s pretty much useless to donate when no one actully work on the project to fix an obvious issue like color management.

    Yes, I have little money, no surprise because I use free software. However, I can buy games like Asphalt 7, Batman Dark Night Rise, Amazing Spiderman, Horn, Fifa 2012, Monopoly, Real Racing 2(Real Racing 3 is coming, I will buy it as soon as it came out), and many more with my little money. Not even count apps I bought so far on Play Store. But I will never pay for Captain America from Marvel which last update was year ago and many bugs still remain, thanks but not even $1 from me.

    I think it would be better if we have libre graphics foundation or something that will do proper development. And build trust to get donation. Sell some service like free to play game to get income. In the end when services involved, there’s no room for on-and-off employee, no room for some serious issue to last for years. We’ll get a good/acceptable or just usable graphics software eventually.

  10. I hear donations, LibreGraphicsFoundation wtf. was this a topic here? And all posting anonymous F*** trolls!

    The point is as Igor put it clear out, its a complete rework of CAIRO. Noone keeps Adrian from doing implement CM in it. A lot of people have interest in it, to get it done - so the only problem is communication.

    And the article here its just “propaganda” and cant be taken serious. First putting anonymous finger to CM people and blame them for being not helpful. Then talking about “exact discussion that took place few months ago and an exact API proposal that was discussed and concerns that were raised.” without pointing to it. That is simple “propaganda”
    As David stated “Also finger pointing and blaming is hardly a constructive start of a discussion how to remedy this.”

    as I said in the first comment, there was an invitation to Adrian and it still stands!

  11. @DooMHeaD, @Bob, @Kreaninw I don’t think it’s fair to force developers embracing the foundation model, when they don’t want to. Personally I’d rather see a foundation too, but it has always been up to teams.

    @cakezula Actually, I have a write-up coming on that. But in short, Ton had always been an entrepreneur. Making a viable business is what he had grown to do.

    @gnokii Actually, the article links to Adrian’s mail to cairo developers list. That’s the pointing you wanted, but missed or ignored. The article also passed fact checking by several developers from Inkscape, GIMP and Scribus teams. If you can’t live with that, nobody’s forcing you to visit LGW.

  12. I don’t think a (libre graphics) foundation on its own would change anything. Right now most developers seems to want to work on their libre graphics projects in their spare time, rather than to (try to) make it a serious, for-pay thing.
    Exceptions are some in the Krita and Blender teams.

  13. @houseincity they doing it for fun not for creating business. It’s simple a docracy, if you want something DO IT!
    It becomes more boring on the end if you have ppl they tell you what u have to do. Remember fun ;)

  14. There’s nothing wrong if the devs want to do it for fun. But people are moaning here because there’s no serious alternative like Blender for GIMP and Inkscape and may be Scribus. Then, why didn’t they do it themself? That’s simple, because they can’t. Like how you can’t drive the car as fast as Michael Schumacher or you can’t be another Steve Job. It’s just out of your scope and probably you can’t do it alone.

    This article showed the current problem with a very clear explanations.

  15. @Kreaninw I am very sure, Michael Schuhmacher was not as a baby a good driver, its more he started one day driving cars and learned and learned during doing it.
    So “they cant” is one of the oldest excuses in such discussions always used. They cant maybe yet!

    The point here is, its sold as the developer hadnt interest in it and Adrian did not get help or they didnt want it. But that’s not really true.

  16. Sure, if you wish to dedicate several years of your life to software development you can achieve a lot. But you cannot expect many people to want these things that bad.

    At LGM this year, during a project meeting, someone said that there are only two things that keep non-commercial open source software development going: the naivety of new contributors, and the stubbornness of existing contributors.

  17. @gnokii

    Of course, Michael Schuhmacher didn’t drive as fast when he were born. But that’s entirely different thing. My point is he never build his own car nor he was able to do it. That’s simply out of his scope. And that would mean he wasted the time to improve his driving skill.

    IMO, if the users need to code the app they want, it means there’s something wrong.

    Open source as you said is useless. Because it has no direction and there’s no responsibility to fulfil the hole. It just like how you force the users to buy Adobe suite. That’s why we need some foundation or something to make this better and can be an alternative choice for everyone. If close source is copyright thing, then open source is copy left for everyone, am I right? But as I can see, GIMP and Inkscape and other run around doesn’t left anything for anyone, because it’s just for the devs fun.

  18. To say that open source is useless and does not leave anything for anyone is to see paint the world in black and white, when it is obviously more colorful than that (thankfully).
    There are thousands of people using GIMP, Inkscape, MyPaint and similar regularly. To them it is a useful tool in their work or hobby, to the developers it is a fun past-time. With this in mind, it does not look like the two are fundamentally opposed.

    With that said, it is a sad fact that open source projects (and companies in this area) tends to do much better at creating lower-level technology components than end-user software or vertically integrated products.

    If you want a foundation that works it needs to be driven by leaders whom others are willing to follow, and/or it needs to have a sustainable source of income. Registering a foundation is easy, the above less so. If you think you can help solve it, come to LGM in Madrid.

  19. @Jon Nordby

    I’m in Thailand, going there is not easy for me. T___T

  20. It would be a fantastic feature…

    Occasionally in the gnu project happens something maleficent… Probably the developers of Cairo aren’t interested a this feature, but it could be a little thing able to generate strong repercussions and attracting a lot of people who are in doubt about color management in a Gnu System.

    Probably the developer have needed a bit of money to introduce this feature on Cairo, I think this is the only method we can use to help him and having this essential feature in our workflow with the Gnu Graphic Softwares.

    I know, it sounds very bad, but it’s can be a solution; maybe LGW can do by ambassador trying to have a deal with the developer to open a campaign of donations for achieving a determinated quote.

  21. Kai-Uwe joined the discission in the Cairo’s mailing list last week, but the discussion is dying regardless (or so it seems). Too bad.

  22. Maybe only one voice is not enough for obtaining the attention about the Cairo Team.

    But we could do a petition about this situation, I think I can receive a large support from the Italian community. There are a lot of Italian people who use Gnu/Linux and its graphic softwares.

  23. @Danielsan
    it is pretty normal, that a low priority goal like colour management for Cairo goes very slow. But every comment on a implementation and it’s API is a resource for the next contributor.

    @Alexandre here is a nice link to the ml thread:
    http://old.nabble.com/-cairo—Color-space-API-to34220996.html

  24. Hi People,
    First of all << thanks to everyone that contributes to open source >> I use it everyday at work ;)

    I just wanted to support Danielsan’s idea of creating a campaign of donations to get trough this kind of stuck-features, that holds everything back..

    With so many kick starting projects getting thousands of dollars, should be possible to make this happen for the open graphic tools?
    Donations could change the mind of the contributors and prove that even if we don’t have time or we don’t know how to contribute, we can give love to the projects.. hopefully getting a more united open graphic suite ;)

  25. I think this little feature is really able to catch the attention of a lot of people.

    Not always developers and users share the same point of view, for example this for me is a classic example where this feature isn’t very important for developer but really useful for a lot of graphics and artists who working with the computers.

    There will be a lot of people even agencies interested in this feature with the result to enlarge the base and the interesting in FLOSS.

  26. Finally, Found Your Blog after wasting my 30 min in google. Nice Post And Really Good Website :)

    fifa world cup 2014 live online streaming

    fifa world cup 2014 schedule

    fifa world cup 2014 fixtures

Tell us what you think

Submit the word you see below: