Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images are so large that can'y load!!! #7399

Closed
SnoopyXI opened this issue Jan 17, 2024 · 1 comment
Closed

Images are so large that can'y load!!! #7399

SnoopyXI opened this issue Jan 17, 2024 · 1 comment

Comments

@SnoopyXI
Copy link

Describe the bug
My images are 30000x10000, which are so large that can't load by Pillow, but opencv can load images. So I wanna know how to use cv2 as reader in LoadImage function. Or is there any better solution?

Error:
PIL.Image.DecompressionBombError: Image size (606563352 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.

@KumoLiu
Copy link
Contributor

KumoLiu commented Jan 18, 2024

Hi @SnoopyXI, you can write your own reader inherit from ImageReader and register into LoadImage.

class ImageReader(ABC):

def register(self, reader: ImageReader):

@Project-MONAI Project-MONAI locked and limited conversation to collaborators Jan 18, 2024
@KumoLiu KumoLiu converted this issue into discussion #7400 Jan 18, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants