Recent comments

Reply to: [patch] fix dcraw emulation binary   13 years 4 months ago

This is not bug, this is feature. So, no need to fix it

Reply to: [patch] fix build with lcms2   13 years 4 months ago

LibRaw 0.12 is updated too.

Reply to: [patch] fix build with lcms2   13 years 4 months ago

The github/master version is already fixed in another way:
configure checks will set $LIBS
and Makefile.am uses $(LIBS) instead of $(LCMS_LIBS)

This is commit URL: https://github.com/LibRaw/LibRaw/commit/73229a04fb2a44159df3baa8f812b473...

Reply to: link order   13 years 4 months ago

Thanks for report!

The problem was in Makefile.am, the new one is pushed to GitHub/master (i.e. 0.13-alpha branch)

It is only quick fix, the problem will be solved in more general way

Reply to: About LibRaw   13 years 4 months ago

For float data output we need to change entire processing pipeline to floating point.

There are no such plans for LibRaw team: we're open to contributions, but will not spend much own effort on postprocessing phase.

Reply to: About LibRaw   13 years 4 months ago

32bit float data output would be very beneficial.
Export of full scene referred linear data with no clipping from 14bit chips would be great.

We hacked dcraw about a bit to reverse the scaling that's done with full highlight retention to push superbrights back in to the >1 range and export as exr.

I can see a need for that kind of a feature.

Reply to: Usage Examples   13 years 4 months ago

Thanks for your answer.
i used the -fopenmp and compiled flawlessly.

I really appreciate your help.

Reply to: Usage Examples   13 years 4 months ago

You have compiled LibRaw with OpenMP support, but build your application without OpenMP.

You should add -fopenmp to gcc command line when building your app or rebuild LibRaw with ./configure --disable-openmp

Reply to: Usage Examples   13 years 4 months ago

Hi!
Thanks for the answer.

This is what i get from g++ (a little bit long, sorry about that):
-----
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `_ZN6LibRaw15ahd_interpolateEv.omp_fn.0':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:4178: undefined reference to `GOMP_loop_dynamic_start'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:4166: undefined reference to `omp_get_thread_num'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:4178: undefined reference to `GOMP_loop_dynamic_next'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:4192: undefined reference to `GOMP_loop_end'
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `LibRaw::ahd_interpolate()':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:4166: undefined reference to `GOMP_parallel_start'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:4166: undefined reference to `GOMP_parallel_end'
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `_ZN6LibRaw15ppg_interpolateEv.omp_fn.1':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3861: undefined reference to `omp_get_num_threads'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3861: undefined reference to `omp_get_thread_num'
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `_ZN6LibRaw15ppg_interpolateEv.omp_fn.2':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3883: undefined reference to `omp_get_num_threads'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3883: undefined reference to `omp_get_thread_num'
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `_ZN6LibRaw15ppg_interpolateEv.omp_fn.3':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3897: undefined reference to `omp_get_num_threads'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3897: undefined reference to `omp_get_thread_num'
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `LibRaw::ppg_interpolate()':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3858: undefined reference to `GOMP_parallel_start'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3858: undefined reference to `GOMP_parallel_end'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3880: undefined reference to `GOMP_parallel_start'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3880: undefined reference to `GOMP_parallel_end'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3894: undefined reference to `GOMP_parallel_start'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3894: undefined reference to `GOMP_parallel_end'
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `_ZN6LibRaw15wavelet_denoiseEv.omp_fn.4':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3313: undefined reference to `omp_get_num_threads'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3313: undefined reference to `omp_get_thread_num'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3319: undefined reference to `GOMP_barrier'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3326: undefined reference to `GOMP_barrier'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3334: undefined reference to `GOMP_barrier'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3343: undefined reference to `GOMP_barrier'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3355: undefined reference to `GOMP_barrier'
/usr/local/lib/libraw.a(lib_libraw_a-dcraw_common.o): In function `LibRaw::wavelet_denoise()':
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3313: undefined reference to `GOMP_parallel_start'
.../Software/Libraries/LibRaw-0.12.1/internal/dcraw_common.cpp:3313: undefined reference to `GOMP_parallel_end'
collect2: ld returned 1 exit status
-----

I don't really know why the compiler looks for this file, because is not even in the /usr/local/lib or /usr/local/include directories.

I hope this could give you relevant information in order to point me in the right direction.

Thanks in advance!.

Reply to: Usage Examples   13 years 4 months ago

What references are undefined?

Usually, you need math library added to linker command line (-lm switch)

Reply to: Usage Examples   13 years 4 months ago

Thanks for your answer and suggestion.
I'm trying to compile a .cpp file using g++ and linking libraw, but i'm getting "undefined reference" error. This is the instruction that i'm using:

g++ ext-raw-dat.cpp -o extract -I/usr/local/include/libraw -L/usr/local/lib -lraw

can you tell me please what i am doing wrong?, at least please point me in the right direction, i know the solution must be plain simple, but i'm not really an expert and i don't see it.

Thanks in advance.

Reply to: libraw in a DSO plug-in   13 years 4 months ago

Confirmed, the CFLAGS approach works. Even though its needs some manual intervention.
I hope to can make the openSUSE package using this compiler flag. Thanks for the reply.

Reply to: libraw in a DSO plug-in   13 years 4 months ago

LibRaw is specially built as static (not dynamic) library under unix systems because ABI is changed frequently and there is no way to translate ABI of one version into data layout of another one.

However, it is possible to specify CFLAGS/CXXFLAGS/LDFLAGS on ./configure call.

Reply to: Usage Examples   13 years 4 months ago

For many (but not all) RAW formats, you can use this trick:
1) Call LibRaw::open_file()
2) Position to libraw_internal_data.unpacker_data.data_offset
3) Read libraw_internal_data.unpacker_data.data_size bytes

This method will work with Canon CR2, Nikon NEFs and many others.
This method will not work for tiled DNGs

Reply to: Usage Examples   13 years 4 months ago

Hi,
According to the sample code, the option "unprocessed_raw" extracts (mostly) unaltered RAW data including masked pixels data.

Is it possible to extract ALL unprocessed raw data, without the metadata and the thumbnail in order to save it into a new binary file?, can you please point me in the right direction to do this using LibRaw?.

Thanks in advance for your kindly answer.

Reply to: [patch] pkg-config fixes   13 years 4 months ago

Thanks!

To be included into next releases!

Reply to: General questions about inclusion of LibRaw into dlRaw   13 years 4 months ago

I have not a look into dlraw source, so my assumptions are based on your short explanation.

It looks like you have own postprocessing pipeline, different from dcraws. I guess, you may use LibRaw's as RAW reading tool (open_file() and unpack() calls), then switch to own processing pipeline.

Licensing is not a problem: LibRaw is licensed under LGPL ('upgradeable' to your GPL3), demosaic-pack-GPL2 is licensed under GPL2+ (also no problem) and AMaZE is licensed under GPL3, no problem too.

Reply to: crash decoding SIGMA DP1 .X3F image   13 years 5 months ago

Yes, DP1 images are unsupported.

I'm unable to reproduce crash, could you please make your problematic image available somewhere via file sharing service(s) like megaupload or rapidshare?

Reply to: Win32 linking in MinGW   13 years 5 months ago

Thanks,

I'll modify distributed Makefile.mingw with possibility to build thread-safe

Reply to: Win32 linking in MinGW   13 years 5 months ago

Finally, I've buildt it. If somebody else is interested in building the thread-safe library using MinGW, here the Makefile (for v. 0.11.3). It works fine.
Thanks for your help,
Davide
Luminance HDR Developer

--------------------------------------

all: library samples

# OpenMP support
#OPENMP_CFLAGS=-fopenmp
#NO_THREADS=-DLIBRAW_NOTHREADS

# LCMS support
#LCMS_DEF=-DUSE_LCMS -I/usr/local/include
#LCMS_LIB=-L/usr/local/lib -llcms

# Common flags
# WARNING: library order matters
COMMON_LIBS=-lws2_32 -lm ${LCMS_LIB}
CLIBS=-L./lib -lraw_r ${COMMON_LIBS}
CFLAGS=-O3 -I. -w -DLIBRAW_NODLL ${OPENMP_CFLAGS} ${NO_THREADS} -lpthread -D_REENTRANT

DCRAW_LIB_OBJECTS=object/libraw_cxx.o object/libraw_c_api.o object/dcraw_common.o object/dcraw_fileio.o

library: lib/libraw_r.a

samples: bin/raw-identify bin/simple_dcraw bin/dcraw_emu bin/dcraw_half bin/mem_image bin/mem_image bin/unprocessed_raw bin/4channels

install: library
@if [ -d /usr/local/include ] ; then cp -R libraw /usr/local/include/ ; else echo 'no /usr/local/include' ; fi
@if [ -d /usr/local/lib ] ; then cp lib/libraw_r.a /usr/local/lib/ ; else echo 'no /usr/local/lib' ; fi

install-samples: samples
@if [ -d /usr/local/bin ] ; then cp bin/[a-z]* /usr/local/bin/ ; else echo 'no /usr/local/bin' ; fi

# Samples

bin/raw-identify: lib/libraw_r.a samples/raw-identify.cpp
g++ ${LCMS_DEF} ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp ${CLIBS}

bin/unprocessed_raw: lib/libraw_r.a samples/unprocessed_raw.cpp
g++ ${LCMS_DEF} ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp ${CLIBS}

bin/4channels: lib/libraw_r.a samples/4channels.cpp
g++ ${LCMS_DEF} ${CFLAGS} -o bin/4channels samples/4channels.cpp ${CLIBS}

bin/simple_dcraw: lib/libraw_r.a samples/simple_dcraw.cpp
g++ ${LCMS_DEF} ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp ${CLIBS}

bin/mem_image: lib/libraw_r.a samples/mem_image.cpp
g++ ${LCMS_DEF} ${CFLAGS} -o bin/mem_image samples/mem_image.cpp ${CLIBS}

bin/dcraw_half: lib/libraw_r.a object/dcraw_half.o
gcc ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o ${CLIBS} -lstdc++

bin/dcraw_emu: lib/libraw_r.a samples/dcraw_emu.cpp
g++ ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp ${CLIBS}

#Libraries

# Non-threaded library

object/dcraw_common.o: internal/dcraw_common.cpp
g++ -c ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common.o internal/dcraw_common.cpp

object/dcraw_fileio.o: internal/dcraw_fileio.cpp
g++ -c ${LCMS_DEF} ${CFLAGS} -o object/dcraw_fileio.o internal/dcraw_fileio.cpp

object/libraw_cxx.o: src/libraw_cxx.cpp
g++ -c ${LCMS_DEF} ${CFLAGS} -o object/libraw_cxx.o src/libraw_cxx.cpp

object/libraw_c_api.o: src/libraw_c_api.cpp
g++ -c ${LCMS_DEF} ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp

object/dcraw_half.o: samples/dcraw_half.c
gcc -c ${LCMS_DEF} ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c

lib/libraw_r.a: ${DCRAW_LIB_OBJECTS}
-rm -f lib\\libraw_r.a
ar crv lib/libraw_r.a ${DCRAW_LIB_OBJECTS}
ranlib lib/libraw_r.a

# Clean

clean:
rm -f bin\\*.dSYM
rm -f lib\\lib*.a bin\\*.exe object\\*.o

Reply to: Win32 linking in MinGW   13 years 5 months ago

for gcc compiler, -pthread is for generating thread-safe code. At least, it should
- define _REENTRANT, so many #includes will change behaviour
- link with thread-safe C runtime

I'm not sure that MinGW has multi-thread safe runtime.

Reply to: Win32 linking in MinGW   13 years 5 months ago

What does -pthread stays for? My compiler (GCC 4.4.0 on MinGW) says that it is a unrecognized option.

Reply to: Win32 linking in MinGW   13 years 5 months ago

Oh,

MinGW library is compiled without thread-safeness. You may try:

1) Add -pthread to CFLAGS in Makefile.mingw
2) Remove -DLIBRAW_NOTHREADS from all compilation rules.

I've added it to TODO for 0.12-Beta3 too

Reply to: Win32 linking in MinGW   13 years 5 months ago

Unfortunately, the static build made by MinGW (I did it already) of the thread-safe library (libraw_r) gives me exactly the same error during the linking. I'll try with the one included in your link this evening and I'll let you know.

Thanks,
Davide

Reply to: Win32 linking in MinGW   13 years 5 months ago

There are two different Win32 distributions of 0.11:
-Win32, compiled and linked by Visual Studio 2008
-Win32-MinGW - made by MinGW with gcc 4.4

These versions are not compatible.

MinGW version does not contain any .dll, only libraw.a for static linking.

You need either rebuild LibRaw from sources using mingw (mingw32-make -f Makefile.mingw) or download already built -MinGW version.

Direct link to 0.11.3/MinGW: http://www.libraw.org/data/LibRaw-0.11.3-Win32-MinGW.zip

Pages