原始图像绘图 [英] Raw Image Drawing

查看:60
本文介绍了原始图像绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

目前我正在使用C#.NET处理原始图像。我希望在我的图片框中看到它。我可以将该图像文件读取为字节数组。但是我无法显示如果我尝试显示(绘制)该文件像其他文件(JPEG,GIF等..)。它抛出参数无效的异常.my文件大小是153700字节。简单地说如何使用数组值绘制图像C#.NET。

请任何人帮助我,这是我项目的主要问题。


感谢和问候

rajesh。

Hi All,
currently i am working with raw images using C#.NET .i want to darw in my picture box.i can read that image file as byte array.but i could not display the same .if i try to display (draw) that file like other files(JPEG,GIF etc..).it throws the parameter invalid exception .my file size is 153700 bytes.simply said how to draw a image from array values using C#.NET.
please any one help me,this is the major problem of my project.

thanks and regards
rajesh.

推荐答案

本文可能有所帮助:
使用ASP.NET绘制Serpinski的三角形



文章可能有所帮助:
绘制Serpinski''三角形与ASP.NET



嗨kenobewan,

感谢您考虑我。我试过这个链接,但是我遇到了同样的问题。我必须详细解释我的情况。请帮助我。我是这个.NET环境的新手。


我想绘制医学图像。它是从红外摄像机拍摄的彩色原始图像。图像有153700字节。每像素的比特是2.最后100个字节是不需要的信息。因此,图像有76800像素(我想画320 * 240图像)。我可以通过这段代码阅读图片


FileStream fs = new FileStream(@Image Location",FileMode.Open);


byte [] image = new byte [fs.Length-100];


BinaryReader br = new BinaryReader(fs);


br。读取(图像,0,(int)fs.Length-100);


此外,我可以将这两个字节拆分为两个。为了绘制这些图像值,我将如何继续。我通过成功转换为.bmp格式绘制了这个图像,我需要绘制原始图像而不丢失任何信息。

GDI +和.NET中的其他方法仅支持一些标准格式,如.jpg, .gif,.tiff等...所以我必须逐字节绘制..请帮助,我该怎么做。


谢谢和问候

rajesh,


Hi kenobewan ,
Thanks to consider me. I have tried this link, But i''m in the same problem.I have to explain my situation in detail.Please help me.I''m new to this .NET environment.

I want to draw a medical image .Its a color raw image which is taken from IR camera.The image has 153700 bytes.Byte per pixel is 2.The last 100 bytes are unwanted information.So,the image has 76800 pixels(i want to draw 320*240 image). I can read the image by this code

FileStream fs = new FileStream (@"Image Location", FileMode.Open);

byte[] image = new byte[fs.Length-100];

BinaryReader br= new BinaryReader(fs);

br.Read(image,0,(int)fs.Length-100);

Also i can split these bytes as two by two.To draw these image values,how i can proceed.i drew this image by convert to .bmp format successfully,I need to draw as raw image with out any loss of information.
GDI+ and other methods in .NET only supporting some Standard formats like .jpg,.gif,.tiff etc...So i have to draw byte by byte..please help,How can i do this.

thanks and regards
rajesh,


我希望这篇文章会更有帮助:
大图像的二进制流来自数据库
I hope that this article will be more helpful:
Binary streaming of large images from Database


这篇关于原始图像绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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