Previous Topic

Next Topic

Book Contents

Book Index

GuessImageFormat

Description:

The GuessImageFormat will analyze the specified file and determine what kind of image file it is. This analysis is performed on the actual image data, and the function is much smarter than looking as just the file extention. It is for example possible to store a JPG file with the filename TEST.GIF, and still GuessImageFormat will detect the image as JPG.

Declaration:

Declare Function GuessImageFormat Lib "VCII2LN.DLL" _
(Byval pstrFilename As String) As Integer

Parameters:

Param

Description

pstrFilename

The full filename of the image to check.

Starting from version 1.4 of II2LN you can also specify any http:// or file:// URL in this parameter


Returns:

-1 if the image format was not recognized. Otherwise one of the image format codes.


Usage:

Dim iImageFormat as Integer
iImageFormat = GuessImageFormat(strFileName)

The iImageFormat will contain the number indicating the image format

Introduced in version:

1.1.0.0

In This Section

The image format codes

See Also

Functions

Identification functions

ImportImage

ImportImageAsResource

AttachImage

ProcessImage

GetImageDimension

GetImageFromClipboard

GetTIFFFrameCount

GuessImageFormatStrict