Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizing images from VFP9 app
Message
From
18/11/2005 08:10:04
 
 
To
18/11/2005 06:46:33
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01069788
Message ID:
01070161
Views:
13
>If you have VFP9, you can try this code, using _gdiplus.vcx
>
>Regards
>Cesar
>
>
#define	GDIPLUS_PIXELFORMAT_1bppIndexed     	0x00030101
>#define	GDIPLUS_PIXELFORMAT_4bppIndexed     	0x00030402
>#define	GDIPLUS_PIXELFORMAT_8bppIndexed     	0x00030803
>#define	GDIPLUS_PIXELFORMAT_16bppGrayScale  	0x00101004
>#define	GDIPLUS_PIXELFORMAT_16bppRGB555     	0x00021005
>#define	GDIPLUS_PIXELFORMAT_16bppRGB565     	0x00021006
>#define	GDIPLUS_PIXELFORMAT_16bppARGB1555   	0x00061007
>#define	GDIPLUS_PIXELFORMAT_24bppRGB        	0x00021808
>#define	GDIPLUS_PIXELFORMAT_32bppRGB        	0x00022009
>#define	GDIPLUS_PIXELFORMAT_32bppARGB       	0x0026200A
>#define	GDIPLUS_PIXELFORMAT_32bppPARGB      	0x000E200B
>#define	GDIPLUS_PIXELFORMAT_48bppRGB        	0x0010300C
>#define	GDIPLUS_PIXELFORMAT_64bppPARGB      	0x001C400E
>
>
>lcSource = GETPICT()
>lcDestination = "c:\test.bmp"
>
>SET PATH TO HOME(1)
>
>LOCAL loImage AS GpImage of ffc/_gdiplus.vcx
>loImage = NEWOBJECT("GpImage", "FFC\_gdiplus.vcx")
>loImage.CreateFromFile(lcSource)
>
>LOCAL loBitmap AS GpBitmap of ffc/_gdiplus.vcx
>loBitmap = NEWOBJECT("GpBitmap", "ffc/_gdiplus.vcx")
>LOCAL loGraphics as GpGraphics of ffc/_gdiplus.vcx
>loGraphics = NEWOBJECT('GpGraphics','ffc/_gdiplus.vcx')
>
>
>loGraphics.CreateFromImage(loBitmap)
>loGraphics.DrawImageScaled(loImage, 0, 0, 324, 198)
>loBitmap.SaveToFile(lcDestination, "image/bmp")
Thanks for your repli Cesar.. Nice one..
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform