|
[C#]
Canvas canvas = new Canvas(Server.MapPath("rez/boat.gif"));
canvas.SaveAs(Server.MapPath("myfile1.jpg"));
canvas.Export.Quality = 100;
canvas.SaveAs(Server.MapPath("myfile2.jpg"));
canvas.Export.Interlace = true;
canvas.SaveAs(Server.MapPath("myfile3.gif"));
canvas.Export.Interlace = false;
canvas.Export.TransparentPoint = new XPoint(10, 10);
canvas.SaveAs(Server.MapPath("myfile4.gif"));
[Visual Basic]
Dim canvas As New Canvas(Server.MapPath("rez/boat.gif"))
canvas.SaveAs(Server.MapPath("myfile1.jpg"))
canvas.Export.Quality = 100
canvas.SaveAs(Server.MapPath("myfile2.jpg"))
canvas.Export.Interlace = True
canvas.SaveAs(Server.MapPath("myfile3.gif"))
canvas.Export.Interlace = False
canvas.Export.TransparentPoint = New XPoint(10, 10)
canvas.SaveAs(Server.MapPath("myfile4.gif"))
This code produces four files as output. The first two files are
jpeg images. The second is saved in high quality.
The second two files are gif images. The first is interlaced and
the second is transparent (using the color at the point 10,10 as
the transparent color).
|