Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting width and height of GIF
Message
 
À
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:
00691712
Vues:
19
>>>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.

Well, you didn't say fast, and I can't attest to the speed of the simple approach. You might also want to review http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~?2,41,17,616843 if you haven't already. The nice thing about loading into an Image control is that it also covers all of the other supported formats.
Montage

"Free at last..."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform