次の方法で共有


WIA 未処理形式のデータ ヘッダー

RAW データのヘッダーは次のとおりです。

DWORD Tag;         // must contain 'WRAW' (single byte ASCII characters)
DWORD Version;        // must contain 0x00010000
DWORD HeaderSize;       // contains amount of valid bytes in header
DWORD XRes;              // X (horizontal) resolution, in DPI
DWORD YRes;              // Y (vertical) resolution, in DPI
DWORD XExtent;           // image width, in pixels
DWORD YExtent;           // image height, in pixels
DWORD BytesPerLine;      // used only for uncompressed image data, 0 (unknown) for compressed data 
DWORD BitsPerPixel;      // number of bits per pixel (all channels)
DWORD ChannelsPerPixel;  // number of color channels (samples) within a pixel
DWORD DataType;    // current WIA_IPA_DATATYPE value describing the image
BYTE  BitsPerChannel[8]; // up to 8 channels per pixel, use as many as needed  
DWORD Compression;       // current WIA_IPA_COMPRESSION value
DWORD PhotometricInterp; // current WIA_IPS_PHOTOMETRIC_INTERP value
DWORD LineOrder;         // image line order as a WIA_LINE_ORDER value
DWORD RawDataOffset;     // offset position (in bytes, starting from 0) for the raw image data
DWORD RawDataSize;       // size of raw image data, in bytes
DWORD PaletteOffset;     // offset position (in bytes, starting from 0) for the palette (0 if none)
DWORD PaletteSize;       // size, in bytes, of color palette table (0 if no palette is required) 

追加のヘッダー フィールドの説明

DWORD Compression
圧縮された FAX 伝送に使用されるニコンの圧縮 NEF やヘッダーレス圧縮データ (グループ 3.1、3.2d、4) などの圧縮された未加工フォーマットを許可します。 このフィールドの値はWIA_IPA_COMPRESSION定数で、場合によっては特殊なアプリケーションに対してベンダー固有です。 既定値は WIA_COMPRESSION_NONE です。

Compression Examples:

G4 圧縮データ (WIA_COMPRESSION_G4) は、TIFF ファイル (WiaImgFmt_TIFF) 内または生形式 (WiaImgFmt_RAW) を使用して転送できます。

JPEG 圧縮データ (WIA_COMPRESSION_JPEG) は、JFIF 形式 (WiaImgFmt_JPEG)、EEXIF 形式 (WiaImgFmt_EXIF)、または TIFF 形式 (WiaImgFmt_TIFF) を使用して転送できます。 未加工の形式 (WiaImgFmt_RAW) を使用して転送内で、いずれかのインターチェンジ形式 (JFIF、EEXIF) でフォーマットされた JPEG データを転送することはできません。代わりに、他の JPEG 互換形式のいずれかを使用する必要があります。

For more information on the WIA compression constants, see the WIA_IPA_COMPRESSION property.

DWORD PhotometricInterp
転送される画像のフォトメトリック解釈について説明します。 このフィールドは、白黒 (1bpp) とグレースケール (4bpp 以上) の画像に必要です。 これらの画像は、WIA_PHOTO_WHITE_1 (白は 1、黒は 0) またはWIA_PHOTO_WHITE_0 (白は 0、黒は 1) のいずれか、白と黒の値を示す必要があります。 このフィールドは、カラー 画像の場合は省略可能です。

DWORD LineOrder
画像データ内の行を上から下に並べるか、下から上に並べるかを説明します。 Two new constants were defined in wiadef.h for this:

#define  WIA_LINE_ORDER_TOP_TO_BOTTOM        0x00000001 
#define  WIA_LINE_ORDER_BOTTOM_TO_TOP        0x00000002

これに対して新しいプロパティが定義されていません。 これは構成可能なスキャン設定ではありません。 LingOrder only matters when executing image data transfers.

DWORD RawDataSize
ヘッダーの後の生データのサイズ (バイト単位) を示します (オプションのカラー パレットは含まれません)。 アプリケーションでは、このフィールドを使用して、想定される成功したイメージ転送の完了を確認できます。 転送の開始時にミニドライバーにこの情報が不明な場合 (ヘッダーがストリームに書き込まれる場合) (たとえば、自動境界線検出を使用して画像をスキャンする場合) は、XExtent フィールドと YExtent フィールドの処理方法と同様に、ミニドライバーは画像データ転送の最後にこのフィールドを入力する必要があります。

DWORD PaletteOffset
カラー パレットがデータ ストリームで開始されるオフセットをバイト単位で格納します。このオフセットは、ヘッダーが終了する位置の 0 から始まります。 パレットと生画像データは、任意の順序で生ヘッダーの後に続けることができ、不要な場合はパレットを省略できます。

DWORD PaletteSize
カラー パレットのサイズをバイト単位で格納します。 生画像データにパレットをアタッチする必要がない場合、ミニドライバーはこのフィールドを 0 に設定する必要があります。 このフィールドは、パレット内のエントリの数とは関係ありません。

Black and white and grayscale data can omit the palette (because the information required to build the palette is contained in the PhotometricInterpretation field) or supply an optimized palette along with the PhotometricInterpretation field.

For indexed images, the number of entries in the color palette is dictated by the current BitsPerPixel value (2 ^ BitsPerPixel. For example, 2 entries for 1bpp, 16 entries for 4bpp, 256 entries for 8bpp). The format of the palette entries would be dictated by the number of entries in BitsPerChannel field (the number of fields/channels in each palette entry) and BitsPerChannel values (each field would contain exactly the value specified in the BitsPerChannel field for the respective channel). 各パレット入力フィールドは BYTE アラインされている必要があります。