FormatID Constants

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

Constants

  • wiaFormatBMP ({B96B3CAB-0728-11D3-9D7B-0000F81EF32E})
    FormatID for the Microsoft Windows bitmap (BMP) format.

wiaFormatPNG ({B96B3CAF-0728-11D3-9D7B-0000F81EF32E})

FormatID for the Portable Network Graphics (PNG) format.

wiaFormatGIF ({B96B3CB0-0728-11D3-9D7B-0000F81EF32E})

FormatID for the Graphics Interchange Format (GIF) format.

wiaFormatJPEG ({B96B3CAE-0728-11D3-9D7B-0000F81EF32E})

FormatID for the JPEG format.

wiaFormatTIFF ({B96B3CB1-0728-11D3-9D7B-0000F81EF32E})

FormatID for the Tagged Image File Format (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 .

See Also

FormatID