如何在BMP文件结构中定义数据类型FXPT2DOT30?

时间:2014-01-01 01:13:04

标签: bmp

FXPT2DOT30类型出现在为BMP文件定义结构CIEXYZ时, 根据微软提供的定义:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd371828(v=vs.85).aspx

但是,我无法在任何地方找到FXPT2DOT30的确切定义。 它的确切定义是什么? 应该保留什么样的数据?

3 个答案:

答案 0 :(得分:5)

@RobinGreen提供了link

这是我的问题的答案:

  

[...] FXPT2DOT30 [...]这意味着它们被解释为具有2位整数部分和30位小数部分的定点值。

答案 1 :(得分:0)

根据fileformat.info,这是BITMAPV4HEADER结构的解压缩版本。 CSTypeGammaRed之间的字段对应CIEXYZTRIPLE bV4Endpoints中的BITMAPV4HEADER

typedef struct _Win4xBitmapHeader
{
    DWORD Size;            /* Size of this header in bytes */
    LONG  Width;           /* Image width in pixels */
    LONG  Height;          /* Image height in pixels */
    WORD  Planes;          /* Number of color planes */
    WORD  BitsPerPixel;    /* Number of bits per pixel */
    DWORD Compression;     /* Compression methods used */
    DWORD SizeOfBitmap;    /* Size of bitmap in bytes */
    LONG  HorzResolution;  /* Horizontal resolution in pixels per meter */
    LONG  VertResolution;  /* Vertical resolution in pixels per meter */
    DWORD ColorsUsed;      /* Number of colors in the image */
    DWORD ColorsImportant; /* Minimum number of important colors */
    /* Fields added for Windows 4.x follow this line */

    DWORD RedMask;       /* Mask identifying bits of red component */
    DWORD GreenMask;     /* Mask identifying bits of green component */
    DWORD BlueMask;      /* Mask identifying bits of blue component */
    DWORD AlphaMask;     /* Mask identifying bits of alpha component */
    DWORD CSType;        /* Color space type */
    LONG  RedX;          /* X coordinate of red endpoint */
    LONG  RedY;          /* Y coordinate of red endpoint */
    LONG  RedZ;          /* Z coordinate of red endpoint */
    LONG  GreenX;        /* X coordinate of green endpoint */
    LONG  GreenY;        /* Y coordinate of green endpoint */
    LONG  GreenZ;        /* Z coordinate of green endpoint */
    LONG  BlueX;         /* X coordinate of blue endpoint */
    LONG  BlueY;         /* Y coordinate of blue endpoint */
    LONG  BlueZ;         /* Z coordinate of blue endpoint */
    DWORD GammaRed;      /* Gamma red coordinate scale value */
    DWORD GammaGreen;    /* Gamma green coordinate scale value */
    DWORD GammaBlue;     /* Gamma blue coordinate scale value */
} WIN4XBITMAPHEADER;

答案 2 :(得分:0)

来自gdiplus.h

typedef long FXPT2DOT30, FAR *LPFXPT2DOT30;

typedef struct tagCIEXYZ
{
        FXPT2DOT30 ciexyzX;
        FXPT2DOT30 ciexyzY;
        FXPT2DOT30 ciexyzZ;
} CIEXYZ;