-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
matrix_mod2_dense unable to export to png #39289
Comments
I think this is an issue with libpng, not sage, because the same problem has been reported on forums that are not related to sage. For example: https://stackoverflow.com/questions/78812551/does-libpng-have-an-upper-limit-on-image-width |
Thanks for quick reply. I have read on libPNG site that they support up to 2^31 sizes and assumed that thats it. However, in their manual 1, it says:
Perhaps, we should explicitly override this limit in Sage to the maximum 0x7fffffff? |
In m4ri source code:
Why does the line not work then? Debugging needed. Apparently we're not using
Reported issue to libgd: libgd/libgd#931 |
I wonder if there is a reason why Sage is not using the original |
Steps To Reproduce
When trying to save a GF(2) dense matrix with one dimension larger than 1000001, the export will fail. However, 1000000 works fine. Saving to PNG is used for example when passing a matrix to a function decorated with
@parallel
.In sage, run:
Output:
Expected Behavior
A PNG file with the matrix should be saved.
Actual Behavior
to_png fails when at least one dimension is larger than or equal to 1000001
Additional Information
1000000 works fine.
For matrix/image with dimensions (a,b), both libPNG, libGD and M4RI support a*b <= 2^31. A million in a single dimension seems rather arbitrary. I could not find where this user limit is set in Sage source files.
Environment
Checklist
The text was updated successfully, but these errors were encountered: