次の方法で共有


FormatID Constants

Indicates the file format of an image as String versions of GUIDs.

Constant/value Description
wiaFormatBMP
{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}
FormatID for the Windows BMP format.
wiaFormatPNG
{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}
FormatID for the PNG format.
wiaFormatGIF
{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}
FormatID for the GIF format.
wiaFormatJPEG
{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}
FormatID for the JPEG format.
wiaFormatTIFF
{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}
FormatID for the TIFF format.

Remarks

Use a FormatID Constants constant as the value for the FormatID parameter for the ShowAcquireImage, ShowTransfer, and Transfer methods. You can also use a FormatID Constants constant as the value of the FormatID property in a "Convert" filter to specify the format that results from the conversion.

The following example shows how to determine if the file returned from ShowAcquireImage is a JPEG file.

Dim Img 'As ImageFile

Set Img = CommonDialog1.ShowAcquireImage(UnspecifiedDeviceType, _
                                         UnspecifiedIntent, _
                                         MaximizeQuality, _
                                         wiaFormatJPEG)
If Img.FormatID <> wiaFormatJPEG Then
    MsgBox "Device does not support JPEG files"
End If

For additional example code, see Convert a File in Shared Samples .

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 R2 [desktop apps only]
Header
Wiaaut.h
IDL
Wiaaut.idl

See also

FormatID