如何将PNG文件读取到数组? [英] how can iread PNG file to a array ?

查看:62
本文介绍了如何将PNG文件读取到数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要读取png文件以排列并检测标头和pixcell数据,请帮助我.
tanx a milion

i need to read png file to array and detect header and pixcell data,please help me.
tanx a milion

推荐答案

将图像读入Bitmap对象,并传递文件名.您可以使用Bitmap.LockBits方法访问像素数据.访问后,完成Bitmap.UnlockBits.

如果您确实需要读取标题,则将需要FileStream对象和很多勇气. http://www.libpng.org/pub/png/spec/ [
Read the image into a Bitmap object passing it the filename. You can access the pixel data using the method Bitmap.LockBits. After accessing, finish with Bitmap.UnlockBits.

If you really need to read the header, you''ll need a FileStream object and a lot of courage. http://www.libpng.org/pub/png/spec/[^]


这篇关于如何将PNG文件读取到数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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