Comments (7)
Try to add #define LIBRAW_LIBRARY_BUILD
before the #include
of libraw.h
, without that it seems the DllDef
macro is not expanded properly. If it works, please contribute it back to upstream.
Sorry I could not test it myself due to lack of time, I've just had a quick look at the upstream code.
from picturama.
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):
c:\users\til\workspace\picturama\submodules\node-libraw\vendor\libraw\src\libraw_c_api.cpp(277): error C2491: "libraw_set_demosaic": definition of dllimport function not allowed [C:\Users\Til\workspace\picturama\subm
odules\node-libraw\build\vendor\libraw.vcxproj]
from picturama.
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).
from picturama.
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:
[...] building without windows-specific memory mapped input stream is also possible
from picturama.
I submitted a pull request in node-libraw repo to support windows compilation.
from picturama.
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 node-libraw
and also offer performance improvements as it will be pre-compiled and optimised code to be executed.
Maybe this proof-of-concept might help as well: https://github.com/arbarlow/libraw-wasm-example
from picturama.
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.
from picturama.
Related Issues (20)
- Tagging multiple photos in one shot HOT 2
- Option to disable popup when an image is moved to thrash
- can not add chinese tag and delete photo with "backspace" or "delete"
- Appimage crash on start: GPU process isn't usable HOT 5
- Portable version
- MacOS: Three issues on Mac Ventura M1
- When add 2nd tag if string not start with latin character will not show "Create tag" menu
- Change Picturama's slogan HOT 4
- Open photo in folder doesn't work on Windows HOT 4
- Improve selection
- I have added the China translation ! HOT 2
- Add more sorting and filter options HOT 1
- node-libheif and libraw not supported HOT 1
- regression: EXIF orientation is not handled properly HOT 2
- Support multi-select using shift-key HOT 1
- Why not use ipcRenderer.invoke? HOT 3
- [Info Tab] Font seems partially broken HOT 2
- Probably failing to parse big yaml HOT 3
- Edit View: buttons are hidden by WindowsControls on windows HOT 2
- Edit captions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picturama.