Hi!
I'm not sure, but something like following works (with use of LoadPicture):
GetDimension(lcFile+'.jpg', @lnWidth, @lnHeight)
procedure GetDimension
PARAMETER tcFile, tcWidth, tcHeight
loImage=LoadPicture(m.tcFile)
tcWidth = round(loImage.width/26.458)
tcHeight = round(loImage.height/26.458)
HTH.
>For some isolated cases, the image control doesn't return the proper dimensions. This is the function that I am using:
>
>
>loImage=GetDimension(lcFile+'.jpg')
>lnWidth=loImage.Width
>lnHeight=loImage.Height
>
>* Return an object to get the image dimensions
>* expC1 Full path of the file
>FUNCTION GetDimension
>PARAMETER tcFile
>loImage=CREATEOBJECT('Image')
>loImage.Picture=tcFile
>RETURN loImage
>
>
>Usually, this is working fine. But, I have found that sometimes, it returns some coordinates which are way bigger than the actual image size. Anyone found a way to make that bullet proof?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.