Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c0b413

Browse files
committed
Clarify comment
1 parent b8f8976 commit 2c0b413

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_agg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ def print_jpg(self, filename_or_obj, *args, **kwargs):
585585

586586
if kwargs.pop("dryrun", False):
587587
return
588-
# The image is "pasted" onto a white background image to safely
589-
# handle any transparency
588+
589+
# Flatten RGBA image to safely handle transparent regions
590590
buf = mimage.flatten_rgba(buf)
591591
img = Image.frombuffer('RGBA', (w, h), buf, 'raw', 'RGBA', 0, 1)
592592

0 commit comments

Comments
 (0)