Skip to content
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

Add .bmp support #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

siemdejong
Copy link

Add bitmap (.bmp) support.

Add bitmap (.bmp) support.
@siemdejong
Copy link
Author

siemdejong commented Nov 10, 2022

It would probably be better to try-except image loading with PIL instead of filename endings to be sure other image types are included as well:

# e.g. power.py]
try:
    # Get image
    image = myimage.MyImage.get_generic_image(path_in)

   # Image.load('/path/to/image") will raise an IOError if the image cannot be loaded.
   # img.verify() # Will raise an Exception if the image cannot be verified. Can be added at the end of `get_generic_image()`.
except IOError, Exception
   continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant