Skip to content

Commit

Permalink
Fix #58: Option to raise pixel limit
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Jan 25, 2025
1 parent b034889 commit 3f5ad37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ optional arguments:
imgp -acx 64x64 "$pop"
}

### Troubleshooting

1. To lift the pixel limit (e.g. error `'PIL.Image.DecompressionBombError' when resizing large image`) for _trusted_ input files, uncomment the following line in the source code:

Image.MAX_IMAGE_PIXELS = None

### Developers

1. Copyright © 2016-2025 [Arun Prakash Jana](https://github.com/jarun)
Expand Down
2 changes: 2 additions & 0 deletions imgp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import math
import PIL
from PIL import Image, ImageFile

#Image.MAX_IMAGE_PIXELS = None

if not hasattr(PIL.Image, 'Resampling'): # Pillow<9.0
PIL.Image.Resampling = PIL.Image

Expand Down

0 comments on commit 3f5ad37

Please sign in to comment.