• 7523阅读
  • 4回复

【提问】qt中连续显示图片的问题 [复制链接]

上一主题 下一主题
离线richer1981
 

只看楼主 倒序阅读 楼主  发表于: 2005-08-25
我编的程序想从一个远程摄像头上读取连续的视频流,因为是用的http机制,所以读远程的图片我用了QHttp::get()函数,但是如果仅仅是读取一个静态的图片,用get()函数实现读取和在本地显示都没有问题,但是读取连续变化的图片好象不能实现,不知道有没有更好的方法利用qt的哪个库函数可以实现好一点,最好不要用socket编程,谢谢
[ 此贴被XChinux在2005-08-25 16:11重新编辑 ]
离线keisuo

只看该作者 1楼 发表于: 2007-05-11
qt/e怎么显示jpeg和gif图片?
回答"
configure 的时候 -gif 就能显示gif图了
-system-jpeg 表示有外部的libjpeg支持, 一般pc上有这个库。交叉编译的时候可能需要把libjpeg也交叉编译一下
离线keisuo

只看该作者 2楼 发表于: 2007-05-11
请教--有关板子上显示JPEG图片产生的问题。。。!
大家好!
最近我重新编译了QTE的库,在./configure 后面加了参数-system-jpeg,然后把生成的库下载到了板子上(板子上有JPEG的库),启动板子上的QT,可以显示JPEG的图片。但是我们的触摸屏用不了了,一进入系统没有光标键头,只能切换到用鼠标来操作。
请问这个问题要如何解决?
谢谢大家帮忙 。。!文字文字

回答"
在编译的时候需要把TSLIB的库一起编译.
这样触摸屏就可以用了。
离线keisuo

只看该作者 3楼 发表于: 2007-05-11
qt文档中对qimage和qpixmap的比较解释
The QImage class provides a hardware-independent pixmap representation with direct access to the pixel data.
It is one of the two classes Qt provides for dealing with images, the other being QPixmap. QImage is designed and optimized for I/O and for direct pixel access/manipulation. QPixmap is designed and optimized for drawing. There are (slow) functions to convert between QImage and QPixmap: QPixmap::convertToImage() and QPixmap::convertFromImage().

One common use of the QPixmap class is to enable smooth updating of widgets. Whenever something complex needs to be drawn, you can use a pixmap to obtain flicker-free drawing, like this:
Create a pixmap with the same size as the widget.
Fill the pixmap with the widget background color.
Paint the pixmap.
bitBlt() the pixmap contents onto the widget.
对照文档的解释,再看看两个类分别提供的函数,我的理解是:
1. 二者功能有重叠部分,如都可以获得height, width等参数;
2. 如果想对图片的内容进行加工处理,使用qpixmap+qpainter;
3. 如果是把图片当作一个整体来操作,如放大缩小,使用qimage.
离线keisuo

只看该作者 4楼 发表于: 2007-05-28
已经解决
快速回复
限100 字节
 
上一个 下一个