Get image dimension

Jan 28, 2015 at 11:00 AM
I need to know the dimension (aspect) of image. I tryed to use this code
obj2 = CREATEOBJECT("Image")
obj2.Picture = STRTRAN(oProp.htmlpath +"\"+ GET_IMAGE(CodArt),"/","\")
My problem is that this method don't work. For obj2.Width and Obj2.Height i have always the default value (100 and 17). When i print the value of obj2.Picture i see the correct full physical path, but the object don't give me the right aspect size.

I don't know why this don't work. The same code in Visual FoxPro works correctly. Maybe, this is the same problem that give me another problem: also FILE() function won't work correctly.
Feb 4, 2015 at 9:04 AM
Ok, the standard VFP method doesn't work. I solved with using a GDI+ class library. Now, my problem, is only the function "FILE()" that don't works properly.
Coordinator
Feb 4, 2015 at 2:11 PM
FILE() should work. Just make sure you have the right permission on the actual location of the file itself.
Feb 5, 2015 at 4:43 PM
apaustria wrote:
FILE() should work. Just make sure you have the right permission on the actual location of the file itself.
Yes, it works but not always. I don't know the reason.