We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I try to encode an image with missing components, the python interpreter silently exits with no message/exception.
See this example code:
from numpy import uint8, zeros from turbojpeg import TJPF_RGB, TJSAMP_420, TurboJPEG jpeg = TurboJPEG() image = zeros((1024, 4096), dtype=uint8) print("Entering store...") with open("test.jpg", "wb") as f: jpeg_encoded = jpeg.encode( image, pixel_format=TJPF_RGB, quality=95, jpeg_subsample=TJSAMP_420, ) f.write(jpeg_encoded) print("Exiting store (this never gets printed)...")
Conversely, if I say image = zeros((1024, 4096, 3), dtype=uint8), the script completes normally.
image = zeros((1024, 4096, 3), dtype=uint8)
Issue appears with both pyturbojpeg 1.6.3 and 1.6.4, on Windows 10x64.
pyturbojpeg
I would expect to see an exception raised in this case.
Thank you for your work on this great wrapper library, and happy new year!
The text was updated successfully, but these errors were encountered:
Improved encode() error handling on wrong array shape
ae3da71
1. Improved encode() error handling on wrong array shape (silent crash on wrong array shape #57) 2. Added an extra turbojpeg default path for Mac OS
thank you for the quick solution!
Sorry, something went wrong.
lilohuang
No branches or pull requests
If I try to encode an image with missing components, the python interpreter silently exits with no message/exception.
See this example code:
Conversely, if I say
image = zeros((1024, 4096, 3), dtype=uint8)
, the script completes normally.Issue appears with both
pyturbojpeg
1.6.3 and 1.6.4, on Windows 10x64.I would expect to see an exception raised in this case.
Thank you for your work on this great wrapper library, and happy new year!
The text was updated successfully, but these errors were encountered: