BITMAPV5HEADER
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bV5Size | DWORD | 4 | +0 | +0 | この構造体が必要とするバイト数です。アプリケーションは、どのビットマップ情報ヘッダー構造体が使用されているかを判別するために、このメンバーを使用してください。 | ||||||||||||||||||||
| bV5Width | INT | 4 | +4 | +4 | ビットマップの幅(ピクセル単位)です。 bV5Compression が BI_JPEG または BI_PNG の場合、bV5Width メンバーは展開後の JPEG または PNG 画像の幅をピクセル単位で指定します。 | ||||||||||||||||||||
| bV5Height | INT | 4 | +8 | +8 | ビットマップの高さ(ピクセル単位)です。bV5Height の値が正の場合、ビットマップはボトムアップ DIB であり、原点は左下隅になります。bV5Height の値が負の場合、ビットマップはトップダウン DIB であり、原点は左上隅になります。 bV5Height が負(トップダウン DIB を示す)の場合、bV5Compression は BI_RGB または BI_BITFIELDS のいずれかでなければなりません。トップダウン DIB は圧縮できません。 bV5Compression が BI_JPEG または BI_PNG の場合、bV5Height メンバーは展開後の JPEG または PNG 画像の高さをピクセル単位で指定します。 | ||||||||||||||||||||
| bV5Planes | WORD | 2 | +12 | +12 | 対象デバイスのプレーン数です。この値は 1 に設定しなければなりません。 | ||||||||||||||||||||
| bV5BitCount | WORD | 2 | +14 | +14 | 各ピクセルを定義するビット数、およびビットマップ内の最大色数です。 このメンバーには、次のいずれかの値を指定できます。
| ||||||||||||||||||||
| bV5Compression | BI_COMPRESSION | 4 | +16 | +16 | ビットマップが圧縮されていないことを指定します。bV5RedMask、bV5GreenMask、bV5BlueMask の各メンバーが、各ピクセルの赤、緑、青の成分を指定します。これは 16 bpp および 32 bpp のビットマップで使用する場合に有効です。このメンバーには、次のいずれかの値を指定できます。
| ||||||||||||||||||||
| bV5SizeImage | DWORD | 4 | +20 | +20 | 画像のサイズ(バイト単位)です。BI_RGB のビットマップでは 0 を設定できます。 bV5Compression が BI_JPEG または BI_PNG の場合、bV5SizeImage は JPEG または PNG 画像バッファーのサイズです。 | ||||||||||||||||||||
| bV5XPelsPerMeter | INT | 4 | +24 | +24 | ビットマップの対象デバイスの水平解像度(1 メートルあたりのピクセル数)です。アプリケーションはこの値を使用して、現在のデバイスの特性に最も適したビットマップをリソースグループから選択できます。 | ||||||||||||||||||||
| bV5YPelsPerMeter | INT | 4 | +28 | +28 | ビットマップの対象デバイスの垂直解像度(1 メートルあたりのピクセル数)です。 | ||||||||||||||||||||
| bV5ClrUsed | DWORD | 4 | +32 | +32 | ビットマップが実際に使用する、カラーテーブル内のカラーインデックスの数です。この値が 0 の場合、ビットマップは、bV5Compression で指定された圧縮モードにおける bV5BitCount メンバーの値に対応する最大数の色を使用します。 bV5ClrUsed が 0 以外で bV5BitCount が 16 未満の場合、bV5ClrUsed メンバーは、グラフィックスエンジンまたはデバイスドライバーがアクセスする実際の色数を指定します。bV5BitCount が 16 以上の場合、bV5ClrUsed メンバーは、システムカラーパレットのパフォーマンスを最適化するために使用されるカラーテーブルのサイズを指定します。bV5BitCount が 16 または 32 の場合、最適化されたカラーパレットは BITMAPV5HEADER の直後から始まります。bV5ClrUsed が 0 以外の場合、カラーテーブルはパレット対応のデバイスで使用され、bV5ClrUsed はそのエントリ数を指定します。 | ||||||||||||||||||||
| bV5ClrImportant | DWORD | 4 | +36 | +36 | ビットマップの表示に必要なカラーインデックスの数です。この値が 0 の場合、すべての色が必要です。 | ||||||||||||||||||||
| bV5RedMask | DWORD | 4 | +40 | +40 | 各ピクセルの赤の成分を指定するカラーマスクです。bV5Compression が BI_BITFIELDS に設定されている場合にのみ有効です。 | ||||||||||||||||||||
| bV5GreenMask | DWORD | 4 | +44 | +44 | 各ピクセルの緑の成分を指定するカラーマスクです。bV5Compression が BI_BITFIELDS に設定されている場合にのみ有効です。 | ||||||||||||||||||||
| bV5BlueMask | DWORD | 4 | +48 | +48 | 各ピクセルの青の成分を指定するカラーマスクです。bV5Compression が BI_BITFIELDS に設定されている場合にのみ有効です。 | ||||||||||||||||||||
| bV5AlphaMask | DWORD | 4 | +52 | +52 | 各ピクセルのアルファ成分を指定するカラーマスクです。 | ||||||||||||||||||||
| bV5CSType | DWORD | 4 | +56 | +56 | DIB の色空間です。 次の表に、bV5CSType に指定できる値を示します。
論理色空間を定義する情報については、LOGCOLORSPACE 構造体を参照してください。 | ||||||||||||||||||||
| bV5Endpoints | CIEXYZTRIPLE | 36 | +60 | +60 | ビットマップに関連付けられた論理色空間の赤、緑、青のエンドポイントに対応する 3 つの色の x、y、z 座標を指定する CIEXYZTRIPLE 構造体です。このメンバーは、bV5CSType メンバーが LCS_CALIBRATED_RGB を指定していない限り無視されます。 | ||||||||||||||||||||
| bV5GammaRed | DWORD | 4 | +96 | +96 | 赤のトーンレスポンスカーブです。bV5CSType が LCS_CALIBRATED_RGB に設定されている場合に使用されます。符号なし 16.16 固定小数点形式で指定します。上位 16 ビットが符号なし整数部、下位 16 ビットが小数部です。 | ||||||||||||||||||||
| bV5GammaGreen | DWORD | 4 | +100 | +100 | 緑のトーンレスポンスカーブです。bV5CSType が LCS_CALIBRATED_RGB に設定されている場合に使用されます。符号なし 16.16 固定小数点形式で指定します。上位 16 ビットが符号なし整数部、下位 16 ビットが小数部です。 | ||||||||||||||||||||
| bV5GammaBlue | DWORD | 4 | +104 | +104 | 青のトーンレスポンスカーブです。bV5CSType が LCS_CALIBRATED_RGB に設定されている場合に使用されます。符号なし 16.16 固定小数点形式で指定します。上位 16 ビットが符号なし整数部、下位 16 ビットが小数部です。 | ||||||||||||||||||||
| bV5Intent | DWORD | 4 | +108 | +108 | ビットマップのレンダリングインテントです。次のいずれかの値を指定できます。
| ||||||||||||||||||||
| bV5ProfileData | DWORD | 4 | +112 | +112 | BITMAPV5HEADER 構造体の先頭からプロファイルデータの開始位置までのオフセット(バイト単位)です。プロファイルが埋め込まれている場合、プロファイルデータは実際のプロファイルそのものであり、リンクされている場合はプロファイルの NULL 終端のファイル名になります。これは Unicode 文字列にはできません。Windows 文字セット(コードページ 1252)の文字だけで構成されていなければなりません。これらのプロファイル関連のメンバーは、bV5CSType メンバーが PROFILE_LINKED または PROFILE_EMBEDDED を指定していない限り無視されます。 | ||||||||||||||||||||
| bV5ProfileSize | DWORD | 4 | +116 | +116 | 埋め込まれたプロファイルデータのサイズ(バイト単位)です。 | ||||||||||||||||||||
| bV5Reserved | DWORD | 4 | +120 | +120 | このメンバーは予約済みです。値は 0 に設定してください。 |
公式ドキュメント
BITMAPV5HEADER 構造体は、ビットマップ情報ヘッダーファイルです。BITMAPINFOHEADER 構造体の拡張版です。
解説(Remarks)
bV5Height が負(トップダウン DIB を示す)の場合、bV5Compression は BI_RGB または BI_BITFIELDS のいずれかでなければなりません。トップダウン DIB は圧縮できません。
Independent Color Management インターフェイス (ICM) 2.0 では、International Color Consortium (ICC) のカラープロファイルを DIB にリンクしたり埋め込んだりできます。詳細については、構造体の使用を参照してください。
DIB がメモリに読み込まれるとき、プロファイルデータ(存在する場合)はカラーテーブルの後に配置し、bV5ProfileData には BITMAPV5HEADER 構造体の先頭からのプロファイルデータのオフセットを指定する必要があります。bV5ProfileData に格納される値は、BITMAPV5HEADER を引数として sizeof 演算子が返す値とは異なります。これは、bV5ProfileData が BITMAPV5HEADER 構造体の先頭からプロファイルデータの開始位置までのオフセット(バイト単位)であるためです。(メモリ上では、ビットマップのビットはカラーテーブルの直後には続きません。) アプリケーションは、DIB をメモリに読み込んだ後に bV5ProfileData メンバーを変更する必要があります。
パックド DIB の場合、プロファイルデータは、ファイル形式と同様にビットマップのビットの後に配置する必要があります。bV5ProfileData メンバーには、引き続き BITMAPV5HEADER の先頭からのプロファイルデータのオフセットを指定する必要があります。
アプリケーションは、bV5Size が BITMAPV5HEADER のサイズと等しく、かつ bV5CSType が PROFILE_EMBEDDED または PROFILE_LINKED と等しい場合にのみ、プロファイルデータにアクセスしてください。
プロファイルがリンクされている場合、プロファイルのパスには、CreateFile 関数で開くことができる完全修飾名(ネットワークパスを含む)を指定できます。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// CIEXYZ (x64 12 / x86 12 バイト)
typedef struct CIEXYZ {
INT ciexyzX;
INT ciexyzY;
INT ciexyzZ;
} CIEXYZ;
// CIEXYZTRIPLE (x64 36 / x86 36 バイト)
typedef struct CIEXYZTRIPLE {
CIEXYZ ciexyzRed;
CIEXYZ ciexyzGreen;
CIEXYZ ciexyzBlue;
} CIEXYZTRIPLE;
// BITMAPV5HEADER (x64 124 / x86 124 バイト)
typedef struct BITMAPV5HEADER {
DWORD bV5Size;
INT bV5Width;
INT bV5Height;
WORD bV5Planes;
WORD bV5BitCount;
BI_COMPRESSION bV5Compression;
DWORD bV5SizeImage;
INT bV5XPelsPerMeter;
INT bV5YPelsPerMeter;
DWORD bV5ClrUsed;
DWORD bV5ClrImportant;
DWORD bV5RedMask;
DWORD bV5GreenMask;
DWORD bV5BlueMask;
DWORD bV5AlphaMask;
DWORD bV5CSType;
CIEXYZTRIPLE bV5Endpoints;
DWORD bV5GammaRed;
DWORD bV5GammaGreen;
DWORD bV5GammaBlue;
DWORD bV5Intent;
DWORD bV5ProfileData;
DWORD bV5ProfileSize;
DWORD bV5Reserved;
} BITMAPV5HEADER;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CIEXYZ
{
public int ciexyzX;
public int ciexyzY;
public int ciexyzZ;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CIEXYZTRIPLE
{
public CIEXYZ ciexyzRed;
public CIEXYZ ciexyzGreen;
public CIEXYZ ciexyzBlue;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct BITMAPV5HEADER
{
public uint bV5Size;
public int bV5Width;
public int bV5Height;
public ushort bV5Planes;
public ushort bV5BitCount;
public uint bV5Compression;
public uint bV5SizeImage;
public int bV5XPelsPerMeter;
public int bV5YPelsPerMeter;
public uint bV5ClrUsed;
public uint bV5ClrImportant;
public uint bV5RedMask;
public uint bV5GreenMask;
public uint bV5BlueMask;
public uint bV5AlphaMask;
public uint bV5CSType;
public CIEXYZTRIPLE bV5Endpoints;
public uint bV5GammaRed;
public uint bV5GammaGreen;
public uint bV5GammaBlue;
public uint bV5Intent;
public uint bV5ProfileData;
public uint bV5ProfileSize;
public uint bV5Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CIEXYZ
Public ciexyzX As Integer
Public ciexyzY As Integer
Public ciexyzZ As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CIEXYZTRIPLE
Public ciexyzRed As CIEXYZ
Public ciexyzGreen As CIEXYZ
Public ciexyzBlue As CIEXYZ
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure BITMAPV5HEADER
Public bV5Size As UInteger
Public bV5Width As Integer
Public bV5Height As Integer
Public bV5Planes As UShort
Public bV5BitCount As UShort
Public bV5Compression As UInteger
Public bV5SizeImage As UInteger
Public bV5XPelsPerMeter As Integer
Public bV5YPelsPerMeter As Integer
Public bV5ClrUsed As UInteger
Public bV5ClrImportant As UInteger
Public bV5RedMask As UInteger
Public bV5GreenMask As UInteger
Public bV5BlueMask As UInteger
Public bV5AlphaMask As UInteger
Public bV5CSType As UInteger
Public bV5Endpoints As CIEXYZTRIPLE
Public bV5GammaRed As UInteger
Public bV5GammaGreen As UInteger
Public bV5GammaBlue As UInteger
Public bV5Intent As UInteger
Public bV5ProfileData As UInteger
Public bV5ProfileSize As UInteger
Public bV5Reserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class CIEXYZ(ctypes.Structure):
_fields_ = [
("ciexyzX", ctypes.c_int),
("ciexyzY", ctypes.c_int),
("ciexyzZ", ctypes.c_int),
]
class CIEXYZTRIPLE(ctypes.Structure):
_fields_ = [
("ciexyzRed", CIEXYZ),
("ciexyzGreen", CIEXYZ),
("ciexyzBlue", CIEXYZ),
]
class BITMAPV5HEADER(ctypes.Structure):
_fields_ = [
("bV5Size", wintypes.DWORD),
("bV5Width", ctypes.c_int),
("bV5Height", ctypes.c_int),
("bV5Planes", ctypes.c_ushort),
("bV5BitCount", ctypes.c_ushort),
("bV5Compression", wintypes.DWORD),
("bV5SizeImage", wintypes.DWORD),
("bV5XPelsPerMeter", ctypes.c_int),
("bV5YPelsPerMeter", ctypes.c_int),
("bV5ClrUsed", wintypes.DWORD),
("bV5ClrImportant", wintypes.DWORD),
("bV5RedMask", wintypes.DWORD),
("bV5GreenMask", wintypes.DWORD),
("bV5BlueMask", wintypes.DWORD),
("bV5AlphaMask", wintypes.DWORD),
("bV5CSType", wintypes.DWORD),
("bV5Endpoints", CIEXYZTRIPLE),
("bV5GammaRed", wintypes.DWORD),
("bV5GammaGreen", wintypes.DWORD),
("bV5GammaBlue", wintypes.DWORD),
("bV5Intent", wintypes.DWORD),
("bV5ProfileData", wintypes.DWORD),
("bV5ProfileSize", wintypes.DWORD),
("bV5Reserved", wintypes.DWORD),
]#[repr(C)]
pub struct CIEXYZ {
pub ciexyzX: i32,
pub ciexyzY: i32,
pub ciexyzZ: i32,
}
#[repr(C)]
pub struct CIEXYZTRIPLE {
pub ciexyzRed: CIEXYZ,
pub ciexyzGreen: CIEXYZ,
pub ciexyzBlue: CIEXYZ,
}
#[repr(C)]
pub struct BITMAPV5HEADER {
pub bV5Size: u32,
pub bV5Width: i32,
pub bV5Height: i32,
pub bV5Planes: u16,
pub bV5BitCount: u16,
pub bV5Compression: u32,
pub bV5SizeImage: u32,
pub bV5XPelsPerMeter: i32,
pub bV5YPelsPerMeter: i32,
pub bV5ClrUsed: u32,
pub bV5ClrImportant: u32,
pub bV5RedMask: u32,
pub bV5GreenMask: u32,
pub bV5BlueMask: u32,
pub bV5AlphaMask: u32,
pub bV5CSType: u32,
pub bV5Endpoints: CIEXYZTRIPLE,
pub bV5GammaRed: u32,
pub bV5GammaGreen: u32,
pub bV5GammaBlue: u32,
pub bV5Intent: u32,
pub bV5ProfileData: u32,
pub bV5ProfileSize: u32,
pub bV5Reserved: u32,
}import "golang.org/x/sys/windows"
type CIEXYZ struct {
ciexyzX int32
ciexyzY int32
ciexyzZ int32
}
type CIEXYZTRIPLE struct {
ciexyzRed CIEXYZ
ciexyzGreen CIEXYZ
ciexyzBlue CIEXYZ
}
type BITMAPV5HEADER struct {
bV5Size uint32
bV5Width int32
bV5Height int32
bV5Planes uint16
bV5BitCount uint16
bV5Compression uint32
bV5SizeImage uint32
bV5XPelsPerMeter int32
bV5YPelsPerMeter int32
bV5ClrUsed uint32
bV5ClrImportant uint32
bV5RedMask uint32
bV5GreenMask uint32
bV5BlueMask uint32
bV5AlphaMask uint32
bV5CSType uint32
bV5Endpoints CIEXYZTRIPLE
bV5GammaRed uint32
bV5GammaGreen uint32
bV5GammaBlue uint32
bV5Intent uint32
bV5ProfileData uint32
bV5ProfileSize uint32
bV5Reserved uint32
}type
CIEXYZ = record
ciexyzX: Integer;
ciexyzY: Integer;
ciexyzZ: Integer;
end;
CIEXYZTRIPLE = record
ciexyzRed: CIEXYZ;
ciexyzGreen: CIEXYZ;
ciexyzBlue: CIEXYZ;
end;
BITMAPV5HEADER = record
bV5Size: DWORD;
bV5Width: Integer;
bV5Height: Integer;
bV5Planes: Word;
bV5BitCount: Word;
bV5Compression: DWORD;
bV5SizeImage: DWORD;
bV5XPelsPerMeter: Integer;
bV5YPelsPerMeter: Integer;
bV5ClrUsed: DWORD;
bV5ClrImportant: DWORD;
bV5RedMask: DWORD;
bV5GreenMask: DWORD;
bV5BlueMask: DWORD;
bV5AlphaMask: DWORD;
bV5CSType: DWORD;
bV5Endpoints: CIEXYZTRIPLE;
bV5GammaRed: DWORD;
bV5GammaGreen: DWORD;
bV5GammaBlue: DWORD;
bV5Intent: DWORD;
bV5ProfileData: DWORD;
bV5ProfileSize: DWORD;
bV5Reserved: DWORD;
end;const CIEXYZ = extern struct {
ciexyzX: i32,
ciexyzY: i32,
ciexyzZ: i32,
};
const CIEXYZTRIPLE = extern struct {
ciexyzRed: CIEXYZ,
ciexyzGreen: CIEXYZ,
ciexyzBlue: CIEXYZ,
};
const BITMAPV5HEADER = extern struct {
bV5Size: u32,
bV5Width: i32,
bV5Height: i32,
bV5Planes: u16,
bV5BitCount: u16,
bV5Compression: u32,
bV5SizeImage: u32,
bV5XPelsPerMeter: i32,
bV5YPelsPerMeter: i32,
bV5ClrUsed: u32,
bV5ClrImportant: u32,
bV5RedMask: u32,
bV5GreenMask: u32,
bV5BlueMask: u32,
bV5AlphaMask: u32,
bV5CSType: u32,
bV5Endpoints: CIEXYZTRIPLE,
bV5GammaRed: u32,
bV5GammaGreen: u32,
bV5GammaBlue: u32,
bV5Intent: u32,
bV5ProfileData: u32,
bV5ProfileSize: u32,
bV5Reserved: u32,
};type
CIEXYZ {.bycopy.} = object
ciexyzX: int32
ciexyzY: int32
ciexyzZ: int32
CIEXYZTRIPLE {.bycopy.} = object
ciexyzRed: CIEXYZ
ciexyzGreen: CIEXYZ
ciexyzBlue: CIEXYZ
BITMAPV5HEADER {.bycopy.} = object
bV5Size: uint32
bV5Width: int32
bV5Height: int32
bV5Planes: uint16
bV5BitCount: uint16
bV5Compression: uint32
bV5SizeImage: uint32
bV5XPelsPerMeter: int32
bV5YPelsPerMeter: int32
bV5ClrUsed: uint32
bV5ClrImportant: uint32
bV5RedMask: uint32
bV5GreenMask: uint32
bV5BlueMask: uint32
bV5AlphaMask: uint32
bV5CSType: uint32
bV5Endpoints: CIEXYZTRIPLE
bV5GammaRed: uint32
bV5GammaGreen: uint32
bV5GammaBlue: uint32
bV5Intent: uint32
bV5ProfileData: uint32
bV5ProfileSize: uint32
bV5Reserved: uint32struct CIEXYZ
{
int ciexyzX;
int ciexyzY;
int ciexyzZ;
}
struct CIEXYZTRIPLE
{
CIEXYZ ciexyzRed;
CIEXYZ ciexyzGreen;
CIEXYZ ciexyzBlue;
}
struct BITMAPV5HEADER
{
uint bV5Size;
int bV5Width;
int bV5Height;
ushort bV5Planes;
ushort bV5BitCount;
uint bV5Compression;
uint bV5SizeImage;
int bV5XPelsPerMeter;
int bV5YPelsPerMeter;
uint bV5ClrUsed;
uint bV5ClrImportant;
uint bV5RedMask;
uint bV5GreenMask;
uint bV5BlueMask;
uint bV5AlphaMask;
uint bV5CSType;
CIEXYZTRIPLE bV5Endpoints;
uint bV5GammaRed;
uint bV5GammaGreen;
uint bV5GammaBlue;
uint bV5Intent;
uint bV5ProfileData;
uint bV5ProfileSize;
uint bV5Reserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; BITMAPV5HEADER サイズ: 124 バイト(x64)
dim st, 31 ; 4byte整数×31(構造体サイズ 124 / 4 切り上げ)
; bV5Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; bV5Width : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; bV5Height : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; bV5Planes : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; bV5BitCount : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; bV5Compression : BI_COMPRESSION (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; bV5SizeImage : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; bV5XPelsPerMeter : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; bV5YPelsPerMeter : INT (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; bV5ClrUsed : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; bV5ClrImportant : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; bV5RedMask : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; bV5GreenMask : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; bV5BlueMask : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; bV5AlphaMask : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; bV5CSType : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; bV5Endpoints : CIEXYZTRIPLE (+60, 36byte) varptr(st)+60 を基点に操作(36byte:入れ子/配列)
; bV5GammaRed : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; bV5GammaGreen : DWORD (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; bV5GammaBlue : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; bV5Intent : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; bV5ProfileData : DWORD (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; bV5ProfileSize : DWORD (+116, 4byte) st.29 = 値 / 値 = st.29 (lpoke/lpeek も可)
; bV5Reserved : DWORD (+120, 4byte) st.30 = 値 / 値 = st.30 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global CIEXYZ
#field int ciexyzX
#field int ciexyzY
#field int ciexyzZ
#endstruct
#defstruct global CIEXYZTRIPLE
#field CIEXYZ ciexyzRed
#field CIEXYZ ciexyzGreen
#field CIEXYZ ciexyzBlue
#endstruct
#defstruct global BITMAPV5HEADER
#field int bV5Size
#field int bV5Width
#field int bV5Height
#field short bV5Planes
#field short bV5BitCount
#field int bV5Compression
#field int bV5SizeImage
#field int bV5XPelsPerMeter
#field int bV5YPelsPerMeter
#field int bV5ClrUsed
#field int bV5ClrImportant
#field int bV5RedMask
#field int bV5GreenMask
#field int bV5BlueMask
#field int bV5AlphaMask
#field int bV5CSType
#field CIEXYZTRIPLE bV5Endpoints
#field int bV5GammaRed
#field int bV5GammaGreen
#field int bV5GammaBlue
#field int bV5Intent
#field int bV5ProfileData
#field int bV5ProfileSize
#field int bV5Reserved
#endstruct
stdim st, BITMAPV5HEADER ; NSTRUCT 変数を確保
st->bV5Size = 100
mes "bV5Size=" + st->bV5Size