Commit 63e2614
API: forbid unsafe settings and keywords in AbstractMovieWriter.grab_frame
Several of the keyword arguments (dpi, bbox_inches) to savefig will change the
dimensions of the rendered figure or byte output (format). Changing these
mid-stream in generating a movie will in a best case result in an animation that
jumps around and in a worst case silently generate a completely corrupted
movie.
The rcparam savefig.bbox can have the same effect.
The low level AbstractMovieWriter.grab_frame is now strict and will error if
any possibly unsafe conditions are met.
closes matplotlib#25608
Co-authored-by: Elliott Sales de Andrade <[email protected]>1 parent a1f9e0f commit 63e2614
File tree
3 files changed
+76
-1
lines changed- doc/api/next_api_changes/behavior
- lib/matplotlib
- tests
3 files changed
+76
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| |||
351 | 357 | | |
352 | 358 | | |
353 | 359 | | |
| 360 | + | |
354 | 361 | | |
355 | 362 | | |
356 | 363 | | |
| |||
457 | 464 | | |
458 | 465 | | |
459 | 466 | | |
| 467 | + | |
460 | 468 | | |
461 | 469 | | |
462 | 470 | | |
| |||
491 | 499 | | |
492 | 500 | | |
493 | 501 | | |
| 502 | + | |
494 | 503 | | |
495 | 504 | | |
496 | 505 | | |
| |||
747 | 756 | | |
748 | 757 | | |
749 | 758 | | |
| 759 | + | |
750 | 760 | | |
751 | 761 | | |
752 | 762 | | |
| |||
1776 | 1786 | | |
1777 | 1787 | | |
1778 | 1788 | | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
196 | 230 | | |
197 | 231 | | |
198 | 232 | | |
| |||
0 commit comments