Could you please apply the patch shown above (print T.tformat in simple_dcraw -e) and check is tformat is really not 1.
Just change the line:
printf("Writing thumbnail file......
to
printf("Writing thumbnail file %s with format: %d\n", thumbfn,T.tformat);
I pulled the master branch, and "git branch" returned "* master". ./version.sh returned 0.19.0-Beta1
I ran ./mkdist.sh (since there is no configure file). I could see that mkdist.sh called wget and wiped out dcraw.c in the dcraw directory with an older version.
After that, I just ran "./configure". I removed -DUSE_JASPER and added -DUSER_ZLIB.
I then performed "make" and "sudo make install".
The .h files are up-to-date. And I'm still seeing LIBRAW_THUMBNAIL_UNKNOWN
Dear Sir:
We tried to reproduce the problem:
- fetched LibRaw/master from github to make sure
- compiled it with MSVC 2013.
- selected some sample files (Sony A7-3, Fuji X-H1):
fuji_xh1_compressed.RAF is a Fujifilm X-H1 image.
fuji_xh1_uncompressed.RAF is a Fujifilm X-H1 image.
_DSC0010.ARW is a Sony ILCE-7M3 image.
UNCOMPRESSED_14bit.ARW is a Sony ILCE-7M3 image.
Than I've modified simple_dcraw.cpp sample to print (numerical) format ID:
I just compiled the master branch, there is no pink/purple cast on that ARW file.
I guess something must be different in handling ARW files between these two branches?
Edit:
If the ARW file is decoded in full resolution, the pink/purple cast is still there. It is only when decoded in half size combined with the master branch, then the image looks fine.
We publish master branch twice a year from our internal repository to github. Publushed version is tested in our end-user software (FastRawViewer, RawDigger), so 'decoder part' usually is reliable (and we do not change postprocessing part much for years, because dcraw_process() is only a sample)
this is abandoned code: it was contributed to LibRaw many years ago, it is not supported by contributor(s), and we (LibRaw team) also unable to support it.
Revisited it: Docs come with LibRaw tarball/zip are already up-to date. This site documentation page is updated with tarball docs (without any check is it up to date or not)
yes, -demosaic-pack-GPLn contributed code is complete decoupled from main LibRaw, so no support for it in main code trunc (one need to use callback inteface for that and/or subclass LibRaw to use this code).
We'll revisit documentation for 'hanging' pieces one more time before 0.19.3 release.
I've noticed that LibRaw decodes 6022 x 4020 Pixels from the sensors used in Canons EOS 80D, 200D, 77D etc.,
while DNG-Converter (and original DCRAW) decode 6024 x 4022 Pixels.
Can this be changed?
I ask because calibration images (darks, flats, bias, bad-pixel maps) for astro imaging cannot be used cross wise.
Using your make procedure works!
But the document on this site says run ./configure, and since there is no configure file, I run mkdist.sh and it does create one.
Could you please update the build procedure?
Many thanks.
And system info:
It just works as expected:
$ git clone https://github.com/LibRaw/LibRaw.git LibRaw-github $ cd LibRaw-github # edited simple_dcraw to get format printed: $ git diff diff --git a/samples/simple_dcraw.cpp b/samples/simple_dcraw.cpp index 47c329a..78f14f0 100644 --- a/samples/simple_dcraw.cpp +++ b/samples/simple_dcraw.cpp @@ -145,7 +145,7 @@ int main(int ac, char *av[]) T.tformat == LIBRAW_THUMBNAIL_JPEG ? "thumb.jpg" : "thumb.ppm"); if (verbose) - printf("Writing thumbnail file %s\n", thumbfn); + printf("Writing thumbnail file %s format: %d\n", thumbfn, T.tformat); if (LIBRAW_SUCCESS != (ret = RawProcessor.dcraw_thumb_writer(thumbfn))) { fprintf(stderr, "Cannot write %s: %s\n", thumbfn, libraw_strerror(ret)); # no autotools here, so just: $ make -f Makefile.dist # identify files: $ ./bin/raw-identify ~/smpl/* /Users/lexa/smpl/UNCOMPRESSED_14bit.ARW is a Sony ILCE-7M3 image. /Users/lexa/smpl/_DSC0010.ARW is a Sony ILCE-7M3 image. /Users/lexa/smpl/fuji_xh1_compressed.RAF is a Fujifilm X-H1 image. /Users/lexa/smpl/fuji_xh1_uncompressed.RAF is a Fujifilm X-H1 image. # run simple_dcraw -e -v: $ ./bin/simple_dcraw -v -e ~/smpl/* Processing file /Users/lexa/smpl/UNCOMPRESSED_14bit.ARW Writing thumbnail file /Users/lexa/smpl/UNCOMPRESSED_14bit.ARW.thumb.jpg format: 1 Processing file /Users/lexa/smpl/_DSC0010.ARW Writing thumbnail file /Users/lexa/smpl/_DSC0010.ARW.thumb.jpg format: 1 Processing file /Users/lexa/smpl/fuji_xh1_compressed.RAF Writing thumbnail file /Users/lexa/smpl/fuji_xh1_compressed.RAF.thumb.jpg format: 1 Processing file /Users/lexa/smpl/fuji_xh1_uncompressed.RAF Writing thumbnail file /Users/lexa/smpl/fuji_xh1_uncompressed.RAF.thumb.jpg format: 1Just tried that, simple_dcraw returns 0 for Sony A73 ARW file...
Could you check it under macOS yourself?
Edit: simple_dcraw -L does return Sony A7 III as support camera
Could you please apply the patch shown above (print T.tformat in simple_dcraw -e) and check is tformat is really not 1.
Just change the line:
printf("Writing thumbnail file......
to
printf("Writing thumbnail file %s with format: %d\n", thumbfn,T.tformat);
I'm running macOS 10.13.6.
I pulled the master branch, and "git branch" returned "* master". ./version.sh returned 0.19.0-Beta1
I ran ./mkdist.sh (since there is no configure file). I could see that mkdist.sh called wget and wiped out dcraw.c in the dcraw directory with an older version.
After that, I just ran "./configure". I removed -DUSE_JASPER and added -DUSER_ZLIB.
I then performed "make" and "sudo make install".
The .h files are up-to-date. And I'm still seeing LIBRAW_THUMBNAIL_UNKNOWN
No idea why at this point.
Dear Sir:
We tried to reproduce the problem:
- fetched LibRaw/master from github to make sure
- compiled it with MSVC 2013.
- selected some sample files (Sony A7-3, Fuji X-H1):
raw-identify.exe fuji_xh1_compressed.RAF fuji_xh1_uncompressed.RAF _DSC0010.ARW UNCOMPRESSED_14bit.ARW:
fuji_xh1_compressed.RAF is a Fujifilm X-H1 image.
fuji_xh1_uncompressed.RAF is a Fujifilm X-H1 image.
_DSC0010.ARW is a Sony ILCE-7M3 image.
UNCOMPRESSED_14bit.ARW is a Sony ILCE-7M3 image.
Than I've modified simple_dcraw.cpp sample to print (numerical) format ID:
diff --git a/samples/simple_dcraw.cpp b/samples/simple_dcraw.cpp
index 47c329a..b079a9f 100644
--- a/samples/simple_dcraw.cpp
+++ b/samples/simple_dcraw.cpp
@@ -145,7 +145,7 @@ int main(int ac, char *av[])
T.tformat == LIBRAW_THUMBNAIL_JPEG ? "thumb.jpg" : "thumb.ppm");
if (verbose)
- printf("Writing thumbnail file %s\n", thumbfn);
+ printf("Writing thumbnail file %s with format: %d\n", thumbfn,T.tformat);
if (LIBRAW_SUCCESS != (ret = RawProcessor.dcraw_thumb_writer(thumbfn)))
{
fprintf(stderr, "Cannot write %s: %s\n", thumbfn, libraw_strerror(ret));
And here is the results:
simple_dcraw.exe -v -e _DSC0010.ARW fuji_xh1_compressed.RAF fuji_xh1_uncompressed.RAF UNCOMPRESSED_14bit.ARW:
Processing file _DSC0010.ARW
Writing thumbnail file _DSC0010.ARW.thumb.jpg with format: 1
Processing file fuji_xh1_compressed.RAF
Writing thumbnail file fuji_xh1_compressed.RAF.thumb.jpg with format: 1
Processing file fuji_xh1_uncompressed.RAF
Writing thumbnail file fuji_xh1_uncompressed.RAF.thumb.jpg with format: 1
Processing file UNCOMPRESSED_14bit.ARW
Writing thumbnail file UNCOMPRESSED_14bit.ARW.thumb.jpg with format: 1
From libraw_const.h:
enum LibRaw_thumbnail_formats
{
LIBRAW_THUMBNAIL_UNKNOWN = 0,
LIBRAW_THUMBNAIL_JPEG = 1,
So, all thumbnails format reported is LIBRAW_THUMBNAIL_JPEG
Please make sure you compile the library and your app with same libraw.h
I just compiled the master branch, there is no pink/purple cast on that ARW file.
I guess something must be different in handling ARW files between these two branches?
Edit:
If the ARW file is decoded in full resolution, the pink/purple cast is still there. It is only when decoded in half size combined with the master branch, then the image looks fine.
Could not reproduce with dcraw_emu.exe -h -T -w -aexpo 2.3 0 -W
Will try to reproduce on Mac, although it should not be platform specific
Below is the code I used for processing that Sory A73 ARW file with the pink/purple cast.
Am I doing something wrong?
LibRaw *rawProcessor = new LibRaw; CIImage *ciImage = nil; // Set up image processing parameters rawProcessor->imgdata.params.half_size = 1; rawProcessor->imgdata.params.user_qual = 0; rawProcessor->imgdata.params.use_camera_wb = 1; rawProcessor->imgdata.params.use_auto_wb = 0; rawProcessor->imgdata.params.no_auto_bright = 1; rawProcessor->imgdata.params.exp_correc = 1; rawProcessor->imgdata.params.exp_shift = 2.3; rawProcessor->imgdata.params.use_rawspeed = 0; rawProcessor->imgdata.params.user_flip = 0; // Do not rotate image, let the caller do it if (rawProcessor->open_file([filePath UTF8String]) == LIBRAW_SUCCESS) { int ret = rawProcessor->unpack(); if (ret == LIBRAW_SUCCESS) { ret = rawProcessor->dcraw_process(); if (ret == LIBRAW_SUCCESS) { libraw_processed_image_t *imageData = rawProcessor->dcraw_make_mem_image(&ret); rawProcessor->recycle(); // make data provider from buffer CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, imageData->data, imageData->data_size, NULL); // set up for CGImage creation int bitsPerComponent = imageData->bits; int bitsPerPixel = imageData->bits * imageData->colors; int bytesPerRow = bitsPerPixel / 8 * imageData->width; int width = imageData->width; int height = imageData->height; CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); CGImageRef imageRef = CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, kCGBitmapByteOrderDefault, provider, NULL, NO, kCGRenderingIntentDefault); ciImage = [CIImage imageWithCGImage:imageRef]; // Free memory CFRelease(colorSpaceRef); CFRelease(imageRef); CFRelease(provider); LibRaw::dcraw_clear_mem(imageData); // Auto adjust image NSDictionary *options = @{ CIDetectorImageOrientation : [NSNumber numberWithInt:1], kCIImageAutoAdjustRedEye : [NSNumber numberWithBool:NO]}; NSArray *adjustments = [ciImage autoAdjustmentFiltersWithOptions:options]; for (CIFilter *filter in adjustments) { // Do not apply tone curve, as it can make the contrast too high if ([[filter name] isNotEqualTo:@"CIToneCurve"]) { [filter setValue:ciImage forKey:kCIInputImageKey]; ciImage = filter.outputImage; } } } } } delete rawProcessor; return ciImage;We publish master branch twice a year from our internal repository to github. Publushed version is tested in our end-user software (FastRawViewer, RawDigger), so 'decoder part' usually is reliable (and we do not change postprocessing part much for years, because dcraw_process() is only a sample)
I do not see any problems with LibRaw 0.19.2 and this file (tested with dcraw_emu [-w] from 0.19.2/Windows-64 binary)
Here is the file:
https://www.dropbox.com/s/rzb3qrjwafayvlz/DSC06132.ARW.zip?dl=0
Sorry for the silly question: how reliable is the master (development) branch?
And followup: it is hard to answer some raw-related questions without file samples.
A7-III is not supported in LibRaw 0.19
You may consider master (development) branch: https://github.com/LibRaw/LibRaw/
GPL2 code: https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2
GPL3 code: https://github.com/LibRaw/LibRaw-demosaic-pack-GPL3
this is abandoned code: it was contributed to LibRaw many years ago, it is not supported by contributor(s), and we (LibRaw team) also unable to support it.
Thanks! :)
Could you elaborate on the "-demosaic-pack-GPLn contributed code"? I mean, where can I find it?
Revisited it: Docs come with LibRaw tarball/zip are already up-to date. This site documentation page is updated with tarball docs (without any check is it up to date or not)
yes, -demosaic-pack-GPLn contributed code is complete decoupled from main LibRaw, so no support for it in main code trunc (one need to use callback inteface for that and/or subclass LibRaw to use this code).
We'll revisit documentation for 'hanging' pieces one more time before 0.19.3 release.
Note: same applies to the wf_debanding option
I have RAWs available from the 80D and the 200D:
80D, LibRaw: 6022 x 4020
80D, DCRAW: 6024 x 4022, 2 more cols on the left side, 2 extra rows at the top
80D, DNG-Converter: Same as DCRAW
200D, LibRaw: 6022 x 4020
200D, DCRAW: 6024 x 4020, 2 more cols on the left side of the image
200D, DNG-Converter: Same as DCRAW
Strange that the sizes are equal in DNG-Converter and DCRAW, but different for the two cameras.
Could you please specify what need to be fixed: left/top margin(s), or visible area only?
Hi,
I've noticed that LibRaw decodes 6022 x 4020 Pixels from the sensors used in Canons EOS 80D, 200D, 77D etc.,
while DNG-Converter (and original DCRAW) decode 6024 x 4022 Pixels.
Can this be changed?
I ask because calibration images (darks, flats, bias, bad-pixel maps) for astro imaging cannot be used cross wise.
Greetings, Erwin
Thank you very much!
Pages