-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Fix : jpgd.cpp Added Additional check to half_image_x_size
and half_image_y_size
so that it's values wont be Negative[-1].
#43384
Conversation
Just add an additional check for `half_image_y_size` and `half_image_x_size` for size of 1 pixel so that it's would be zero and not negative(-1) .
Updated jpgd.cpp
Just Found out that i need to check value of godot/thirdparty/jpeg-compressor/jpgd.cpp Line 1672 in 30b6db9
H1V2ConvertFiltered() and aslo value of godot/thirdparty/jpeg-compressor/jpgd.cpp Line 1765 in 30b6db9
H2V1ConvertFiltered() , to be non - negative to not crash.
|
After the last Commit we can fully use 1 x 1 pixel jpg images of any sub-sampling without Engine crash. EVIDENCE 💯 TESTED - PROJECT : |
The fix looks fine, but there are a few changes that should be made before it's merged:
Finally, this is a thirdparty library so it would be best if we can get this patch merged upstream, so that all users of this library can benefit from the fix. This can also lead to writing a better fix with feedback from the original author of this code. Could you make a PR to https://github.com/richgel999/jpeg-compressor with those fixes? We can still merge our own fix in Godot in the meantime, as historically https://github.com/richgel999/jpeg-compressor development was virtually stopped until a recent surge of bugfixing activity - I don't know if Rich is still around reviewing further PRs or if this will happen in another batch in a year or more. |
This partially addresses godotengine/godot-proposals#676.
-Discern between named, indexed and keyed -Get direct access to functions for typed GDScript and GDNative bindings -Small changes to some classes in order to work with the new setget binder
This reverts commit 5066b53.
Superseded by #43441. |
as u can see this was the image in MRP which was successfully imported and u can also see the size of the image is 1 x 1.
also tested with other 1x1 jpg images working just fine. I made changes only on H2V2ConvertFiltered() Function Since the problem was see there only. But i will try to Replicate the problem with different sampling and see whether any more changes are needed. FIX : #42363