Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting width and height of GIF
Message
De
20/08/2002 18:18:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00691686
Message ID:
00691706
Vues:
14
>>I'm wondering if anyone has done that before. I would like to detect the width and height of a GIF file from Visual FoxPro.
>
>The dimensions are initialized when you load into an Image control.

I obtained a fast result when using this:
* expC1 File name
PARAMETERS tcFileName
LOCAL lcHtml,lcFileName
lcHtml=''
lcFileName=FILETOSTR(tcFileName)
lcHtml=lcHtml+'WIDTH='+ALLTRIM(STR(ASC(SUBSTR(lcFileName,8,1))*256+ASC(SUBSTR(lcFileName,7,1))))
lcHtml=lcHtml+' '
lcHtml=lcHtml+'HEIGHT='+ALLTRIM(STR(ASC(SUBSTR(lcFileName,10,1))*256+ASC(SUBSTR(lcFileName,9,1))))
RETURN lcHtml
This is done in repetitive way. So, about 20 times in a fraction of a second. If I use the image control for it, I don't know if that would be faster. However, it might be more robust assuming a specific GIF format would be used other than the default one.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform