【发布时间】:2014-02-18 15:18:13
【问题描述】:
我有灰度图像,我想看看它的 byte[] 有没有办法做到这一点?
这里我得到了 grayscaleimage ;
private void OnImage(NGrayscaleImage nImage)
{
}
我想把它发送到这个函数;
private void SendBiometricInfo(byte[] imageBuffer, int imageWidth, int imageHeight)
{
}
有没有办法做到这一点?如果是这样,你能帮我处理这个问题吗?
这是我尝试过的......
private void OnImage(NGrayscaleImage nImage)
{
OnImageByte(ImageToByte(nImage), nImage.Width, nImage.Height);
//However here it says there is an invalid arguments.
}
public static byte[] ImageToByte(Image img)
{
ImageConverter converter = new ImageConverter();
return (byte[])converter.ConvertTo(img, typeof(byte[]));
}
void OnImageByte(byte[] imgBuffer, int width, int height)
{
}
【问题讨论】:
-
什么是
NGrayscaleImage?您目前尝试的方法有什么问题? -
你想看什么?它以 GIF 的形式表示? PNG? BMP?
-
我可以使用 nImage.Save() 函数,我可以将它保存为 jpg。
-
@musefan 我使用的是 .dll,所以它是一种图像格式。
-
@goGud:我们对此一无所知...当您使用未知课程时,您希望我们如何帮助您?您需要提供有关该课程的更多信息