Python matplotlib._png.read_png_int() Examples

The following are 4 code examples of matplotlib._png.read_png_int(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module matplotlib._png , or try the search function .
Example #1
Source File: test_png.py    From neural-network-animation with MIT License 6 votes vote down vote up
def test_imread_png_uint16():
    from matplotlib import _png
    img = _png.read_png_int(os.path.join(os.path.dirname(__file__),
                                     'baseline_images/test_png/uint16.png'))

    assert (img.dtype == np.uint16)
    assert np.sum(img.flatten()) == 134184960 
Example #2
Source File: test_png.py    From python3_ios with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_imread_png_uint16():
    from matplotlib import _png
    img = _png.read_png_int(os.path.join(os.path.dirname(__file__),
                                     'baseline_images/test_png/uint16.png'))

    assert (img.dtype == np.uint16)
    assert np.sum(img.flatten()) == 134184960 
Example #3
Source File: test_png.py    From coffeegrindsize with MIT License 5 votes vote down vote up
def test_imread_png_uint16():
    from matplotlib import _png
    img = _png.read_png_int(os.path.join(os.path.dirname(__file__),
                                     'baseline_images/test_png/uint16.png'))

    assert (img.dtype == np.uint16)
    assert np.sum(img.flatten()) == 134184960 
Example #4
Source File: test_png.py    From twitter-stock-recommendation with MIT License 5 votes vote down vote up
def test_imread_png_uint16():
    from matplotlib import _png
    img = _png.read_png_int(os.path.join(os.path.dirname(__file__),
                                     'baseline_images/test_png/uint16.png'))

    assert (img.dtype == np.uint16)
    assert np.sum(img.flatten()) == 134184960