WIA_RAW_HEADER structure

The WIA_RAW_HEADER structure defines an image in the RAW data format of a device and enables applications to use RAW format in Windows Image Acquisition (WIA) transfers.

Syntax

typedef struct _WIA_RAW_HEADER {
  DWORD Tag;
  DWORD Version;
  DWORD HeaderSize;
  DWORD XRes;
  DWORD YRes;
  DWORD XExtent;
  DWORD YExtent;
  DWORD BytesPerLine;
  DWORD BitsPerPixel;
  DWORD ChannelsPerPixel;
  DWORD DataType;
  BYTE  BitsPerChannel[8];
  DWORD Compression;
  DWORD PhotometricInterp;
  DWORD LineOrder;
  DWORD RawDataOffset;
  DWORD RawDataSize;
  DWORD PaletteOffset;
  DWORD PaletteSize;
} WIA_RAW_HEADER;

Members

Tag

Type: DWORD

The name of the format. This must be the literal 'WRAW' (four single byte ASCII characters).

Version

Type: DWORD

The version of the RAW format. Always use 0x00010000.

HeaderSize

Type: DWORD

The total valid bytes in the header.

XRes

Type: DWORD

The horizontal resolution in dots per inch.

YRes

Type: DWORD

The vertical resolution in dots per inch.

XExtent

Type: DWORD

The width of the image in pixels.

YExtent

Type: DWORD

The height of the image in pixels.

BytesPerLine

Type: DWORD

The number of bytes in a line of an uncompressed image. Use 0 when the data is compressed to signal that the number of bytes per line is unknown.

BitsPerPixel

Type: DWORD

The total number of bits per pixel for all the pixel's channels.

ChannelsPerPixel

Type: DWORD

The number of color channels in a pixel.

DataType

Type: DWORD

The WIA_IPA_DATATYPE of the image. Since WIA_IPA_FORMAT is set to WiaImgFmt_RAW, this is a list of allowed values from which the application picks.

BitsPerChannel[8]

Type: BYTE

The number of bits in a channel, up to a maximum of 8.

Compression

Type: DWORD

A WIA_IPA_COMPRESSION value specifying the type of compression used, if any.

PhotometricInterp

Type: DWORD

A WIA_IPA_PHOTOMETRIC_INTERP value specifying the photometric interpretation of the image.

LineOrder

Type: DWORD

A value representing the image line order. This is always either WIA_LINE_ORDER_TOP_TO_BOTTOM or WIA_LINE_ORDER_BOTTOM_TO_TOP.

RawDataOffset

Type: DWORD

The position of the raw image data in bytes, starting from position where the header ends or the position where the palette ends.

RawDataSize

Type: DWORD

The size, in bytes, of the raw image data.

PaletteOffset

Type: DWORD

The position of the palette in bytes, starting from the position where the header ends or the position where the data ends. (This value is 0, if there is no palette.)

PaletteSize

Type: DWORD

The size, in bytes, of the palette table. (This is 0, if there is no palette.)

Remarks

Because this is not a file format, use an empty string for the WIA_IPA_FILE_EXTENSION property.

The palette and the data can come in either order.

RawDataSize does not include either the header or the palette. Use this field to verify that the transfer of the image has been successful.

PaletteSize is bytes, not the number of entries in the palette.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Wiadef.h