Skip to content

Commit

Permalink
hard code constant to deal with legacy version.
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh committed Sep 13, 2024
1 parent f617ee7 commit 588e333
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ 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
Expand Down
26 changes: 13 additions & 13 deletions cc/io/io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ NAN_MODULE_INIT(Io::Init) {
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>(cv::IMWRITE_JPEG_SAMPLING_FACTOR)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_EXR_TYPE, Nan::New<v8::Integer>(cv::IMWRITE_EXR_TYPE)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_HDR_COMPRESSION, Nan::New<v8::Integer>(cv::IMWRITE_HDR_COMPRESSION)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_RESUNIT, Nan::New<v8::Integer>(cv::IMWRITE_TIFF_RESUNIT)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_XDPI, Nan::New<v8::Integer>(cv::IMWRITE_TIFF_XDPI)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_YDPI, Nan::New<v8::Integer>(cv::IMWRITE_TIFF_YDPI)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_TIFF_COMPRESSION, Nan::New<v8::Integer>(cv::IMWRITE_TIFF_COMPRESSION)); // added 2024-13-09

FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_411, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_SAMPLING_FACTOR_411)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_420, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_SAMPLING_FACTOR_420)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_422, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_SAMPLING_FACTOR_422)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_440, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_SAMPLING_FACTOR_440)); // added 2024-13-09
FF_SET_JS_PROP(target, IMWRITE_JPEG_SAMPLING_FACTOR_444, Nan::New<v8::Integer>(cv::IMWRITE_JPEG_SAMPLING_FACTOR_444)); // added 2024-13-09
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));
Expand Down

0 comments on commit 588e333

Please sign in to comment.