次の方法で共有


Vector.ImageFile property

Retrieves the image file thumbnail of an ImageFile object, the RGB data thumbnail of an Item object, or creates an ImageFile object from raw ARGB data. Retrieves an ImageFile object on success.

This property is read-only.

Syntax

Property ImageFile( _
  [ ByVal Width As LONG ], _
  [ ByVal Height As LONG ] _
)

Property value

Remarks

Since vectors can contain an image, this property provides an easy way to access the Image as an ImageFile object. Like the Picture property, the ImageFile (Vector) property supports three different types of Image Vectors.

The first type of Image Vector is a vector of bytes that contains the literal bytes of an image file. There are two common ways to acquire such a vector. First, by using the FileData property of an ImageFile object to get the image file as a vector of bytes. Second, most JPEG images created by digital cameras contain a "ThumbnailData" property. The value of this property is a vector of bytes that is a thumbnail sized .jpg file. When the vector contains an image of this type the Height and Width parameters to the ImageFile (Vector) property are ignored.

The second type of Image Vector is a vector of bytes that contains raw RGB bitmap data. The most common way to acquire a vector like this is from the "Thumbnail Data" property of an Item object. Since raw RGB Bitmap Data does not contain any information about the height or width, you need to provide these values so that the Windows Image Acquisition (WIA) Automation Library can successfully create the ImageFile object (or Microsoft Visual Basic picture object if you are using the Picture property). In the case where the raw RGB bitmap data was acquired from the "Thumbnail Data" property of an Item object, you can obtain the height from the "Thumbnail Height" property and the width from the "Thumbnail Width" property on the same Item object.

The third type of Image Vector is a vector of Long values that contains raw ARGB bitmap data. There are two common ways to create this kind of vector. First, you can create this type of vector by using the ARGBData property of an ImageFile object to get the raw ARGB bitmap data of the ActiveFrame property. Second, because the structure of raw ARGB bitmap data is not nearly as complex as raw RGB bitmap data, it is possible to create a Vector containing raw ARGB data from scratch as in the following sample.

For example code, see Create an ImageFile Object that Contains a Blank Page in Shared Samples.

For a similar method, see the Picture method.

For more information about raw ARGB bitmap data, see the Remarks section of the ImageFile object's ARGBData property. Since raw ARGB bitmap data does not contain any information about the height or width, you need to provide these values so that the WIA Automation Library can successfully create the ImageFile object.

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

Vector

Reference

ShowAcquireImage

Apply