-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
size 0,0 image use .save()
/.tobytes()
throw SystemError: tile cannot extend outside image
#5931
Comments
|
SystemError: tile cannot extend outside image
.save()
/.tobytes()
throw SystemError: tile cannot extend outside image
Just to be clear, what format are trying to save the image as? |
the |
When I try and save a (0, 0) JPEG, if I push past the Pillow error, I get "Empty JPEG image (DNL not supported)" which is coming from libjpeg itself - https://github.com/freedesktop/libjpeg/blob/b4f886fcbb692e20fb4da4e6e3ead57f79444734/jcmaster.c#L54-L57. So it doesn't look like it is possible to create a (0, 0) JPEG file. I've created PR #5938 to fix the error coming from |
I searched a few minutes, it seems like .jpg, .png don't support size 0x0 image. but no info for .tiff and other formats. |
What did you do?
Create a size (0,0) image instead of None, for convenient in coding,
to get rid of
What did you expect to happen?
Normal, probably return
b''
What actually happened?
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: