Friday, December 26, 2008

CodeProject: GD library wrapper

CodeProject: GD library wrapper
GD library wrapper (for ASP developers with PHP vs ASP examples).
Download source - 998 Kb



Response.ContentType = "image/png";
var gdImage = Server.CreateObject("GDLibrary.gdImage");
gdImage.Create(230, 20);
gdImage.ColorAllocate(0, 10, 10);
var TextColor = gdImage.ColorAllocate(233, 114, 191);
gdImage.Chars(gdImage.FontGetLarge(), 5, 5,
"My first Program with GD", TextColor);
Response.BinaryWrite(gdImage.ToPngStream().Read);


No comments: