# Revision history [back]

### Very (very) large image causes issues with function (int type related)

Hello !

I'm working on large images (~65000x40000 on average). I've experienced multiple issues with some functions (ie. cv::threshold and cv::medianBlur) that I don't have if I downscale these images.

After some code digging, I think the issue comes from the use of "int" types in most functions which, obviously, can't fit my size.

For example, in functions cv::threshold with Triangle method, operations like this are done:

size.width *= size.height


Is there any "easy" solution to use "int64" instead of "int" in OpenCV ? I've tried to change cv::Size alias from Size2i to Size2l but it isn't enough as most of OpenCV functions uses "int" as input/output type...

Thanks :)