Title: Change hard coded image size limits from (32768, 32768) pixels to (INT_MAX, INT_MAX) by nicolas-pascal · Pull Request #3451 · matplotlib/matplotlib · GitHub
Open Graph Title: Change hard coded image size limits from (32768, 32768) pixels to (INT_MAX, INT_MAX) by nicolas-pascal · Pull Request #3451 · matplotlib/matplotlib
X Title: Change hard coded image size limits from (32768, 32768) pixels to (INT_MAX, INT_MAX) by nicolas-pascal · Pull Request #3451 · matplotlib/matplotlib
Description: While trying to set a big image on a CentOS6 64bits platform, I have encoutered the error message : Traceback (most recent call last): File "soda_333m_browser.py", line 222, in test() File "soda_333m_browser.py", line 219, in test draw(infile) File "soda_333m_browser.py", line 211, in draw fig.savefig (outfile) File "/usr/ops/env64_rhel6/lib64/python2.6/site-packages/matplotlib-1.4.0-py2.6-linux-x86_64.egg/matplotlib/figure.py", line 1470, in savefig self.canvas.print_figure(_args, *_kwargs) File "/usr/ops/env64_rhel6/lib64/python2.6/site-packages/matplotlib-1.4.0-py2.6-linux-x86_64.egg/matplotlib/backends/backend_qt5agg.py", line 161, in print_figure FigureCanvasAgg.print_figure(self, _args, *_kwargs) File "/usr/ops/env64_rhel6/lib64/python2.6/site-packages/matplotlib-1.4.0-py2.6-linux-x86_64.egg/matplotlib/backend_bases.py", line 2192, in print_figure **kwargs) File "/usr/ops/env64_rhel6/lib64/python2.6/site-packages/matplotlib-1.4.0-py2.6-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 513, in print_png FigureCanvasAgg.draw(self) File "/usr/ops/env64_rhel6/lib64/python2.6/site-packages/matplotlib-1.4.0-py2.6-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 456, in draw self.renderer = self.get_renderer(cleared=True) File "/usr/ops/env64_rhel6/lib64/python2.6/site-packages/matplotlib-1.4.0-py2.6-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 473, in get_renderer self.renderer = RendererAgg(w, h, self.figure.dpi) File "/usr/ops/env64_rhel6/lib64/python2.6/site-packages/matplotlib-1.4.0-py2.6-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 94, in init self._renderer = _RendererAgg(int(width), int(height), dpi, debug=False) ValueError: width and height must each be below 32768 So I dived deep down into the C++ wrappers, and it appears that image sizes have a hard coded limit of 32768 pixels. Actually, this limitation should be different on 64bits platform, so I've turned this number into the C stdlib constant "INT_MAX" to adapt it more "dynamically" to the target platform. This fix works perfectly for me but should be tested on a 32bits platform (but I don't have one)
Open Graph Description: While trying to set a big image on a CentOS6 64bits platform, I have encoutered the error message : Traceback (most recent call last): File "soda_333m_browser.py", line 222, in test() Fi...
X Description: While trying to set a big image on a CentOS6 64bits platform, I have encoutered the error message : Traceback (most recent call last): File "soda_333m_browser.py", line 222, in t...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/3451
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:18692a2a-1cc1-2858-c3cf-6db493902bb9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C1D6:1857AC:77A183:A48FC1:6A534E98 |
| html-safe-nonce | ae971f653fc7c425eed6510070d25b2fe9f1c62245dec3b02be5cf6ff1036dff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUQ2OjE4NTdBQzo3N0ExODM6QTQ4RkMxOjZBNTM0RTk4IiwidmlzaXRvcl9pZCI6IjU2NTcxMzkzNDE2Mzg1NzA0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5f98fc5d67a03d4ca5cfec632fd1b6cb00776474fe013117dea7efeb5dbab174 |
| hovercard-subject-tag | pull_request:20620700 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/3451/files |
| twitter:image | https://avatars.githubusercontent.com/u/1931994?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1931994?s=400&v=4 |
| og:image:alt | While trying to set a big image on a CentOS6 64bits platform, I have encoutered the error message : Traceback (most recent call last): File "soda_333m_browser.py", line 222, in test() Fi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width