8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 332edf0 commit e0fab0dCopy full SHA for e0fab0d
lib/matplotlib/tests/test_image.py
@@ -511,6 +511,18 @@ def test_nonuniformimage_setnorm():
511
im.set_norm(plt.Normalize())
512
513
514
+@needs_pillow
515
+def test_jpeg_2d():
516
+ # smoke test that mode-L pillow images work.
517
+ imd = np.ones((10, 10), dtype='uint8')
518
+ for i in range(10):
519
+ imd[i, :] = np.linspace(0.0, 1.0, 10) * 255
520
+ im = Image.new('L', (10, 10))
521
+ im.putdata(imd.flatten())
522
+ fig, ax = plt.subplots()
523
+ ax.imshow(im)
524
+
525
526
@needs_pillow
527
def test_jpeg_alpha():
528
plt.figure(figsize=(1, 1), dpi=300)
0 commit comments