I am using these libraries:
import matplotlib.pyplot as plt
from PIL import Image as im
My code is as follows:
fig = plt.figure(dpi=250) #
ax1 = fig.add_subplot(2, 1, 1)
pos1 =ax1.imshow(amplitud_DCO08,cmap='gray')
ax1.title.set_text('Amplitud del DCO')
fig.savefig('AmplitudDCO_escalado08',dpi=250, format='bmp')
I am trying to save the image using the following line of code:
fig.savefig('AmplitudDCO_escalado08',dpi=250, format='bmp')
However this shows me the error:
Format 'bmp' is not supported(supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff).
I need an image in .bmp
format, because I need it quantized at 8 bits. How can I solve this problem? Or there is another way to save an imagen in .bmp
format?