Recent comments

Reply to: Copy memory buffer to BitmapData   11 years 2 months ago

Thanks for your quick reply, but even though I changed the 'step' to image->width*3, it still gives me an error at the line of copy_mem_image(&bmpPtr, step, 0). The error is: Unhandled exception at 0x77ea15de in Raw_Tool.exe: 0xC0000005: Access violation. Could you tell me why?

Reply to: Copy memory buffer to BitmapData   11 years 2 months ago

Should the 'step', which is also called stride for bitmap, has to be a multiple of 4?? If width*3 is not multiple of 4, would it gives an error when creating an bitmap object??

Reply to: Copy memory buffer to BitmapData   11 years 2 months ago

copy_mem_image() copies image data without alpha channel (4th byte).

If you need alpha channel in your bitmap, you need to use per-pixel copy in a loop.

Reply to: Copy memory buffer to BitmapData   11 years 2 months ago

Your 'step' calculation is wrong. copy_mem_image accept step in bytes, for 8-bit images it is width*3.
You calculate step as width*(24/8)*3 so width*9.

Reply to: Recycle Error   11 years 2 months ago

Could you please provide more info (stack trace of crash, or test program to reproduce or so)?

Reply to: problems with Nikon Coolscan 4000 .nef file   11 years 2 months ago

Thanks again for your time. I found the camera list ;-)

Reply to: problems with Nikon Coolscan 4000 .nef file   11 years 2 months ago

Thanks for file. Downloaded it, you may remove the file from Dropbox.

The list of supported cameras is updated very frequently, so no list on website. There is API call LibRaw::cameraList().

Reply to: problems with Nikon Coolscan 4000 .nef file   11 years 2 months ago

Thank for your answer!

Is there a page where i can see all supported cameras? Maybe i just didn't find it so far...

If you like have a look at it you should find an example .nef file (coolscan4000.zip) within the next minutes at my Dropbox:
https://www.dropbox.com/sh/oxj1kd92vb62igf/EAFfqdqQ0c/Bilder

Thanks again!

Reply to: Possible bug: Temporary files left on filesystem after decoding an .SRW file (0.14.4)   11 years 2 months ago

Sorry, no 0.14.4 on hand (this is more-than-one-year version).

I've made a quick check: downloaded LibRaw 0.14.7 Win32 binary from http://www.libraw.org/download#stable
and use dcraw_emu.exe for decoding Samsung NX-100 SRW file.

No additional files appear, only expected .tiff or .ppm one.

Reply to: Possible bug: Temporary files left on filesystem after decoding an .SRW file (0.14.4)   11 years 2 months ago

In this case, I'm using Shotwell 0.13.1+trunk, and we're using LibRaw version 0.14.4.

Reply to: problems with Nikon Coolscan 4000 .nef file   11 years 2 months ago

Coolscan 4000 is not in the list of supported cameras :)

Generally, files from Scanners should be 3-component, not bayer-pattern. So, camera-targeted NEF-handling code will not work with scanner files because only one per-pixel component is expected.

BTW, if you provide any sample of Coolscan .NEF output, it will be analyzed in depth. May be, it is easy to add support for these files to LibRaw

Reply to: Possible bug: Temporary files left on filesystem after decoding an .SRW file (0.14.4)   11 years 2 months ago

Could you please provide more details about your working environment:
- what application do you use for decode files?
- what LibRaw version do you use?

Reply to: Instant Display   11 years 2 months ago

I'm not OpenCV specialist, so I cannot help with OpenCV/System.drawing errors.

Reply to: Instant Display   11 years 2 months ago

I finally can display the image using LibRaw together with OpenCV. However, I found that it is okay to display .CR2 files of 5D Mark III but .CR2 files of 5D Mark II. It gives a error:
"An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll
Additional information: Parameter is not valid."
Is there any difference between the .CR2 files of 5D Mark II and Mark III?

My code is:

int check = Processor1->dcraw_process();
//process the image into memory buffer
libraw_processed_image_t *image = Processor1->dcraw_make_mem_image(&check);

//create a Mat object by data obtained from LibRaw
cv::Mat cvImage(cv::Size(image->width, image->height), CV_8UC3, image->data, cv::Mat::AUTO_STEP);

cv::cvtColor(cvImage, cvImage, CV_RGB2BGR); //Convert RGB to BGR

IntPtr ptr(cvImage.ptr()); //create a pointer based on the Mat object image

//Error occurs in the following statement, the last line with 'ptr'
Bitmap^ b = gcnew Bitmap(cvImage.cols,
cvImage.rows,
cvImage.step,
PixelFormat::Format24bppRgb,
ptr); //bitmap object of the image

Reply to: How to make LibRaw objects global?   11 years 3 months ago

You may use
LibRaw* processor1;
and than use
processor1= new LibRaw;
in the constructor of your object

Reply to: dcraw_make_mem_thumb   11 years 3 months ago

dcraw produces *file*, not in-memory object.
Dcraw file output is emulated in dcraw_emu sample

Reply to: dcraw_make_mem_thumb   11 years 3 months ago

OK, I see, so that aspect of dcraw output is not emulated and that's intentional?

Reply to: dcraw_make_mem_thumb   11 years 3 months ago

The PPM header is added by dcraw on file write.

Reply to: dcraw_make_mem_thumb   11 years 3 months ago

I'm trying to open phase one images which have PPM thumbnails. When I extract the thumbnail with dcraw I get PPM. When I use libraw I seem to get just the RGB data, without the PPM header. Am I doing something wrong or is it getting stripped?

Reply to: Instant Display   11 years 3 months ago

LibRaw does not contain any drawing code. You need to implement it yourself.

Histograms are calculated for auto-brightness code, but these histograms are not intended to use in external application:
- histograms calculated before white balance and brightness applied
- the actual pixel value is divided by 8 to make histograms compact.

Reply to: RAW data processing   11 years 3 months ago

Yes, you may simple pack linear 16-bit data (bayer pattern or after demosaic) into DNG

Reply to: RAW data processing   11 years 3 months ago

Is the content of the DNG payload a 16bit/sample stream? Or the unpacked data must be packed somehow after the processing?

Reply to: dcraw_make_mem_thumb   11 years 3 months ago

Could you please specify camera model you use? In most cases thumbnails are JPEG, the RGB case is very rare.
It is possible that somewhat is broken, so I should test with your sample.

Reply to: dcraw_make_mem_thumb   11 years 3 months ago

dcraw_make_mem_thumb() return thumbnail 'as is', no processing is done.
Most RAW formats stores thumbnail in JPEG format.

Reply to: RAW data processing   11 years 3 months ago

The only common way to write RAW files is to write DNG format ones. Adobe DNG SDK can be used for this task.

Pages