Skip to content

Commit

Permalink
increase maximum image size
Browse files Browse the repository at this point in the history
  • Loading branch information
Abe404 committed Feb 28, 2024
1 parent fd3ce9f commit 225eeb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions painter/src/main/python/im_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
import qimage2ndarray
from PIL import Image, ImageOps

# https://github.com/Abe404/root_painter/discussions/131#discussioncomment-8596334
Image.MAX_IMAGE_PIXELS = 1e10

def is_image(fname):
extensions = {".jpg", ".png", ".jpeg", '.tif', '.tiff'}
return any(fname.lower().endswith(ext) for ext in extensions)
Expand Down
2 changes: 2 additions & 0 deletions trainer/im_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
from skimage.io import imread, imsave
from file_utils import ls

# https://github.com/Abe404/root_painter/discussions/131#discussioncomment-8596334
Image.MAX_IMAGE_PIXELS = 1e10

def is_photo(fname):
""" extensions that have been tested with so far """
Expand Down

0 comments on commit 225eeb5

Please sign in to comment.