Recent comments

Reply to: Barrel distortion   10 years 9 months ago

No.

Use lensfun.

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 9 months ago

Sorry, I know nothing about Linux shared libraries creation.

./configure should work, meanwhile.

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 9 months ago

It's a huge makefile, any tip on what to change there?

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 9 months ago

yes, you need to change makefile, or use ./configure stuff.

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 9 months ago

I've managed creating dynamically loaded libraries of LibRaw for Mac, Win32 and Win64 now. The only thing that remains are dynamic libraries for Linux32 and Linux64. I would very much appreciate your help with this. When running the make file I end up with .a, .la and .lib files only.

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 9 months ago

LibRaw (C++ API) do not have init() method. So, I do not know what you call.

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 9 months ago

I appreciate your help in creating a 64 bit version of LibRaw for Windows. I can interface with this library version from a 64 bit Java VM using BridJ, but if I try to call the init() method of LibRaw when compiled as a 64 bit dll it crashes. I get EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at pc=0x00007ffdd79069ac, pid=6876, tid=6592. Any clue on what I can do?

Reply to: File format specs?   10 years 9 months ago

LibRaw assumes *full* raw file is available. If not, the file may be rejected.

In some cases only some part of file is sufficient for metadata parse, but there is no general rule: it is possible that RAW data is recorded before some other metadata (this is the case for Canon CRW files, for example.

You may implement own I/O layer which will ask downloader to download requested file part(s)

Reply to: Kodak file problems   10 years 10 months ago

I will take a look at this, but I am probably not going to pick up the next release right away. I got into this because my dcraw "adaptation" wasn't working as well as it should and I thought LibRaw might save me a lot of work. It certainly has, because all in all, dcraw is a monolithic global-variable mess. It might sort of be OK for a stand-alone program, but I am not even sure of that. I do know that it is very difficult for someone to maintain the way it is.

So I have my little graphics interface DLL now working with the updated dcraw code and this brings it into the more "modern era". I have also brought in a faster JPEG decoder and I believe this will benefit the applications that use this DLL greatly. So now I get to spend a bunch of time working on those applications with a lot more confidence in the graphics DLL.

Reply to: Kodak file problems   10 years 10 months ago

Checked all old kodak files with current (-development) LibRaw branch with both open_file() and open_buffer(). All OK.
development branch to be updated on GitHub in few days

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 10 months ago

Thank you Alex. It Worked. I am very very grateful. All the best.

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 10 months ago

And vcvarsall without x64 will create x86 environment, just first lines from this .bat:

@echo off
if "%1" == "" goto x86
Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 10 months ago

vcvars32 surely will set x32 environment.

To rebuild 64-bit libraw.dll I succesfully use this:

call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
nmake -f Makefiile.msvc
Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 10 months ago

I used vcvars32.bat initially to build the correct libraw.dll but then figured i should use vcvarsall.bat for 64 bit build, though there was no difference. If that's not the correct way, how do you rebuild it with 64bit? Thanks a lot again

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 10 months ago

unresolved symbols mean you cannot link with correct .dll (or lib).

Are you sure you've rebuilt libraw.dll with 64 bit?

Reply to: LibRaw on Visual Studio with Target Machine x64   10 years 10 months ago

Thank you for your response. So when machine module type and target is set to x86, everything works fine. When I convert both to x64 From Release Target in Configuration Manager and Linker -> Advanced -> Target Machine, I get the following output:

1>------ Rebuild All started: Project: LibrawReader, Configuration: Release x64 ------
1> readFile.cpp
1>c:\users\imnet\downloads\compressed\libraw-0.17.0_2\libraw-0.17.0\libraw\libraw_datastream.h(98): warning C4251: 'LibRaw_file_datastream::filename' : class 'std::basic_string,std::allocator>' needs to have dll-interface to be used by clients of class 'LibRaw_file_datastream'
1>c:\users\imnet\downloads\compressed\libraw-0.17.0_2\libraw-0.17.0\libraw\libraw_datastream.h(101): warning C4251: 'LibRaw_file_datastream::wfilename' : class 'std::basic_string,std::allocator>' needs to have dll-interface to be used by clients of class 'LibRaw_file_datastream'
1>c:\users\imnet\downloads\compressed\libraw-0.17.0_2\libraw-0.17.0\libraw\libraw_datastream.h(200): warning C4251: 'LibRaw_bigfile_datastream::filename' : class 'std::basic_string,std::allocator>' needs to have dll-interface to be used by clients of class 'LibRaw_bigfile_datastream'
1>c:\users\imnet\downloads\compressed\libraw-0.17.0_2\libraw-0.17.0\libraw\libraw_datastream.h(203): warning C4251: 'LibRaw_bigfile_datastream::wfilename' : class 'std::basic_string,std::allocator>' needs to have dll-interface to be used by clients of class 'LibRaw_bigfile_datastream'
1>readFile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl LibRaw::~LibRaw(void)" (__imp_??1LibRaw@@UEAA@XZ)
1>readFile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl LibRaw::recycle(void)" (__imp_?recycle@LibRaw@@QEAAXXZ)
1>readFile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl LibRaw::raw2image(void)" (__imp_?raw2image@LibRaw@@QEAAHXZ)
1>readFile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl LibRaw::unpack(void)" (__imp_?unpack@LibRaw@@QEAAHXZ)
1>readFile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl LibRaw::open_file(char const *,__int64)" (__imp_?open_file@LibRaw@@QEAAHPEBD_J@Z)
1>readFile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl LibRaw::LibRaw(unsigned int)" (__imp_??0LibRaw@@QEAA@I@Z)
1>c:\users\imnet\documents\visual studio 2013\Projects\LibrawReader\x64\Release\LibrawReader.exe : fatal error LNK1120: 6 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

What do you think is the problem?

Reply to: Kodak file problems   10 years 10 months ago

OK, mystery solved. I use current (our development) branch for testing.
This branch to be pushed on GitHub within 2-3 weeks, our repository is here.
Or just add these lines to apply_tiff:

      data_offset   = tiff_ifd[i].offset;
+#ifdef LIBRAW_LIBRARY_BUILD
+      data_size     = tiff_ifd[i].bytes;
+#endif
      tiff_flip     = tiff_ifd[i].t_flip;

1Mb malloc is not much in today raw processing. 50Mpix Canon RAW, processed in full-res in float (16 bytes per pixel) is slightly less than 1Gb (and my phone have 2GB RAM)

Reply to: Kodak file problems   10 years 10 months ago

These days, a malloc under 1MB isn't huge at all.

Working on embedded systems and games with as little as 128 BYTES of RAM conditions one in different ways and makes one think a bit before doing some things.

I can see where it would be good to set data_size in apply_tiff, but in the code I downloaded from libraw.org it isn't happening. Seems like the statement

data_size = tiff_ifd[i].bytes

would be a good idea to have there, but in the 0.17 code it is not there.

Reply to: Kodak file problems   10 years 10 months ago

data_size is set within apply_tiff() code.

malloc is not 'huge': Kodak JPEG-codec cameras are DC50 (0.5Mpix) and DC120 (1Mpix). Real data size is less than 1Mb.

Reply to: Sony ILCE-7RM2   10 years 10 months ago

We'll release massive update to 'master' Github branch in 2-3 weeks. The update will include support for this data format. Follow us on GitHub: https://github.com/LibRaw/LibRaw

LibRaw 0.17 will *not* be updated.

Reply to: Kodak file problems   10 years 10 months ago

I have looked around at dcraw_common.ccp and I find no instance of setting data_size... ever. I looked at the latest dcraw.c source and I see the LibRaw version is doing something interesting in copying the entire JPEG data area and byte-flipping it whereas this is apparently done in the input buffer in dcraw.c. I can certainly understand a need/desire to keep the input buffer as "const", even at the expense of a huge malloc to hold the copy.

But this doesn't explain how data_size (which controls the malloc and byte swapping) gets set in things like RawDigger.

I put in some code to set data size at the beginning of kodak_jpeg_load_raw and it works flawlessly now. This isn't something I am comfortable with. I would very much like to understand how data_size is supposed to be set, given that it is buried in an "internal" struct, I am sure it is not an external parameter. Clearly, data_size is completely new to LibRaw and doesn't appear in the original dcraw.c source. But when I search on data_size in dcraw_common.cpp the only occurrences I find are reading it. Actually, I find no occurrence anywhere in LibRaw where this value is set.

What am I missing here?

Reply to: Kodak file problems   10 years 10 months ago

Sorry. looked under wrong #ifdef.

And (looked in RawDigger in debugger) data_size is correct. Looks like I need to switch to 32-bit version again?

Reply to: Kodak file problems   10 years 10 months ago

What I am seeing at the beginning of kodak_jpeg_load_raw is the following:

// LibRaw's Kodak_jpeg_load_raw
void CLASS kodak_jpeg_load_raw()
{
  if(data_size < 1)
    throw LIBRAW_EXCEPTION_DECODE_JPEG;

This is the source of the -100008 error I am getting. This is in dcraw_common.cpp.

I am building this with NO_JPEG not defined.

Reply to: exp_shift doesn't work as expected   10 years 10 months ago

ok. thanks for clarifying this.

Pages