Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get image Size
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01218606
Message ID:
01218619
Vues:
17
<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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform