Search code examples
displayscreen-resolutionimage-size

screen resolution and image display(image size is bigger than screen resolution)


I have a question about the screen resolution and image size. there is an image with the size 4096x4096, while my computer screen resolution is 2560x1440.

I am working on a c++ program which can display the image. when I scale down this image, the program can display the image correctly, the scale can up to 0.7, which leads to image size 2867x2867. any scale that is bigger than 0.7 will lead the program to crash.(Segmentation fault (core dumped)).

I also tested another image size (200x3121), the program works perfectly with given scale which is smaller than 3.6.

all in all, I guess it has a high relationship with the screen resolution. if the image size is far bigger than the screen resolution, then the program will crash. is it right? who can explain it in a right way? tell me the principle. thank you.


Solution

  • No, there's nothing really that can be inferred from this.