Improve quality of Wand conversion

前端 未结 1 908
天涯浪人
天涯浪人 2020-12-15 19:09

I convert files of different formats (JPEG, PNG, TIFF, PDF) to JPEG using Wand, a ctypes-based ImageMagick binding for Python. The resulting files are very low-quality. If t

1条回答
  •  粉色の甜心
    2020-12-15 19:47

    This would help you. Pass resolution option to the constructor of Image e.g.:

    with Image(filename='file.pdf', resolution=200) as image:
        image.compression_quality = 99
        image.save(filename='file.jpg')
    

    0 讨论(0)
提交回复
热议问题