I am writing a GUI interface with C++ and I would like to make the LibRaw processor (i.e. LibRaw Processor = LibRaw();) to be global so that I can use it in any functions and pass it between other forms.
I've tried:
private:
LibRaw Processor1;
it turns out "error C4368: cannot define 'Processor1' as a member of managed 'RAW_GUI::Form1': mixed types are not supported"
And I tried to make it as a pointer:
private:
LibRaw *Processor1;
However I cannot run Processor1 = LibRaw(); as it cannot convert LibRaw * to LibRaw.
I wonder whether there is a way using LibRAW to process the RAW data (I think I read thru the manual how to do that) and to store that back in the RAW file (a NEF, for instance). To simplify, is it possible with LibRAW to *modify* a RAW file, instead than unpacking it for storage in a different format.
All the best for 2013, still 2 hours to go in Italy :)
David
You note that this will return either JPEG or RGB. Why not leave this in PPM format like dcraw_thumb_writer?
Additionally there's a typo in the documentation as it states that the type will be LIBRAW_IMAGE_JPEG, regardless. I checked the code and it appears to correctly type LIBRAW_IMAGE_BITMAP for RGB output.
It states that the output is either JPEG or RGB bitmap. What is it in the case of a PPM thumb model? The output does not appear to be either a JPEG, bitmap, or PPM.
I've checked the header and it's certainly not PPM.
I've tried loading the buffer into a bitmap in Java and it fails.
I can however dump the PPM thumbnail via dcraw_thumb_writer, so it can be processed.
When i load a raw file (dng, converted via Lightroom from canon cr2), process it and try to save it into jpg, every like 175-200 lines are skipped, so the overall image has less height and the rest is filled with black.
I trying to get correct color after iProcessor.unpack(), but was puzzled by contents of libraw_colordata_t structure. Suppose that I have already done demosaicing but still have color in camera color space. What formulas do I need to use to convert (R,G,B) -> (X,Y,Z)? I tried these without success:
Recent comments