pic = loadimage ("image01.jpg", @IMGSCALABLE)
SHOWIMAGE(d1,pic,@IMGSCALABLE,2,2 )
:) ???
Is there a way to get the original image width and height
so that it can be scaled to the size I want
Also I have been battling to get an ole routine to work
Any help would be appreciated
Hi wiskie, try this:$include "ocidl.inc"
pointer pic
pic = loadimage("image01.jpg", @IMGSCALABLE)
int w, h
GetScalableImageSize(pic, w, h)
MessageBox 0, using("#x#", w, h), ""
DeleteImage(pic, @IMGSCALABLE)
' note: pic must be valid, loaded as @IMGSCALABLE
sub GetScalableImageSize(pointer pic, int w byref, int h byref)
IPicture p
OLE_HANDLE hBitmap
BITMAP bmp
p = pic+0
p->get_Handle(&hBitmap)
GetObject(hBitmap, len(bmp), &bmp)
w = bmp.bmWidth
h = bmp.bmHeight
return
endsub
8)
Thanks sapero
[img] "Thanks.jpg" [/img]
Worked out just fine.. after I got all the includes and libs in place.
Great Stuff !!