Recent comments

Reply to: LibRaw 0.18-201604   9 years 2 months ago

No exact timeframe, most likely 'later this year'.

'Release Plan' should be response to user's feature requests, but we do not see these requests.

Reply to: LibRaw 0.18-201604   9 years 2 months ago

...and a release plan will be a plus for this project...

Reply to: Converting 12-bit RAW nef file data into an 8-bit RGB bitmap using LibRaw   9 years 2 months ago

Libraw internal pixel format is always 16-bit unsigned integer.

16->8 bit conversion (and gamma correction) is performed on make_mem_image() stage.

Reply to: Why does dcraw_process make my brownish colors blue?   9 years 2 months ago

Could you please provide raw file sample to check?

Reply to: RGB_image = Get_RGB_Image(file)   9 years 2 months ago

Use simple_dcraw.cpp sample as an example code

Reply to: RGB_image = Get_RGB_Image(file)   9 years 2 months ago

I have the same need as the OP, so I figured I'd comment rather than make a whole new post. How can I get a debayered RGB bitmap out of a RAW nef file?

EDIT: nevermind, I have an unpublished post with my question in it.

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

imgdata.other.parsed_gps.gpsparsed is non-zero if gps data has parsed.

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

Okay, I'll upload another one soon. However how does LibRaw handle these cases? I mean if the tag is absent and I try to access its contents what is the expected result? Or better yet, is there a good way of checking it?

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

I do not see EXIF GPS tags in this file.

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

BTW no message(s) in inbox yet.....

Please use some file sharing service because E-mail providers/servers may limit message size

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

The Raw image i used was also in that project, near the sln file.

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

The only things I need is the RAW file to see is LibRaw correctly parses GPS fiield or not.

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

I sent a project to your email. Please note that checkMetadataValue is written so, that if the value is absent then it should return "Missing", also note that even though it extracts altitude, after failing to extract longref it stops and does nothing with the rest of the file.

Also, I am concerned about other fields in GPS, for instance longitude returns 0s no matter what image I try.

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

Please upload the file somewhere (Dropbox, googledrive, etc) and
- either post a link here
- or send it directly to lexa@libraw.org

altref possible values are 0 or 1: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

I can't find a way to attach a file, but here is a sample code that fails. I an extracting a lot of information so I am putting everything into a stream.

#include "libraw/libraw.h"
#include < iostream >
#include < sstream >

void getGPSinfo(string fileName)
{
LibRaw proc;
FILE *pf;
ostringstream stream;
proc.open_file(fileName);

libraw_gps_info_t GPSInfo = proc.imgdata.other.parsed_gps;

stream << "\"GPSAltitudeRef\"" << "->" << to_string(GPSInfo.altref);

pf = fopen("somePath\\debug.txt", "w");
fprintf(pf, stream.str().c_str());
fclose(pf);
proc.recycle();

}

Reply to: Extracting tags from libraw_gps_info_t   9 years 3 months ago

Could you please share sample file for analyze?

Reply to: Please sketch the overview of color spaces.   9 years 3 months ago

imgdata.color.cam_xyz[] is exactly the same as Adobe DNG ColorMatrix2. It converts from XYZ to camera space.

Reply to: Please sketch the overview of color spaces.   9 years 3 months ago

I can reverse engineer Adobe code, but I still need to know what the cam_xyz matrix exactly converts to. It converts camera space to XYZ. But is that with respect to a reference white or not? If so, which? Hopefully this question makes sense.

Reply to: Please sketch the overview of color spaces.   9 years 3 months ago

cam_mul are in 'camera color space'.

For WB multipliers conversion to/from 'color temperature' please look into Adobe DNG SDK source (or into RawTherapee source), it it shorter way than translating Adobe code into english in this forum thread.

Reply to: Ok...I've downloaded LibRaw...and now what?   9 years 3 months ago

convert_to_rgb operates in linear space (from raw color space to linear output).

Final gamma conversion is done in dcraw_make_mem_image() or in dcraw_ppm_tiff_writer() calls

Reply to: Ok...I've downloaded LibRaw...and now what?   9 years 3 months ago

Good evening Alex. Would you kindly guide me a few steps forward with your suggestion? In dcraw I find the place where different color space is written. If I want to create something like linear to log, where would I change numbers? Where would I found these figures?
Thanks in advance

float out[3], out_cam[3][4];
  double num, inverse[3][3];
  static const double xyzd50_srgb[3][3] =
  { { 0.436083, 0.385083, 0.143055 },
    { 0.222507, 0.716888, 0.060608 },
    { 0.013930, 0.097097, 0.714022 } };
  static const double rgb_rgb[3][3] =
  { { 1,0,0 }, { 0,1,0 }, { 0,0,1 } };
  static const double adobe_rgb[3][3] =
  { { 0.715146, 0.284856, 0.000000 },
    { 0.000000, 1.000000, 0.000000 },
    { 0.000000, 0.041166, 0.958839 } };
  static const double wide_rgb[3][3] =
  { { 0.593087, 0.404710, 0.002206 },
    { 0.095413, 0.843149, 0.061439 },
    { 0.011621, 0.069091, 0.919288 } };
  static const double prophoto_rgb[3][3] =
  { { 0.529317, 0.330092, 0.140588 },
    { 0.098368, 0.873465, 0.028169 },
    { 0.016879, 0.117663, 0.865457 } };
  static const double aces_rgb[3][3] =
  { { 0.432996, 0.375380, 0.189317 },
    { 0.089427, 0.816523, 0.102989 },
    { 0.019165, 0.118150, 0.941914 } };
  static const double (*out_rgb[])[3] =
Reply to: Ok...I've downloaded LibRaw...and now what?   9 years 3 months ago

Thanks a lot for telling. I see what I can come up with here.
Thanks again.
/D

Reply to: Ok...I've downloaded LibRaw...and now what?   9 years 3 months ago

Yes, postprocessing code (after raw data read/unpack) is completely imported from dcraw without much improvement in functions.

Both 1D and 3D luts looks easy to implement assuming you've working code that replaces pixel value in place.

Assuming you're working in linear space in 'camera color', the best place to implement your code is convert_to_rgb_loop() function. It gets linear profile (out_cam[3][4]) that converts from camera space to output rgb. You may replace it with your code.

This function is already 'virtual', so it is very easy to implement any color conversion in derived class.

Reply to: Ok...I've downloaded LibRaw...and now what?   9 years 3 months ago

I see. It was worth a try :). For what it,s worth, the same limitations occur in dcraw so I assume the code is coming from there.
Sorry all questions but do you perhaps know a starting point being able to add 1D and/or 3D luts in dcraw/libraw?

Pages