Accusoft ImagXpress 12
QueryFile Method
See Also  Send comments on this topic.
FileName
The file to be queried.
PageNbr
Page number within the file to query.
width
A long value evaluates the image width in pixels.
height
A long value evaluates the image height in pixels.
BPP
A short value evaluates the image Bits Per Pixel (BPP).
Format
A short value evaluates the image format.
FileSize
A long value evaluates the image file size.
ResUnits
A short value evaluates the image resolution units.
ResX
A double value evaluates the image X resolution.
ResY
A double value evaluates the image Y resolution.
AccusoftImagXpress12 ActiveX DLL > ImagXpress Object : QueryFile Method

Glossary Item Box

Description

Obtains information about an image file.

Syntax

Visual Basic
Public Sub QueryFile( _
   ByVal FileName As String, _
   ByVal PageNbr As Long, _
   ByRef width As Long, _
   ByRef height As Long, _
   ByRef BPP As Integer, _
   ByRef Format As Integer, _
   ByRef FileSize As Long, _
   ByRef ResUnits As Integer, _
   ByRef ResX As Double, _
   ByRef ResY As Double _
) 

Parameters

FileName
The file to be queried.
PageNbr
Page number within the file to query.
width
A long value evaluates the image width in pixels.
height
A long value evaluates the image height in pixels.
BPP
A short value evaluates the image Bits Per Pixel (BPP).
Format
A short value evaluates the image format.
FileSize
A long value evaluates the image file size.
ResUnits
A short value evaluates the image resolution units.
ResX
A double value evaluates the image X resolution.
ResY
A double value evaluates the image Y resolution.

Remarks

QueryFile obtains information about an image file but does not load the image. Information about the image is returned in the Width, Height, BPP, Format, FileSize, ResUnits, ResX, and ResY parameters.

FileName may be a remote or local file. It may not be an http or ftp address.

ResUnits, ResX, and ResY are returned for the following image formats: TIFF, JPEG, PIC, PNG, BMP, RLE, PCX. These values will be set to zero if the image does not contain resolution information.

If QueryFile is successful, the ImagError Property is set to 0 (ErrorNone). If QueryFile fails, the ImagError Property will be set to a non zero value.

The QueryFileV Method is identical to the QueryFile Method, except that the return values for Width, Height, BPP, Format, FileSize, ResUnits, ResX, and ResY are VARIANTS. If you are using VB Script, or if you are using Visual Basic, and wish to use implicit variables, you must use the QueryFileV Method. If using C++, you can avoid the variant conversions by using this QueryFile Method.

See Also

©2013. Accusoft Corporation. All Rights Reserved.