Re: Matplotlib import image as float32

2019-07-05 Thread Thomas Jollans
On 01/07/2019 21:08, Markos wrote: > Hi, > > I observed that matplotlib reads an image file (PNG) as float32: > > Please, how to read this file as int8 to get RGB in range of 0-255? You may want to try a different library. scikit-image's imread function will give you the image as an integer arr

Re: Matplotlib import image as float32

2019-07-02 Thread Markos
Em 01-07-2019 18:03, Chris Angelico escreveu: On Tue, Jul 2, 2019 at 6:59 AM Markos wrote: Hi, I observed that matplotlib reads an image file (PNG) as float32: Please, how to read this file as int8 to get RGB in range of 0-255? Thank you, Markos import numpy as np import matplotlib.pyplot

Re: Matplotlib import image as float32

2019-07-01 Thread Chris Angelico
On Tue, Jul 2, 2019 at 6:59 AM Markos wrote: > > Hi, > > I observed that matplotlib reads an image file (PNG) as float32: > > Please, how to read this file as int8 to get RGB in range of 0-255? > > Thank you, > > Markos > > >import numpy as np > > >import matplotlib.pyplot as plt > > >import matpl

Matplotlib import image as float32

2019-07-01 Thread Markos
Hi, I observed that matplotlib reads an image file (PNG) as float32: Please, how to read this file as int8 to get RGB in range of 0-255? Thank you, Markos import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg imagem = mpimg.imread('lenna.png') print