Recent comments

Reply to: Modify parameters of raw image   9 years 3 months ago

For most (TIFF/EP) raw files, EXIF data is pointed by EXIF (34665) tag

Reply to: Modify parameters of raw image   9 years 3 months ago

Make and model for these files are parsed in other place.

Reply to: Modify parameters of raw image   9 years 3 months ago

Can you tell me the method to find the exif metadata location in Raw files?

Reply to: Modify parameters of raw image   9 years 3 months ago

How about other parameters like "camera model" ,"camera make", like this Exif metadata, how can you read it to the libraw datastructure?

Reply to: Modify parameters of raw image   9 years 3 months ago

This piece of code is related only to foveon images with own (non-EXIF) metadata format

Reply to: Modify parameters of raw image   9 years 3 months ago

Thanks for you reply. And I have another question.when I read the part of source code in libraw_cxx.cpp, the part of source code is :
char name[100], value[100];
utf2char(P[i].name,name);
utf2char(P[i].value,value);
if (!strcmp (name, "ISO"))
imgdata.other.iso_speed = atoi(value);
I am confused with this part of source code. when you developed this libraw library,how can you read "ISO speed" from Raw file to iso_speed variable of libraw?

Reply to: Command Line   9 years 3 months ago

Have not used XCode GUI mode.
To re-build LibRaw from command line, start with OS X tuned version (http://www.libraw.org/data/LibRaw-0.16.2-MacOSX.zip). To rebuild it just use
make -f Makefile.dist
It should works fine

Reply to: Command Line   9 years 3 months ago

Thank you Alex.

Could you possibly explain the steps required to compile those samples? Preferably using xcode?

Also building a command line tool from the modified sample file, how could I do this on a linux system?

I have no experience with working with c++.

I essentially need to extract out the thumbnail from a raw but be able to specify the output directory of the file.

Since I am watching the dir, when any new files are added I process them, but do not want to add the thumbnail to the same directory for several reasons. dcraw does not seem to have a flag to specify an output directory when extracting the thumbnail.

It also is creating strange images when we apply the color profile.

I would love to be able to dig into libraw and start creating dedicated command line tools for our processing, if you could direct me in the right direction to things I would need to learn and tools I would use.

Also, since this is going to run on raspberry pi, would you be able to recommend a build process that would work for a device like that?

I know this may be a lot to ask. Sorry for the newbie questions. Any help is greatly appreciated.

Thank you!

Reply to: Command Line   9 years 3 months ago

LibRaw's dcraw_emu intended to be used instead of dcraw in most (but not all) cases. If you need some specific command-line tool, start with simple_dcraw sample and modify it at your taste.

Reply to: LibRaw 0.17-beta3 precompiled dll with extra demosaics for 3d LUT Creator   9 years 3 months ago

Thank you for this resource, as always. - Kirk

Reply to: About LibRaw   9 years 3 months ago

Unfortunately, I know nothing about matlab extensions.

Reply to: About LibRaw   9 years 3 months ago

I was able to associate the libraw.dll and libraw.h with matlab using loadlibrary function. It builds a function table and I am able to open a raw file and so on. However, I haven't gotten to the point where I can open the bayer pixel data. It has something to do with how pointers are used. In any case, I wanted to let you know it is possible to interface with Matlab.

Reply to: Raw image to JPEG   9 years 4 months ago

Sorry for delayed answer (all forum posts are pre-moderated due to forum spam).

You may use LibRaw to read RAW data and convert it to RGB bitmap.
To pack to JPEG you'll need another library (libjpeg or so)

Reply to: Modify parameters of raw image   9 years 4 months ago

You may use LibRaw to read RAW image and convert it to RGB bitmap (in memory).
To create JPEG image from this bitmap you'll need another software (LibJPEG or so)

Reply to: Modify parameters of raw image   9 years 4 months ago

I want to convert raw image to JPEG image including exif information,and get some information like DCT coefficients and so on. Can I do that using libraw library?

Reply to: Linking Libraw to VS project   9 years 4 months ago

You're able to build samples, right?

Samples are build by very simple command (assuming DLL has build before):
cl $(COPT) /Feoutputfilename.exe sample-source.cpp lib\libraw.dll

You may need to adjust COPT variable (in Makefile.msvc) accoriding to your project build flags (runtime library, exception handling).

Reply to: Linking Libraw to VS project   9 years 4 months ago

I was just trying to build LibRaw with the supplied makefile and then link the created "libraw.lib" or "libraw_static.lib" to my project. So it should already be compiled, just being read by my project when it calls the functions. Is this not an appropriate way to include the source code? It has to be compiled within my code?

Reply to: Linking Libraw to VS project   9 years 4 months ago

Also, you do not need to swap dllimport/export in libraw_types.h

Reply to: Linking Libraw to VS project   9 years 4 months ago

If you build LibRaw within your project, you need to set this define for compiler.

If you build LibRaw using supplied Makefile.msvc (as starting point), all things are already set-up.
Just tested with VisualStudio 2013 (it complains about /arch:SSE2, because this option is default now, but compiles LibRaw and examples OK)

Reply to: Linking Libraw to VS project   9 years 4 months ago

Isn't that what you told me to do in your previous comment?

Reply to: Linking Libraw to VS project   9 years 4 months ago

You do not need to pass anything to Makefile.msvc, all flags are set OK within this Makefile

Reply to: Linking Libraw to VS project   9 years 4 months ago

So I tried compiling by running "nmake /DLIBRAW_BUILDLIB -f Makefile.msvc" but it said "NMAKE: fatal error U1065: invalid option 'W' Stop."
I'm probably putting that flag in the wrong spot, but I tried to hack around it by swapping the dllimport and dllexport in libraw_types.h, so that it uses dllexport if I don't define that flag, which is what I'm trying to do anyway.
Doing that, I start compiling by running "nmake -f Makefile.msvc" but I get a bunch of errors (it won't let me post all of them because it thinks it's spam, but they all generally look like the following):

libraw_datastream.obj : error LNK2019: unresolved external symbol "__declspec(dl
limport) const LibRaw_windows_datastream::`vftable'" (__imp_??_7LibRaw_windows_d
atastream@@6B@) referenced in function "public: __thiscall LibRaw_windows_datast
ream::LibRaw_windows_datastream(void *)" (??0LibRaw_windows_datastream@@QAE@PAX@
Z)
libraw_c_api.obj : error LNK2019: unresolved external symbol "__declspec(dllimpo
rt) public: int __thiscall LibRaw::COLOR(int,int)" (__imp_?COLOR@LibRaw@@QAEHHH@
Z) referenced in function _libraw_COLOR
demosaic_packs.obj : error LNK2001: unresolved external symbol "__declspec(dllim
port) public: int __thiscall LibRaw::COLOR(int,int)" (__imp_?COLOR@LibRaw@@QAEHH
H@Z)
bin\libraw.dll : fatal error LNK1120: 29 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\cl.EXE"' : return code '0x2'

Reply to: Linking Libraw to VS project   9 years 4 months ago

Please check, that you've build DLL correctly:
- you need to add /DLIBRAW_BUILDLIB to compiler flags when you compile DLL parts
- and do not add this flag if you compile user code that uses libraw.

The trick is within libraw_types.h:

#ifdef WIN32
#ifdef LIBRAW_NODLL
# define DllDef
#else
# ifdef LIBRAW_BUILDLIB
#    define DllDef   __declspec( dllexport )
# else
#    define DllDef   __declspec( dllimport )
# endif
#endif
#else
#  define DllDef
#endif

So, when you compile DLL, all needed functions are marked as dllexport

Reply to: Linking Libraw to VS project   9 years 4 months ago

That should say I've added a #include < libraw.h > without the spaces but I guess it thought I was trying to add some kind of HTML tag

Reply to: LibRaw image size data vs Adobe interpretation   9 years 4 months ago

LibRaw do not care about in-camera crops like 16:9 and always returns full image.
So, if you want to completely repeat Adobe DNG convertor behavior, you need to parse Exif/makernotes metadata (and, possibly, add vendor-specific or camera-specific hints).

AFAIK, Adobe default cropping is because of
- let some space for demosaic (so ignore pixels very close to border)
- let some space for sensor positioning errors (seen in some cameras, within several pixels)
- also, physical masking may produce border effects (like diffraction) close to mask edge.

Pages