-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support raw formats on windows #25
Comments
Try to add Sorry I could not test it myself due to lack of time, I've just had a quick look at the upstream code. |
Sorry for the long time not answering. I didn't have a Windows building environment all the time. Now I set one up and managed to try your hint. Unfortunately it still doesn't build. I still get the same error (I'm using LibRaw 0.19.5):
|
FYI - I checked with Libraw team in github LibRaw/LibRaw#161 (comment) and the team has confirmed that it's build-able in windows using both Microsoft compiler and gcc (mingw32). |
Thank you for asking the Libraw team. I already knew that Libraw itself builds on Windows. What I didn't get to work yet is building Libraw as node package (using gyp). But I'm no C expert and don't know what else to do. So if anyone can help here, please go ahead. Maybe the hint from @LibRaw's comment can help:
|
I submitted a pull request in node-libraw repo to support windows compilation. |
Have you considered compiling LibRaw directly with WASM, which is Emscripten for C++: https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm This could get rid of the additional layer provided by Maybe this proof-of-concept might help as well: https://github.com/arbarlow/libraw-wasm-example |
I'm not sure, whether checking out the pull request of @akjoshi or compiling LibRaw with WASM is the better way to go. In the end, performance is most important for Picturama (because it sucks if switching between photos is not fast). @rohrlaf: Why do you think, performance would be better with WASM? My experience with Emscripten was the exact opposite. For HEIC/HEIF support, I ended up creating node-libheif, because using a native binding was 3x faster than using Emscripten. |
Reading raw camera formats is currently only supported on macOS and Linux - not on Windows.
The problem on Windows is that node-libraw doesn't compile on Windows. I forked node-libraw and tried some things but I didn't get it to work.
There is a compile error in the code of LibRaw (LibRaw is wrapped by
node-libraw
). CompilingLibRaw
should generally be possible, since they provide downloads for Windows.Here is the error (see full log):
According to Microsoft's description of error C2491, the code of
LibRaw
marks DLL imports the wrong way - see source code oflibraw_c_api.cpp
. So I wonder why the LibRaw-Team can build this on windows. I also tried to build node-libraw as static library, but this doesn't work either.I'm a relative nowise when it comes to building C code. I don't know what else to do. So if anybody can help here - please go ahead.
The text was updated successfully, but these errors were encountered: