如何使用C#读取8位灰度JPEG图像?我需要此代码 [英] How to read a 8-bit grayscale JPEG image using C#?i need this code

查看:317
本文介绍了如何使用C#读取8位灰度JPEG图像?我需要此代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用C#读取8位灰度JPEG图像?
我需要此代码

How to read a 8-bit grayscale JPEG image using C#?
i need this code

推荐答案

只需使用Image.FromFile.


这取决于您对读取"的理解.您是否需要访问位图中的位并使用此数据进行操作,还是只需要在屏幕上绘制它.在需要位数据的情况下也很重要:您需要只读还是读写数据?

在这两种情况下,它还取决于您需要使用什么(System.Drawing或WPF)-解决方案将完全不同.我认为有六个变体.不,我不会全部回答.正确标记您的问题,并准确询问您要如何处理数据.

—SA
It depends on what do you mean by "read". Do you need to access the bits in a bitmap and manipulate with this data or you just needs to draw it on screen. Also important in case you need bit data: do you need it read-only or read-write?

In both cases it also depends on what do you need to use, System.Drawing or WPF — the solutions will be quite different. Six variants, by my count. No, I''m not going to answer them all. Tag your question properly and ask exactly what do you want to do with data.

—SA


这篇关于如何使用C#读取8位灰度JPEG图像?我需要此代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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