opencv: set pixel limit for imread (#11321)

Trying to fix OOM issues in `imread`/`imdecode` tests.

OpenCV has mechanism for input image size limiting controlled via
environment variables:

b259342737/modules/imgcodecs/src/loadsave.cpp (L67-L81)

In this PR we set lower than default (`1<<30` ~ 1Gpix ~ 3072Mb) total
pixel limit since runner has its own limits (2048Mb?).

**cc** @vrabaud , @opencv-alalek
This commit is contained in:
Maksim Shabunin 2023-12-05 19:56:47 +03:00 committed by GitHub
parent f718bdc920
commit f4ad98d71b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -24,3 +24,5 @@ COPY *.cc *.h $SRC/
# This is to fix Fuzz Introspector build by using LLVM old pass manager
# re https://github.com/ossf/fuzz-introspector/issues/305
ENV OLD_LLVMPASS 1
# Runner have memory limit 2048Mb, set imread pixel limit 712Mpix ~ 2037Mb (BGR)
ENV OPENCV_IO_MAX_IMAGE_PIXELS=712000000