Alec_Gagne
Programmer
I'm using the code below to create an instance of the MapWinGIS IMAGE class so that the resulting IMAGE object can be passed into a shape file. The image object is successfully created however, my call to the .Open() method creates an OLE Error Code "Type Mismatch".
The documentation for the Image.Open() method is here. I've confirmed that the file exists in the specified path and that the file is in fact a jpg file type. I've also tried using a Bitmap image with ImageType_Bitmap_File and ImageType_Use_File_Extension
Also tried passing all 4 parameters (even though only the 1st parameter is required) as follows.
Any thoughts on what might be the source of a type mismatch error ?
Alec (Santa Barbara, California)
Code:
* Create a MapWinGIS image object based on local image file
#DEFINE ImageType_Bitmap_File 0
#DEFINE ImageType_Use_File_Extension 2
#DEFINE ImageType_JPEG_File 4
loImg = CreateObject("MapWinGIS.Image")
loImg.Open("s:\mapwingis\car.jpg", ImageType_Use_File_Extension )
The documentation for the Image.Open() method is here. I've confirmed that the file exists in the specified path and that the file is in fact a jpg file type. I've also tried using a Bitmap image with ImageType_Bitmap_File and ImageType_Use_File_Extension
Also tried passing all 4 parameters (even though only the 1st parameter is required) as follows.
Code:
loImg.Open("s:\mapwingis\car.jpg", ImageType_Use_File_Extension, .F., .NULL. )
Any thoughts on what might be the source of a type mismatch error ?
Alec (Santa Barbara, California)