Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picture size
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01010644
Message ID:
01011671
Views:
26
Christof,

I'm curious what line
createobject( "ReportListener" )
is for? The code seems to work fine w/o it.

>
>>Could you elaborate a bit more on which function resizes the graphic?
>
>Sure. The following code takes a delete.bmp, scales it by 200% and stores the new picture as test.bmp in BMP format and as test.jpg in JPEG format.
>
>* Initalize GDI+ library and environment
>Set CLASSLIB to Home()+"ffc\_Gdiplus.vcx" Additive
>createobject( "ReportListener" )
>
>* Load the original image
>Local loFile
>loFile = CreateObject("gpBitmap")
>loFile.CreateFromFile("delete.bmp")
>
>* new bitmap 3 times as large (scale factor 200%)
>Local loBitmap
>loBitmap = CreateObject("gpBitmap")
>loBitmap.Create(loFile.ImageWidth*3,loFile.ImageHeight*3)
>
>* insert the scaled image into the new bitmap
>Local loGP
>loGP = CreateObject("gpGraphics")
>loGP.CreateFromImage( m.loBitmap )
>loGP.DrawImageScaled( m.loFile, 0,0,loFile.ImageWidth*3,loFile.ImageHeight*3 )
>
>* Save as JPG and BMP files.
>loBitmap.SaveToFile("test.jpg","image/jpeg")
>loBitmap.SaveToFile("test.bmp","image/bmp")
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform