qcustomplot保存图片为黑白图片
时间: 2024-04-24 18:27:42 浏览: 61
将彩色图片转换为黑白
根据引用\[2\]中的信息,QCustomPlot提供了保存图片的接口,其中包括保存为黑白图片的选项。你可以使用以下接口来保存图片为黑白图片:
saveBmp(const QString &fileName, int width, int height, double scale, int resolution, QCP::ResolutionUnit resolutionUnit);
saveJpg(const QString &fileName, int width, int height, double scale, int quality, int resolution, QCP::ResolutionUnit resolutionUnit);
savePng(const QString &fileName, int width, int height, double scale, int quality, int resolution, QCP::ResolutionUnit resolutionUnit);
savePdf(const QString &fileName, int width, int height, QCP::ExportPen exportPen, const QString &pdfCreator, const QString &pdfTitle);
你可以选择其中一个接口,并设置相应的参数来保存图片为黑白图片。
#### 引用[.reference_title]
- *1* [79.qt qml-如何在QML中使用QCustomPlot之曲线/折线示例(已适配黑白风格)](https://blog.csdn.net/qq_37997682/article/details/129843662)[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^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [QCustomPlot将绘制的图形导出成文档或者图片](https://blog.csdn.net/lj19990824/article/details/123206780)[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^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文