tmpkus / rtviewer

Automatically exported from code.google.com/p/rtviewer
0 stars 0 forks source link

nth_size_demo() flips red and blue channels #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm not sure if this is strictly a demo function or something that will be used 
in RT5, but it causes red and blue channels to be swapped for my Nikon .NEF 
files and grubernd's Panasonic files.

FC() as defined in dcraw.cc produces an integer represending a channel: 0->??, 
1->green, 2->??. nth_size_demo() assumes 0->red, 2->blue, but if I swap those 
the image looks normal again.

in rtengine/rawtools/demosaic_jrp.cc line 277: change "0" to "2"

Original issue reported on code.google.com by sankeytms on 14 Jul 2012 at 8:02

GoogleCodeExporter commented 9 years ago
Actually, on line 271:

- int color=FC(tx, ty);
+ int color=FC(ty, tx);

becase it should be FC(row, col), not FC(col, row). line 277 should remain "0".

Original comment by sankeytms on 15 Jul 2012 at 7:49

GoogleCodeExporter commented 9 years ago
corrected in latest commit.

Original comment by janrinze on 19 Jul 2012 at 5:09

GoogleCodeExporter commented 9 years ago

Original comment by janrinze on 19 Jul 2012 at 5:10