获取图像的宽度和高度没有在.NET中加载图像? [英] Obtain image width and height without loading image in .NET?

查看:119
本文介绍了获取图像的宽度和高度没有在.NET中加载图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

之类的标题,这可能吗?

Like the Title, is this possible?

我只需要的宽度和高度,所以在加载图像入柱塞是不必要的。

I only need the width and height, so loading the image into ram would be unnecessary.

推荐答案

检查这太问题: http://stackoverflow.com/questions/ 111345

此向您介绍如何提取映像头信息而不读取整个文件。通常情况下,图像文件包含含除了其他数据的宽度和高度开始的元数据,以便将检索信息的最快捷的方式。

This shows you how to extract this information from the image header without reading the entire file. Usually, the image files contain metadata at the start containing width and height in addition to other data, so that will be the quickest way of retrieving this information.

这篇关于获取图像的宽度和高度没有在.NET中加载图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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