紧急,紧急,用vc如何实现*.raw格式文件的读取

womanlee 2003-03-12 10:04:57
感激不尽,这是同学考试的题目,各位大侠,给个代码吧
...全文
615 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
flysundy 2003-03-15
  • 打赏
  • 举报
回复
raw格式图象是最简单的图象格式,它没有文件头等信息,只有位图图象数据
womanlee 2003-03-14
  • 打赏
  • 举报
回复
prog_st(st) 大侠,用不用来段e文啊,看不懂
prog_st 2003-03-14
  • 打赏
  • 举报
回复
THE RAW (GRAPHICS) FORMAT


This is an easy file format for the developer, but sometimes a nightmare for the user. :-)



Basically, It's a raw format. There is no predefined format, not even for Image width and height, nor palettes, etc. The raw format is basically a type of import/export format rather than a storage format. For some systems and\or applications it’s a direct dump of the memory section containing the graphics information. Which means that encoding may depend on the graphics card memory arrangement itself. When opening a raw graphic format, the width and height must be specified usually, as well as when the picture data starts. There's other properties that needs to be specified sometimes. A raw file could be as simple as a stream of RGB values or as complex as random numbers as a header file with planar CMYK settings appended afterwards.



There's no standard between image viewers\painters. Some can write 16-bit and indexed colour graphics, but only read 16-bits or indexed colours. Some probably support RLE encoding.



RGB is not always the colour information being recorded in the file, it can also be encoded as grayscale, monochrome bitmap, indexed colours, CMY, CMYK, HSV, HSB, or even L*a*b models.



Here's some ways a raw image could be encoded:

RGB [R Byte] [G Byte] [B Byte] [R Byte] [G Byte] [B Byte] ...

BGR [B Byte] [G Byte] [R Byte] [B Byte] [G Byte] [R Byte] ...

CMY [C Byte] [M Byte] [Y Byte] [C Byte] [M Byte] [Y Byte] ...

CMYK [C Byte] [M Byte] [Y Byte] [K Byte] [C Byte] [M Byte] ...

Planar RGB [R] [R] [R] [R] ... [G] [G] [G] [G] ... [B] [B] [B] [B] ...





Image values could also start from the bottom and proceed to the top (like

the Windows BMP format).

luming068 2003-03-14
  • 打赏
  • 举报
回复
那里有显示它的源代码?
jack_wq 2003-03-14
  • 打赏
  • 举报
回复
*.raw图像应该是裸图像,直接读取就可以了!
luming068 2003-03-14
  • 打赏
  • 举报
回复
能不能说详细一点,我是菜鸟,我也想知道!
flysundy 2003-03-13
  • 打赏
  • 举报
回复
用cfile类
CFILE file(pszFileName,CFile::modeRead);
pszFileName为文件路径
lookingsky 2003-03-12
  • 打赏
  • 举报
回复
是啊,我也很想知道,有谁会的,说一下啊,

19,468

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧