Qt Painter和Image保存
来源:互联网 发布:php调用百度地图api 编辑:程序博客网 时间:2024/06/04 18:06
void playPainter() { QSize size(200,200); QImage picture(size, QImage::Format_RGB32); picture.fill(32); QPainter painter; painter.begin(&picture); painter.setRenderHint(QPainter::Antialiasing); painter.setBackgroundMode(Qt::TransparentMode); QPen pen; QColor color(255,0,0); pen.setColor(color); pen.setWidth(5); pen.setCapStyle(Qt::RoundCap); painter.setPen(pen); painter.drawEllipse(10,10, 80,80); painter.end(); QImageWriter imagefile; imagefile.setFileName("circle.png"); imagefile.setFormat("png"); imagefile.setQuality(100); qDebug()<< imagefile.write(picture)<<imagefile.errorString();}
画画保存图片挺好玩的
Question:
不知道有没有算法可以把图片转成可读文本, 然后由Qt读取文本再还原图片 (不是Pixmap)
0 0
- Qt Painter和Image保存
- docker image保存和恢复
- Qt painter drawPolyline in paintEvent
- 06_高级painter、保存、打印、预览
- Painter
- Painter
- Qt文件的打开和保存
- Qt读取和保存GB2312编码(Qt4)
- Qt打开读取和保存写入文件
- QT打开和保存文件对话框
- QT打开和保存文件对话框
- 保存全屏为image
- 保存全屏为image
- Qt 向导 image slider
- Qt load image
- Qt-Image Viewer Example
- Qt image load path
- qt error: variable `QPainter painter' has initializer but incomplete type
- 数据结构《14》----并查集 Union-Find
- 快速排序算法的应用
- [linux]进程(四)——进程的创建
- C语言头文件编写的几个基本规则
- contextClassLoader问题
- Qt Painter和Image保存
- java基础之集合框架
- 取石子问题
- VIM 命令
- 领带的打法10种——男士必看(图)
- Vijos P1103 校门外的树
- SmartRF04Prog 显示“Could not open the hex-file” 解决方法
- LeetCode - Reverse Integer
- 深入理解CRITICAL_SECTION