Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Commit146e9d0
committed
Filter images in premultiplied alpha mode.
Test e.g. with```pythonimport matplotlib.pyplot as pltimport numpy as npfig = plt.figure(figsize=(6, 6))img = np.zeros((5, 5, 4))img[..., 1] = 1.img[..., 3] = np.tril(np.ones((5, 5)))fig.add_subplot(221).imshow(img, interpolation="bilinear")fig.add_subplot(222).imshow((img * 0xff).astype("u1"), interpolation="bilinear")fig.add_subplot(212).imshow( np.where( np.mgrid[:100, :200][0] > np.random.randint(100, size=200), np.arange(100)[:, None], np.nan), cmap="Greens", interpolation="antialiased", interpolation_stage="rgba")plt.show()```1 parent9f7b3dd commit146e9d0
File tree
4 files changed
+36
-19
lines changed- lib/matplotlib
- tests
- baseline_images/test_image
4 files changed
+36
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
505 | 506 | | |
506 | 507 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 508 | + | |
| 509 | + | |
513 | 510 | | |
514 | 511 | | |
515 | | - | |
516 | | - | |
517 | | - | |
| 512 | + | |
518 | 513 | | |
519 | 514 | | |
520 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
521 | 518 | | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
528 | 545 | | |
529 | | - | |
| 546 | + | |
530 | 547 | | |
531 | 548 | | |
532 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| |||
0 commit comments
Comments
(0)