# Revision history [back]

### How to resize an extremely large image

Hi, I'm using Python 3.4.3 and OpenCV 3.0.0. While I'm trying to resize a very large RGB image (107162,79553,3) using the following code:

import cv2
image = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)


I got the error message "cv2.error: C:\opencv-3.0.0\source\modules\imgproc\src\imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function cv::resize" I did some further testing and realized this is an integer overflow problem because the code would work on image of the size (46340,46340,3) but not (46341,46341,3).I understand I can perform bloc processing but I'm still interested in knowing if there is a direct solution to this problem.

My naive thought is that if I can identify where exactly this int that gave me the trouble is, I can then go in and change it to int64. So my questions are : 1) Is this approach plausible? 2) If so, exactly what should I change to solve this? If not, how can I solve this problem?

 2 retagged sturkmen 5966 ●3 ●41 ●68 https://github.com/stu...

### How to resize an extremely large image

Hi, I'm using Python 3.4.3 and OpenCV 3.0.0. While I'm trying to resize a very large RGB image (107162,79553,3) using the following code:

import cv2
image = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)


I got the error message "cv2.error: C:\opencv-3.0.0\source\modules\imgproc\src\imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function cv::resize" I did some further testing and realized this is an integer overflow problem because the code would work on image of the size (46340,46340,3) but not (46341,46341,3).I understand I can perform bloc processing but I'm still interested in knowing if there is a direct solution to this problem.

My naive thought is that if I can identify where exactly this int that gave me the trouble is, I can then go in and change it to int64. So my questions are : 1) Is this approach plausible? 2) If so, exactly what should I change to solve this? If not, how can I solve this problem?

 3 retagged sturkmen 5966 ●3 ●41 ●68 https://github.com/stu...

### How to resize an extremely large image

Hi, I'm using Python 3.4.3 and OpenCV 3.0.0. While I'm trying to resize a very large RGB image (107162,79553,3) using the following code:

import cv2
image = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)


I got the error message "cv2.error: C:\opencv-3.0.0\source\modules\imgproc\src\imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function cv::resize" I did some further testing and realized this is an integer overflow problem because the code would work on image of the size (46340,46340,3) but not (46341,46341,3).I understand I can perform bloc processing but I'm still interested in knowing if there is a direct solution to this problem.

My naive thought is that if I can identify where exactly this int that gave me the trouble is, I can then go in and change it to int64. So my questions are : 1) Is this approach plausible? 2) If so, exactly what should I change to solve this? If not, how can I solve this problem?