Recent comments

Reply to: Image data does not match   7 months 2 days ago

Yes, I know, but even in 8 bit mode it did not match. The values seem random to me.

You mean from the samples page? no, not yet. I'll try this and copy this code.

Regards.

Reply to: Image data does not match   7 months 2 days ago

And also:
data field in libraw_processed_image_t is 'unsigned char', while you're using 16-bit output.
So you dump 8-bit wise pieces, not real 16-bit values.

Reply to: Image data does not match   7 months 2 days ago

Let's start from the beginning.
Have you tried dcraw_emu sample? If so, are results 'expected' or not?
Same question with mem_image sample.....

Reply to: Image data does not match   7 months 2 days ago

Thanks for your fast response.

Well, I loaded the image as shown in my code. I know, PS/LR have some hidden adjustments.
The first 100x100 pixel in the image, listed in the xls, are supposed to be some kind of green. Leaves and treetops.

But all data listed is not near the RGB values for green. And furthermore these values are supposed be in a neare range of greens. But all listed data seem to jump all over the place.
I tried both, 8 and 16 bits for the output, and other different modes in the params. But nothing worked for me.

Yes, I know that the rawdata has a larger field then the final RGB values. This is just some kind of "test" to see a reason for that jumping values.

Regards.

Reply to: Dependency for distriubtion   7 months 2 days ago

You can always double-check what your libraw.dll links against at runtime using the Dependency Walker: https://www.dependencywalker.com/

Reply to: Postprocessing like raw viewers   7 months 2 days ago

dcraw.c's postprocessing (LibRaw::dcraw_process is derived from it) do not have contrast controls.

Reply to: Postprocessing like raw viewers   7 months 2 days ago

Thanks for the quick reply, Alex.

The fixed vs variable contrast indeed seems to be the major contributing factor to the difference. I'm not familiar with that terminology; could you explain what variable contrast mode does? Can LibRaw emulate it?

Reply to: Dependency for distriubtion   7 months 2 days ago

I think you need to build LibRaw with
-DUSE_JPEG (to handle jpeg-compressed files, like 'fast load DNG' and some old Kodaks)
-DUSE_ZLIB (to handle deflate-compressed floating point DNG files)

These settings will handle "99%" of today RAW files.
So libjpeg and libz to be distributed with libraw(.dll)

Reply to: Postprocessing like raw viewers   7 months 2 days ago

LibRaw::dcraw_process output is close (enough) to FastRawViewer in fixed contrast + auto ETTR mode.

Reply to: Image data does not match   7 months 2 days ago

Could you please ask more specific question?

imgdata.image is 16 bit/linear
image->data is 16 bit (output_bps set to 16) and gamma corrected (as far as I could understand from your code)
Both imgdata.image and image.data are cropped (by imgdata.sizes top/left_margin and width/height), while imgdata.rawimage.* is not cropped.
Also, imgrata.rawimage contains unaltered raw values, black level not subtracted

Reply to: Access RGB values from libraw_processed_image_t   7 months 3 days ago

I have now released the lib for general use under https://github.com/lanthale/librawfx. Thank you allot for your help with the compilation and accessing the raw RGB data.

Reply to: LibRaw 0.20 supported cameras   7 months 4 days ago

In the next public snapshot.

Reply to: LibRaw 0.20 supported cameras   7 months 4 days ago

When do you anticipate supporting Sony A1 RAW?

Thanks!

Reply to: Access RGB values from libraw_processed_image_t   7 months 1 week ago

Thank you for the hint. I managed now to get the data but actually the resulted image is greyscale and cut off but the root cause could be something different. I will post some code here after it works to help people using the java foreign memory api.

Reply to: Access RGB values from libraw_processed_image_t   7 months 1 week ago

&data[0] is pointer to start of data
Actual data is either 1 or 2 bytes per pixel (depends on imgdata.params.output_bps), no extra padding.

See mem-image.cpp sample, it covers all/most cases (1/3 channels, 8 and 16 bits)

Reply to: Building shared library on all OS's   7 months 2 weeks ago

Now I have reinstalled the whole toolchain and now it is working.

Thank you for the hint.

Reply to: Building shared library on all OS's   7 months 2 weeks ago

It looks like you have incomplete/broken autotools installation

Reply to: Building shared library on all OS's   7 months 2 weeks ago

I have now tried the osx binary.zip file but I does not build at all (./configure was fine, but make had issues)
libraw-osx % make
cd . && /bin/sh automake --foreign
/usr/local/bin/automake: line 23: package: command not found
/usr/local/bin/automake: line 25: use: command not found
/usr/local/bin/automake: line 26: use: command not found
/usr/local/bin/automake: line 27: use: command not found
/usr/local/bin/automake: line 29: BEGIN: command not found
/usr/local/bin/automake: automake: line 31: syntax error near unexpected token `@INC,'
/usr/local/bin/automake: automake: line 31: ` unshift (@INC, '/usr/local/Cellar/automake/1.16.3/share/automake-1.16')'
make: *** [Makefile.in] Error 1

Then I tried a github checkout:
This time I could build with configure and make but the result is always under the lib folder "libraw.a" instat of the "libraw.dylib".

Then I tried the same on Ubuntu and ended up as well with "libraw.a".

How can I get the system to build a shared lib ?

Reply to: Building shared library on all OS's   7 months 2 weeks ago

Thank you for the hint. I will download in the evening and will try to use the configure install option and report back how it worked out.

Reply to: Building shared library on all OS's   7 months 2 weeks ago

Also you can use LibRaw 0.20 (see Download section on this site) with pre-generated configure stuff.

Reply to: Building shared library on all OS's   7 months 2 weeks ago

> But I have to copy Makefile.dist to Makefile.in.

This will not work.
Please use autoreconf --install in full scale.

Reply to: Building shared library on all OS's   7 months 2 weeks ago

Yes but got some warnings. But I have to copy Makefile.dist to Makefile.in.

After that change configure runs to the end. Before it ends with error message that Makefile.in cannot be found.

Reply to: Building shared library on all OS's   7 months 2 weeks ago

Have you tried autoreconf, than configure?

Reply to: Building shared library on all OS's   7 months 2 weeks ago

The build environment I am using is OSX 10.15 with xcode and autoreconf installed.

For Windows I could build the dll. But under osx/linux I am getting only the static lib.

Reply to: Building shared library on all OS's   7 months 2 weeks ago

shared lib/dll/dylib creation is OS specific, it is not easy to create it via single change of Makefile.dist.

If your build environment(s) has GNU autotools/automake installed you could create ./configure script via

autoreconf --install

Than use ./configure && make.

For Windows, dll is created by using Makefile.msvc

Pages