Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92a33aa

Browse files
committed
Skip None entries in png metadata.
1 parent83f82f2 commit92a33aa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎lib/matplotlib/backends/backend_agg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,8 @@ def print_png(self, filename_or_obj, *args,
484484
485485
Other keywords may be invented for other purposes.
486486
487-
If 'Software' is not given, an autogenerated value formatplotlib
488-
will be used.
487+
If 'Software' is not given, an autogenerated value forMatplotlib
488+
will be used. This can be removed by setting it to *None*.
489489
490490
For more details see the `PNG specification`_.
491491

‎lib/matplotlib/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,8 @@ def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None,
15431543
}
15441544
pil_kwargs["pnginfo"]=pnginfo=PIL.PngImagePlugin.PngInfo()
15451545
fork,vinmetadata.items():
1546-
pnginfo.add_text(k,v)
1546+
ifvisnotNone:
1547+
pnginfo.add_text(k,v)
15471548
ifformatin ["jpg","jpeg"]:
15481549
format="jpeg"# Pillow doesn't recognize "jpg".
15491550
facecolor=mpl.rcParams["savefig.facecolor"]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp