介绍
最近做了一个长图分割的小工具(GitHub),记录一下用到的两个类QImage、QPixmap还有控件QLabel以及ScrollArea。
Qt provides four classes for handling image data: QImage, QPixmap, QBitmap and QPicture. QImage is designed and optimized for I/O, and for direct pixel access and manipulation, while QPixmap is designed and optimized for showing images on screen.

本文介绍了使用Qt进行图像显示和裁剪的方法。通过QImage读取和操作图像,QLabel结合QPixmap展示图片,使用ScrollArea解决显示不全的问题。还探讨了如何确定用户点击图像的位置以及利用QImage的copy方法进行图片分割。
最低0.47元/天 解锁文章
9988

被折叠的 条评论
为什么被折叠?



