[C#]
string myps = "/Courier findfont 10 scalefont setfont";
myps += " 1 1 0 setrgbcolor";
myps += " 10 7 moveto (Copyright 1992, my picture productions) show";
Canvas canvas = new Canvas(Server.MapPath("rez/sunset.jpg"));
canvas.DrawPostscript(myps, new DrawOptions());
canvas.SaveAs(Server.MapPath("Canvas_DrawPostscript_103.png"));
[Visual Basic]
Dim myps As String = "/Courier findfont 10 scalefont setfont"
myps += " 1 1 0 setrgbcolor"
myps += " 10 7 moveto (Copyright 1992, my picture productions) show"
Dim canvas As New Canvas(Server.MapPath("rez/sunset.jpg"))
canvas.DrawPostscript(myps, New DrawOptions())
canvas.SaveAs(Server.MapPath("Canvas_DrawPostscript_103.png"))
The code above creates a new png file with the postscript
rendered over the top of the picture. The original and annotated
pictures are shown below.
sunset.jpg
Canvas_DrawPostscript_103.png
|