Recent comments

Reply to: Always getting bayer pattern   7 years 10 months ago

I tried mem-image.cpp (from terminal writing to ppm) and it worked, which means it probably is an issue when converting to Java. Byte is signed because all java data types are signed however, when casting to an int you can get the unsigned value by using & 0xFF on the byte. If I do this, or just use an int[] instead of a byte[], I lose the yellow color (new image).

Reply to: Always getting bayer pattern   7 years 10 months ago

BTW, is byte type signed or unsigned?

Your image sample is not bayer patten, but something strange (in bayer pattern you'll see image, may be with wrong colors or reduced brigtness, but image subject will be visible).

Most likely, this is signed/unsigned conversion problem, or wrong row stride.

Use samples/mem-image.cpp as an example of dcraw_make_mem_image() call, make sure this example can process your DNG, than modify this code for your needs.

Reply to: Always getting bayer pattern   7 years 10 months ago

The following code creates 32 bit ARGB:

public static Bitmap createFromColorChannels(byte[] channels, int width, int height) {
        int[] color = new int[channels.length / 3];
 
        for (int i = 0; i < color.length; i++) {
            color[i] = Color.rgb(channels[i], channels[i + 1], channels[i + 2]);
        }
 
        ...
Reply to: Always getting bayer pattern   7 years 10 months ago

dcraw_make_mem_image() creates 24-bit RGB, not 32-bit ARGB

Reply to: Infinite loop in jpeg_start method   7 years 10 months ago
Ok.

Ok.
The FreeImage source code contains the old version without the fix (0.17.a1). I will include only the fix in our code.
Thanks.

Reply to: Infinite loop in jpeg_start method   7 years 10 months ago

Also, your patch will read additional byte via f = getc(ifp);
I do not see any attempt to add this byte back to the input stream. Most likely, your code does not decode correct data right.

Reply to: Infinite loop in jpeg_start method   7 years 10 months ago

Actual LibRaw already contains this check and additional loop count check

  memset (jh, 0, sizeof *jh);
  jh->restart = INT_MAX;
  fread (data, 2, 1, ifp);
  if (data[1] != 0xd8) return 0;
  do {
this line ==>     if(feof(ifp)) return 0;
and this line ==>    if(cnt++ > 1024) return 0; // 1024 tags limit
Reply to: LibRaw 0.18-201604   7 years 10 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   7 years 10 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   7 years 10 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?   7 years 10 months ago

Could you please provide raw file sample to check?

Reply to: RGB_image = Get_RGB_Image(file)   7 years 10 months ago

Use simple_dcraw.cpp sample as an example code

Reply to: RGB_image = Get_RGB_Image(file)   7 years 10 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   7 years 11 months ago

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

Reply to: Extracting tags from libraw_gps_info_t   7 years 11 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   7 years 11 months ago

I do not see EXIF GPS tags in this file.

Reply to: Extracting tags from libraw_gps_info_t   7 years 11 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   7 years 11 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   7 years 11 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   7 years 11 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   7 years 11 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   7 years 11 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   7 years 11 months ago

Could you please share sample file for analyze?

Reply to: Please sketch the overview of color spaces.   7 years 11 months ago

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

Pages