Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get image Size
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01218606
Message ID:
01218619
Views:
19
<snip>
>I tried GDIPlusX also, but perhaps I implemented it wrong:
>
>http://weblogs.foxite.com/cesarchalom/archive/2007/04/08/3653.aspx
>
>
>* Name of METHOD in AppObject:
>* oApp.Get_Image_Size()
>LPARAMETERS pnImageFileName
>loImage = NEWOBJECT('IMAGE')
>loImage.Picture=pnImageFileName
>lcReturnString=TRANSFORM(loImage.Width) + "x" + TRANSFORM(loImage.Height)
>RETURN lcReturnString
>
>
>I called the above by doing the following:
>
>lcJPEGFileName=oApp.cImageFolder + "\" + aFileName[nFileCount, 1]
>lnJPEGSize=oApp.Get_Image_Size(lcJPEGFileName)
>
Yes, you implemented it incorrectly. Below are relevant pieces of code from the blog
_SCREEN.AddProperty("System", NEWOBJECT("xfcSystem", LOCFILE("system.vcx")))
loImg = SCREEN.System.Drawing.Image.FromFile(lcImage)

lcInfo = ;
   "Width : " + TRANSFORM(loImg.Width) + SPACE(25) +;
   "Height : " + TRANSFORM(loImg.Height) + CHR(13
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform