如何从数据镜像构建像素图像? [英] How do I construct a pixel image from a data mirror?

查看:69
本文介绍了如何从数据镜像构建像素图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我得到一个API,将像素图像数据放在以下界面中。现在我必须实现其内容。



Hello,

I get an API that puts pixel image data in the following interface. Now I have to implement its body of content.

getImageData(
	int nDimX,		// x-dimension of data field
	int nDimY,		// y-dimension of data field
	double	*dpData,	// image data field

	double	dXStart,	// x-coordinate of center of first pixel
	double	dXEnd,		// x-coordinate of center of last pixel
	double	dYStart,	// y-coordinate of center of first pixel
	double	dYEnd)		// y-coordinate of center of last pixel





我尝试应对它;遗憾的是,关于API的信息并不多。只有我知道* dpData是按行存储的。 x0x0,x1y0,... x0y1,x1y1。并且数据在x轴上镜像。



我没有图像处理编程经验。有没有人有用于处理图像的示例代码或建议的库?谢谢你的帮助!



I try to cope with it; unfortunately, there are not so much information about the API. Only I know the *dpData is stored line wise. x0x0, x1y0, … x0y1, x1y1. and the data is mirrored at the x axis.

I don't have experience in image process programming. does anyone have sample code or suggested library to use to handle the image? thanks for your help!

推荐答案

它取决于你在Windows上运行什么系统,你最好使用位图和GDI。



我最喜欢的关于使用位图的 CXImage



要设置像素,可以使用 SetPixel 在DC中加载后。 Adavanced直接访问位图的内存。
it depends on what system for are working on Windows you best use bitmaps and the GDI.

My favourite articel CXImage about working with bitmaps.

To set a pixel you can use the SetPixel after loading it in a DC. Adavanced is directly access the memory of the bitmap.


这篇关于如何从数据镜像构建像素图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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