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

dcoffin at cybercom.net dcoffin at cybercom.net
Wed Dec 14 23:59:47 GMT 2005


Hi Thorsten,

     "filters" being non-zero means two things.
First, that the image sensor is covered by a mosaic
of multi-colored filters, and second, that the camera
has not concealed this mosaic by interpolating it.

     "filters" is zero for all Foveon cameras, all
monochrome cameras, the Leaf Volare, and all Kodak
DCR images shot at less than full size.

     Any 2x2 block of a filter mosaic contains all
colors.  "-h" condenses that block into one pixel.
For images without filter mosaics, "-h" does nothing.

				Dave Coffin  12/14/2005

On Wed, Dec 14, 2005 at 04:02:48PM +0100, Thorsten Schnebeck wrote:
> > > > 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
> 
> 
> _______________________________________________
> crw-decode mailing list
> crw-decode at wonderland.org
> https://mail.wonderland.org/mailman/listinfo/wonderland.org-crw-decode



More information about the Digikam-devel mailing list