I have a TIFF file with a size of (48000, 432000) and I would like to upload only a piece of the image, for example, pass a parameter like (X, Y, wid, hei), where X, Y are the coordinates of the upper-left corner of the piece, and wid, hei are the width and height of the piece, respectively. Because if you upload the entire image, a memory error will inevitably occur.
I read this post, looked at the tifffile library documentation, I tried to find a similar method in PIL, but I did not find a similar solution.
Maybe someone can tell me how you can load a piece of an image into RAM in this way?