I can show rgba image using pyplot.imshow(image,alpha=0.8)
.
I tried to save image using pyplot.savefig()
, but image included padding is saved.
I want to save only image which not have padding.
I can show rgba image using pyplot.imshow(image,alpha=0.8)
.
I tried to save image using pyplot.savefig()
, but image included padding is saved.
I want to save only image which not have padding.
can you use: pyplot.savefig()
instead of pyplot.saveconfig()?
if yes, then you can use bbox_inches='tight'
to remove or reduce margins and padding around the image:
solution one:
pyplot.savefig('test.png', bbox_inches='tight')