<< Click to Display Table of Contents >> VpeSetPictureType |
By default, VPE determines the type of an image that shall be imported or exported by its filename extension. If PictureType is other than PIC_TYPE_AUTO (the default = determining the file-type by its extension), the extension will be ignored and VPE is forced to use the specified file type.
If PIC_TYPE_AUTO is used for import, VPE is able to determine the image type not only by looking at the file suffix, but also by examining the file itself. So PIC_TYPE_AUTO will work in most cases even if the file suffix does not describe the image type. Example: you try to import a JPEG image with the name "test.001" and have set PictureType = PIC_TYPE_AUTO, even then VPE will detect that this is a JPEG file!
This property applies to image-file import and export.
void VpeSetPictureType(
VpeHandle hDoc,
long type
)
VpeHandle hDoc
Document Handle or VPE Object Handle (Template VPE Object only)
long type
possible values are:
Constant Name |
Value |
Comment |
PIC_TYPE_AUTO |
255 |
Automatic determination by filename-suffix (default) |
PIC_TYPE_BMP |
0 |
Windows-Bitmap |
PIC_TYPE_WMF |
5 |
WMF |
PIC_TYPE_EMF |
6 |
EMF |
PIC_TYPE_TIFF |
64 |
TIFF-File |
PIC_TYPE_GIF |
65 |
GIF-File |
PIC_TYPE_PCX |
66 |
PCX-File |
PIC_TYPE_JPEG |
68 |
JPEG-File |
PIC_TYPE_PNG |
69 |
PNG (Portable Network Graphic) |
PIC_TYPE_ICO |
70 |
ICO (Windows Icon) |
PIC_TYPE_JNG |
71 |
JNG (JPEG Network Graphics) |
PIC_TYPE_KOALA |
72 |
KOA (C64 Koala Graphics) |
PIC_TYPE_IFF |
73 |
IFF/LBM (Interchangeable File Format - Amiga/Deluxe Paint) |
PIC_TYPE_MNG |
74 |
MNG (Multiple-Image Network Graphics) |
PIC_TYPE_PBM |
75 |
PBM (Portable Bitmap [ASCII]) |
PIC_TYPE_PBM_RAW |
76 |
PBM (Portable Bitmap [RAW]) |
PIC_TYPE_PCD |
77 |
PCD (Kodak PhotoCD) |
PIC_TYPE_PGM |
78 |
PGM (Portable Greymap [ASCII]) |
PIC_TYPE_PGM_RAW |
79 |
PGM (Portable Greymap [RAW]) |
PIC_TYPE_PPM |
80 |
PPM (Portable Pixelmap [ASCII]) |
PIC_TYPE_PPM_RAW |
81 |
PPM (Portable Pixelmap [RAW]) |
PIC_TYPE_RAS |
82 |
RAS (Sun Raster Image) |
PIC_TYPE_TARGA |
83 |
TGA/TARGA (Truevision Targa) |
PIC_TYPE_WBMP |
84 |
WAP/WBMP/WBM (Wireless Bitmap) |
PIC_TYPE_PSD |
85 |
PSD (Adobe Photoshop) |
PIC_TYPE_CUT |
86 |
CUT (Dr. Halo) |
PIC_TYPE_XBM |
87 |
XBM (X11 Bitmap Format) |
PIC_TYPE_XPM |
88 |
XPM (X11 Pixmap Format) |
PIC_TYPE_DDS |
89 |
DDS (DirectX Surface) |
PIC_TYPE_HDR |
90 |
HDR (High Dynamic Range Image) |
PIC_TYPE_FAX_G3 |
91 |
G3 (Raw fax format CCITT G.3) |
PIC_TYPE_SGI |
92 |
SGI (SGI Image Format) |
Default:
PIC_TYPE_AUTO
Remarks:
Setting this property for a VPE Object that resides in a document can have unpredictable results. In contrast you may set this property for a VPE Object that resides in a template without problems, if the file name contains at least one field.
Example:
VpeSetPictureType(hDoc, PIC_TYPE_TIFF)
VpePicture(hDoc, 1, 1, VFREE, VFREE, "image.001")
Will import "image.001" as TIFF file.
"Pictures" in the Programmer's Manual