I am trying to take an image from a folder to check its width after that. To do it I am using the following peace of code:
Dim pic As IPictureDisp
Dim var As Variant
var = "C:\Myfolder\Animage" & animationNum + 1 & ".png"
pic = LoadPicture(var)
It is giving me "invalid picture" error. I tried also just using the following line:
width = LoadPicture("C:\Myfolder\Animage" & animationNum + 1 & ".png").width
But it also gave me the same error. How can I load the picture?
EDIT
I try with a jpg image and it works... Does this function some issues with png files?
From msdn.microsoft.com:
.png is not supported.