[Digikam-devel] dcraw -h (was Re: extragear/graphics/digikam/utilities/imageeditor/editor)

Thorsten Schnebeck thorsten.schnebeck at gmx.net
Wed Dec 14 15:02:48 GMT 2005


> > > What the problem with -h option ? The Raw decoding speed is
> > > decreased without this option ? Please give me a feedback
> > > before to change...
> > >
> > > Gilles
> >
> > Gilles, without the -h option it works as it should, I get
> > the correct picture size. Reading the dcraw help it is clear
> > that -h divides the image by 4. So there is no problem with
> > dcraw, we have to leave out -h.
>
> I'm not agree with you. Why -h option working fine with other
> file formats, and with any CR2 file that you have provide ? I
> suspect a problem in dcraw with CR2 and -h option...
>
> Gilles
 
"-h" comandline option of dcraw correspondends to "half_size=1". 
In dcraw there is this code:

    shrink = half_size && filters;
    iheight = (height + shrink) >> shrink;
    iwidth  = (width  + shrink) >> shrink;
    image = calloc (iheight*iwidth*sizeof *image + meta_length, 
1);
    merror (image, "main()");
    meta_data = (char *) (image + iheight*iwidth);

So, based on "filters" it seems to be possible, that one format 
shrinks and another does not shrink. I tested cr2 and x3f (BTW 
the latter is not part of digiKams default supported raw format 
extentions nor is any raw format part of the "Image Import..." 
filter dialog):

x3f results to a full-sized image, cr2 to a half- (better 
quad-)sized image when using "dcraw -h"

"filters" set or unset seems to be a result of 
int CLASS identify (int will_decode)

I will forward this mail to the CRW-Decode ML and maybe 
someone can help and explain, when -h shrinks, when it does not 
shrink and what is this option all about. Can "-h" be used to 
load and decode a RAW format in best quality?

Bye

  Thorsten

P.S.
cr2: Canon RAW
x3f: Foveon RAW

> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel




More information about the Digikam-devel mailing list