Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use GDI+
Message
From
12/10/2007 10:45:08
 
 
To
12/10/2007 10:12:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
01260546
Message ID:
01260560
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hello,
>
>I am trying to convert images to grayscale using GDI+. Did anybody do this before?

There is a sample included called Color Matrix that does this.
Here is the relevant code. Could not be simpler.
WITH Thisform
	.oClrMatrix = _Screen.System.Drawing.Imaging.ColorMatrix.New( ; 
        0.33, 0.33, 0.33, 0.0, 0.0, ; 
        0.33, 0.33, 0.33, 0.0, 0.0, ; 
        0.33, 0.33, 0.33, 0.0, 0.0, ;
        0.0 , 0.0 , 0.0 , 1.0, 0.0, ; 
        0.0 , 0.0 , 0.0 , 0.0, 1.0)
	.imgcanvas1.Draw()
ENDWITH
Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform