魔杖图像始终使背景透明

时间:2019-11-29 10:01:28

标签: python image pdf imagemagick wand

我尝试了很多事情,但是无法生成白色背景图像,这里我使用pdf文件将其转换为图像。但是它永远不会生成带有pdf页面颜色的图像,它始终是透明的。抱歉,我是Wand的新手。我正在使用png作为格式输入。

with Image(
        filename=file_path,
        resolution=self.default_resolution,
        format=self.format
    ) as img:
        img.compression_quality = self.default_compression

        img.save(
            filename=path.join(
                self.attachment_path,
                self.get_file_name_without_type() + self.format
            )
        )

This is pdf file screenshot

This is generated file screenshot

0 个答案:

没有答案
相关问题