I have successfully worked two of the image manipulation options into my application. As the code given in the help file is for VB some do not work straight off.
I'm looking for some help in converting a few lines in to VFP code.
1 Cropping
this does not compile.
2 Adding an exif title
No title is written to the exif of the subject file.
Any clues anyone?
Thanks
William
I'm looking for some help in converting a few lines in to VFP code.
1 Cropping
Code:
IP.Filters.Add (IP.FilterInfos("Crop").FilterID)
IP.Filters(1).Properties("Left") = (Img.Width)\4
IP.Filters(1).Properties("Top") = Img.Height\4
IP.Filters(1).Properties("Right") = Img.Width\4
IP.Filters(1).Properties("Bottom") = Img.Height\4
this does not compile.
2 Adding an exif title
Code:
Img = CreateObject("WIA.ImageFile")
IP = CreateObject("WIA.ImageProcess")
v = CreateObject("WIA.Vector")
myownpicture = justfname(mypicture)
mypath = addbs(justpath(mypicture))
Img.LoadFile(mypicture)
IP.Filters.Add (IP.FilterInfos("Exif").FilterID)
IP.Filters(1).Properties("ID") = 40091
IP.Filters(1).Properties("Type") = VectorOfBytesImagePropertyType
cMessageText = 'Overwrite any previous Exif Title?'
nAnswer = MESSAGEBOX(cMessageText, 4+32 ,cMsgTitle)
if nAnswer =6
v.SetFromString.value = "This Title tag written by PicWiz!" + mytitle
IP.Filters(1).Properties("Value") = v
Img = IP.Apply(Img)
Img.SaveFile(mypicture)
endif
No title is written to the exif of the subject file.
Any clues anyone?
Thanks
William