Skip to content

Commit

Permalink
Merge pull request #162 from UrielCh/issue115
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh authored Sep 13, 2024
2 parents d1d3e55 + 5092e6c commit b1bb59b
Show file tree
Hide file tree
Showing 16 changed files with 2,036 additions and 26 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ examples/src/YOLOv3-Training-Snowman-Detector/weights
docs/
lib/*.d.ts.map
install/*.d.ts.map
cjs/install/
cjs/lib/
esm/install/
esm/lib/
u4-opencv4nodejs-*.tgz
Expand Down
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ test_script:
- python --version
- node --version
# - choco install python --version=%PYTHON_VERSION% -y
- npm install -g pnpm@9.3.0
- npm install -g pnpm@9.10.0
# - pnpm install -g node-gyp
- cd c:\projects\opencv4nodejs
- pnpm install --frozen-lockfile
- pnpm run prepack
- pnpm run rebuild
# rebuild is already called im npm install
# - pnpm run rebuild
# - npm link
# - build-opencv rebuild
# - cd c:\projects\opencv4nodejs\ci\envs && build-opencv rebuild && pnpm install && pnpm test
Expand Down
15 changes: 15 additions & 0 deletions cc/io/io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ NAN_MODULE_INIT(Io::Init) {
FF_SET_JS_PROP(target, IMWRITE_JPEG_RST_INTERVAL, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_RST_INTERVAL));
FF_SET_JS_PROP(target, IMWRITE_JPEG_LUMA_QUALITY, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_LUMA_QUALITY));
FF_SET_JS_PROP(target, IMWRITE_JPEG_CHROMA_QUALITY, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_CHROMA_QUALITY));

FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR, Nan::New<v8::Integer>(7)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_EXR_TYPE, Nan::New<v8::Integer>((3 << 4) + 0)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_HDR_COMPRESSION, Nan::New<v8::Integer>((5 << 4) + 0)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_RESUNIT, Nan::New<v8::Integer>(256)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_XDPI, Nan::New<v8::Integer>(257)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_YDPI, Nan::New<v8::Integer>(258)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_COMPRESSION, Nan::New<v8::Integer>(259)); // added 2024-13-09

FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_411, Nan::New<v8::Integer>(0x411111)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_420, Nan::New<v8::Integer>(0x221111)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_422, Nan::New<v8::Integer>(0x211111)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_440, Nan::New<v8::Integer>(0x121111)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_444, Nan::New<v8::Integer>(0x111111)); // added 2024-13-09

FF_SET_JS_PROP(target, IMWRITE_PNG_COMPRESSION, Nan::New<v8::Integer>(cv::IMWRITE_PNG_COMPRESSION));
FF_SET_JS_PROP(target, IMWRITE_PNG_STRATEGY, Nan::New<v8::Integer>(cv::IMWRITE_PNG_STRATEGY));
FF_SET_JS_PROP(target, IMWRITE_PNG_BILEVEL, Nan::New<v8::Integer>(cv::IMWRITE_PNG_BILEVEL));
Expand Down
Loading

0 comments on commit b1bb59b

Please sign in to comment.