Re: Creating an image with a gradient programattically

Peter Ritchie <[email protected]> Mon, 16 Mar 2009 10:13:28 -0400
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <LISTSERV%[email protected]>
Bob Powell has good examples of saving bitmaps as jpg files.  For example: http://www.bobpowell.net/jpeg_compression.htm

You can simply draw to a Bitmap object by creating Graphics object from a Bitmap object with the Graphics.FromImage() method.  You can simply do whatever drawing you need to the Graphics object, dispose of it, then save it as a jpg.

As for the details of a gradient fill, you could have a look at System.Drawing.Drawing2D.LinearGradientBrush.

-- Peter

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives