谨以此文献给那些热爱图像编程的朋友(由于内容较多,仅选7篇)6

BlueDeepOcean 2006-04-14 10:22:17
pic format

pic format

pic files contain images in an uncompressed format. both the original animator
and animator pro from autodesk produce pic files. the file formats are
different; animator pro produces a hierarchial block oriented file, while the
original animator file is a simpler fixed format. see pic(pro) for further
information on the animator pro pic format.

the original animator uses this format to store a single-frame picture image.
this format description applies to both pic and original animator cel files. the
file begins with a 32 byte header, as follows:

offset count type description
0000h 1 word id=9119h
0002h 1 word width of image; pic files have always a width
of 320, cel images may have any value.
0004h 1 word height of image, 200 for a pic, any value for
a cel file.
0006h 1 word x offset of image, always 0 for a pic image,
may be nonzero in a cel image.
0008h 1 word y offset of image. zero for a pic file.
000ah 1 byte bits per pixel (8)
000bh 1 byte compresion flag, always zero
000ch 1 dword size of the image data in bytes
0010h 16 byte reserved(0)

immediately following the header is the color map. it contains all 256 palette
entries in rgb order. each of the r, g, and b components is a single byte in the
range of 0-63. following the color palette is the image data, one byte per
pixel, from left to right, top to bottom.
--------------------------------------------------------------------------------
...全文
187 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
BlueDeepOcean 2006-04-14
  • 打赏
  • 举报
回复

pic(pro) format


this format description applies to both pic and msk files created with the
autodesk animator pro package. the file begins with a 64-byte header defined
as follows:

offset length name description
0000h 1 dword the size of the whole file including the size
of this header.
0004h 1 word id=9500h
0006h 1 word width of the image
0008h 1 word height of the image
000ah 1 word x offset of image
000ch 1 word y offset of image
000eh 1 dword user id, set to zero
0012h 1 byte bits per pixel (8 for pic, 1 for msk)
0013h 45 byte reserved (0)

following the file header are the data blocks for the image. each data block
within a pic or msk file is formatted as follows:

offset count type description
0000h 1 dword the size of the block, including this header.
0004h 1 word data type id :
0 - color palette info
1 - byte-per-pixel image data
2 - bit-per-pixel mask data
0006h ? byte data

the type values in the block headers indicate what type of graphics data the
block contains.

in a pic_cmap block, the first 2-byte word is a version code;
currently this is set to zero. following the version word are all 256 palette
entries in rgb order. each of the r, g, and b components is a single byte in the
range of 0-255. this type of block appears in pic files; there will generally be
no color map block in a msk file.

in a pic_bytepixels block, the image data appears immediately following the
6-byte block header. the data is stored as one byte per pixel, in left-to-right,
topd to-bottom sequence.

in a pic_bitpixels block, the bitmap data appears immediately following the
6-byte block header. the data is stored as bits packed into bytes such that the
leftmost bits appear in the high-order positions of each byte. the bits are
stored in left-to-right, top-to bottom sequence. when the width of the bitmap is
not a multiple of 8, there will be unused bits in the low order positions of the
last byte on each line. the number of bytes per line is ((width+7)/8). this type
of block appears in msk files.

604

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder VCL组件使用和开发
社区管理员
  • VCL组件使用和开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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