在Qt中处理非常大的图像

编程入门 行业动态 更新时间:2024-10-25 22:32:50
本文介绍了在Qt中处理非常大的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我无法让Qt处理超过10,000X10,000的图片。我处理的是大约2GB的巨大卫星图像。我考虑使用内存映射,但映像仍占用内存中的空间。

I can't get Qt to work on images beyond 10,000X10,000. I'm dealing with huge satellite images that are around 2GB each. I considered using memory mapping but the image still occupies space in memory.

QFile file("c://qt//a.ras"); file.open(QIODevice::ReadOnly); qint64 size = file.size(); uchar *img=file.map(0,size); QImage I(img,w,h,QImage::Format_ARGB32);

任何人都能告诉我一种更有效的方式来处理Qt中的大图片?

Can anyone tell me a more efficient way to deal with large images in Qt?

推荐答案

Qgraphicsview 和一组图像图块,视图处理所有的滚动和世界坐标为你。 然后你只需要将图像预先切成瓷砖或提前一段图像数据

Qgraphicsview and a set of image tiles, the view handles all the scrolling and world coords for you. Then you just have to either pre-chop the images into tiles in advance or pull a section of image data on the fly

更多推荐

在Qt中处理非常大的图像

本文发布于:2023-11-11 10:59:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1578239.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:非常大   图像   Qt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!