#356 ufraw can't use lcms 2.x

closed-fixed
nobody
None
5
2013-10-05
2013-10-01
No

Because lcms 1.x hasn't been updated in nearly 4 years, I've ported a patch I wrote for dcraw and submitted upstream to Dave Coffin, plus the necessary changes in configure.ac. I've done two versions, one that prints error messages to stderr (as the dcraw CLI), and one that doesn't. You might want to adapt the former so it ties in with any error reporting you have in ufraw.

I'll attach both patches.

2 Attachments

Discussion

  • Nils Philippsen

    Nils Philippsen - 2013-10-01

    Argh, just noticed that you use lcms outside of dcraw.cc. I'll expand the patches to cover these areas as well.

     
  • Nils Philippsen

    Nils Philippsen - 2013-10-02

    OK, the attached patch contains the changes needed in ufraw_developer.c and ufraw_writer.c. It uses the LCMS error handler from ufraw_developer.c in dcraw.cc.

     
  • Nils Philippsen

    Nils Philippsen - 2013-10-02

    Dang, doesn't build with --enable-extras (due to dcraw.cc using stuff from ufraw_developer.c). I'll just copy over the code.

     
  • Nils Philippsen

    Nils Philippsen - 2013-10-02

    OK, for the last time hopefully :).

    The attached patch does what I described above and manages to build with "--enable-extras", i.e. standalone dcraw from dcraw.cc.

     
  • Niels Kristian Bech Jensen

    Hi Nils.

    Thanks for your great work. The latest version of your patch builds with GCC 4.8.x but not with all earlier versions of GCC. It does not work with GCC 4.6.3 (Ubuntu 12.04 LTS). Is seems that the return value of cmsPipelineInsertStage() is the culprit.

    Regards,
    Niels Kristian

     
  • Nils Philippsen

    Nils Philippsen - 2013-10-05

    The culprit doesn't seem to be the gcc version, but that cmsPipelineInsertStage() was void in lcms versions < 2.5 and from then on returns int.

    I've updated the patch so it ignores the return value up to lcms-2.4 and checks it from lcms-2.5 on.

     
  • Niels Kristian Bech Jensen

    Hi Nils.

    Thanks for the patch. I have commited it to the cvs repository with a few changes.

    Regards,
    Niels Kristian

     
  • Niels Kristian Bech Jensen

    • status: open --> closed-fixed
     
  • Nils Philippsen

    Nils Philippsen - 2013-10-05

    Well, I used USE_LCMS rather than HAVE_LCMS because that's what dcraw did and you regularly have to import that code. Anyway, we'll probably have to wait for Dave how he integrates the patch I sent, I haven't heard from him since.

    Besides that, you added a few WB presets along. I know this is CVS and commits are expensive, but that makes stuff hard to find later on ;-).

     
  • Niels Kristian Bech Jensen

    Any differences from Dave's dcraw.c is only a (small) problem the first time dcraw.c is changed. Then they are handled automatically.

    The WB presets were in a separate commit.

    Regards,
    Niels Kristian

     
  • Nils Philippsen

    Nils Philippsen - 2013-10-05

    The WB presets were in a separate commit.

    Oops. Seems I can't git on the weekend, sorry ;-).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks