Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to GetBitmapDimensionEx?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00438099
Message ID:
00438127
Vues:
11
Just before I logged back in, I was "MODI COMM"ing some bmps I made with paint and converting them to "FoxFont" and then chasing suspects with ?ASC(_CLIPTEXT). This was very helpful. Someday, I too, may become a "Master of The Obvious". Thanks a lot!

>>BOOL GetBitmapDimensionEX(hBitmap, lpDimension)
>>My feeble attempts at this returned entry point errors. Any help appreciated. I am trying to get the pixel width and height of a BMP file.
>>Thanks
>
>Terry,
>
>Ed's pointed the way to do this via the API. Alternately, you could use VFP FILETOSTR() function to load the image into a string and extract the information from the portion of the file that represents the BITMAPINFOHEADER structure.
>
>In my mind, however, both these techniques are more complicated than they need to be. Unless you're trying to retrieve the information from a resource rather than a file., the simplest method I know is
oBMP = CREATEOBJECT("Image")
>* lcbmp is the bitmap file of interest
>oBMP.Picture = lcbmp
>? oBMP.Height
>? oBMP.Width
Another thing of note regarding the API call is that the declaration is case sensitive and the correct declaration would be GetBitmapDimensionEx.
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform