如何在Windows窗体应用程序中加载大小(20000X20000)像素的32bppArgb位图? [英] How to load a 32bppArgb bitmap of size (20000X20000) pixels in a windows form Application?

查看:126
本文介绍了如何在Windows窗体应用程序中加载大小(20000X20000)像素的32bppArgb位图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#.Net 4.5开发GIS应用程序。我需要在画布中加载巨大的位图。如果图像很小,它可以正常工作。有人pl。帮我加载大图像进行图像处理。

解决方案

请看我对这个问题的评论。您需要提供其他信息。同时,如果您的图像真的很大,请查看我过去的答案以获得一些一般性的想法:

用C#读取大图像 [ ^ ]。



-SA

真的很简单。你不能。 Windows GDI不支持那么大的图像。由于地球上的监视器不能同时显示如此巨大的图像,因此尝试将其全部加载到GDI中是相当无用的。不要加载你真正看不到的东西。



你必须打破大量的图像,然后输入较小的单个图像,比如一边250像素,然后只加载你想要的图像并显示它们。


I am developing a GIS application in C# .Net 4.5. I need to load huge bitmaps in my canvas. In case of small images it works fine. Somebody pl. help me to load large images for image processing.

解决方案

Please see my comment to the question. You need to provide additional information. In the meanwhile, please see my past answer for some general idea, in case your images are really big:
Read Large Images in C#[^].

—SA


It''s simple really. You can''t. Windows GDI doesn''t support images that big. Since no monitor on this earth can display such a huge image all at once, trying to load it all into GDI is pretty useless. Don''t load what you really can''t see.

You have to break the massive image down imput smaller individual images, say 250 pixels on a side and then load only those images you want and display them.


这篇关于如何在Windows窗体应用程序中加载大小(20000X20000)像素的32bppArgb位图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆