issuefiler
issuefiler
```Javascript import FileSystem from "node:fs/promises"; import OpenCV from "@u4/opencv4nodejs"; const imencode_image_data = await OpenCV.imencodeAsync( ".png", new OpenCV.Mat(0x100, 0x100, OpenCV.CV_8UC1), [OpenCV.IMWRITE_PNG_BILEVEL, 1] ); await FileSystem.writeFile("imencode.png", imencode_image_data); await OpenCV.imwriteAsync( "imwrite.png", new OpenCV.Mat(0x100,...
# Bug I’ve found what is wrong. Compare the two: https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/cc/io/ioBindings.h#L56-L71 ```Javascript cv::imencode(ext, img, dataVec, flags); ``` and https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/cc/io/ioBindings.h#L35-L44 ```Javascript cv::imwrite(path, img); ``` . **When the `.imwrite` binding method calls...
# Fix suggestion This line https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/cc/io/ioBindings.h#L42 should be ```Javascript cv::imwrite(path, img, flags); ``` .
You see **dozens** of issues along the lines of “.hpp not found; I can’t build,” right? I suppose this is the very cause.
It’s not that I’m saying I cannot build OpenCV to get this package work. It works now. I’m just reporting a bug in `build-opencv` that has been causing trouble to...
I’ve figured out the reason why this happens. # The cause of this bug When you run the command above (`npx build-opencv…`), https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/package.json#L31-L33 https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/bin/install.js#L1-L4 https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/install/compileLib.js#L195-L197 https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/install/compileLib.js#L303 [The `opencv4nodejs/install/compileLib.js`](https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/install/compileLib.js) executes shell...
# Fix suggestion > ### [Variable Expansions (``, `@`)](https://gyp.gsrc.io/docs/InputFormatReference.md#variable-expansions) > > If `VAR` is a string, the string is converted to a list which is inserted into the list in...
# TL; DR A slight modification https://github.com/UrielCh/opencv4nodejs/blob/66d7d42abb17ae5c5f8b5cfe6bf7cb5409baf24a/install/parseEnv.js#L6 to ```Javascript outputs.forEach(o => console.log(`"${o}"`)); ``` will correct `node-gyp`’s `"include_dirs"` and `"libraries"` list generation, and resolve the following issues: - https://github.com/UrielCh/opencv4nodejs/issues/16, - https://github.com/UrielCh/opencv4nodejs/issues/30,...
I’ve noticed `.hMul`, `.add`, `.sqrt` methods of _opencv4nodejs_, which I used instead, don’t have their asynchronous versions. Why is that? And do you think `.magnitude` should have an asynchronous binding?
Does that mean that the asynchronous variants of the `.hMul`/`.add`/`.sqrt` methods, `.hMulAsync`/`.addAsync`/`.sqrtAsync`, will also be available?