'Pixmap' object has no attribute 'writePNG'
时间: 2023-10-03 19:07:31 浏览: 197
'Pixmap' object has no attribute 'writePNG'这个报错是因为在引用中的代码中,使用的'Pixmap'对象没有writePNG方法。要解决这个问题,可以根据引用中的调通要点,使用save方法替代writePNG方法来保存图片。具体来说,可以将代码中的pix.writePNG(pic_filepath)替换为pix.save(pic_filepath)。这样就可以避免报错了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [python处理PDF-通过关键词定位-截取PDF中的图表](https://blog.csdn.net/weixin_44602176/article/details/129362353)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [python提取pdf图片报错AttributeError: ‘Pixmap‘ object has no attribute ‘writePNG](https://blog.csdn.net/m0_54783845/article/details/125797337)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文