How to convert this command to a python code using Wand & ImageMagick
问题 I want to convert an image so I can read it better using pyocr & tesseract. The Command line I want to convert to python is : convert pic.png -background white -flatten -resize 300% pic_2.png Using python Wand I managed to resize it but I don't know how to do the flattend and the white background My try : from wand.image import Image with Image(filename='pic.png') as image: image.resize(270, 33) #Can I use 300% directly ? image.save(filename='pic2.png') Please help Edit, Here is the image to