Menu

DCRAWOps.calcAverageWB() - too few arguments

2012-05-28
2013-04-30
  • Artur de Sousa Rocha

    The signature is calcAverageWB(java.lang.Integer pLeft, java.lang.Integer pWidth) but -A accepts four arguments:

    -A <x y w h> Average a grey box for white balance
    

    Also, why Integer instead of int?

     
  • Bernhard Bablok

    Bernhard Bablok - 2012-05-29

    The reason for the signature error is an error in the interface-definition for DCRAW (and probably in the code-generator). I will investigate this further and fix it in the next days. N.B. that also setWB() has the wrong signature.

    As a workaround, you could add your own method with the signature

    public DCRAWOps calcAverageWB(Integer pLeft, Integer pTop, Integer pWidth, Integer pHeight)
    

    Integer is more flexible than int: you can pass an int and autoboxing will wrap it as an Integer, and you can also pass a null. For dcraw, that's not an option, but ImageMagick often allows a variable number of  arguments to an option, so for example passing two numbers and two nulls will work fine.

    Bernhard

     
  • Bernhard Bablok

    Bernhard Bablok - 2012-06-04

    I just released version 1.3.2 which fixes the reported bug. Please have a look at it and check if works now.

    Thanks, Bernhard

     

Log in to post a comment.