Saves the bitmap into specified Stream.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Sub Save ( _ stream As Stream, _ options As IEncoderOptions _ )
public void Save( Stream stream, IEncoderOptions options )
Type: System.IO.Stream
The target Stream.Using this method is the same as creating appropriate writer derived from FormatWriter and running it in synchronous mode.
<%@ Page Language="vb" AutoEventWireup="True"%> <%@ Import Namespace="Aurigma.GraphicsMill"%> <%@ Import Namespace="Aurigma.GraphicsMill.Codecs"%> <%@ Import Namespace="Aurigma.GraphicsMill.Transforms"%> <script language="vb" runat="server"> '#Region pageload Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim bitmap As New Bitmap(Server.MapPath("SourceImages/Mountain.jpg")) 'Resize to 100 pixels width bitmap.Transforms.Resize(100, 0, InterpolationMode.MediumQuality) 'Save image to response stream Response.Clear() bitmap.Save(Response.OutputStream, New JpegEncoderOptions(70, true)) Response.End() End Sub '#End Region </script>
<%@ Page Language="c#" AutoEventWireup="True" %> <%@ Import Namespace="Aurigma.GraphicsMill"%> <%@ Import Namespace="Aurigma.GraphicsMill.Codecs"%> <%@ Import Namespace="Aurigma.GraphicsMill.Transforms"%> <script language="c#" runat="server"> #region pageload private void Page_Load(object sender, System.EventArgs e) { Bitmap bitmap = new Bitmap(Server.MapPath(@"SourceImages/Mountain.jpg")); //Resize to 100 pixels width bitmap.Transforms.Resize(100, 0, InterpolationMode.MediumQuality); //Save image to response stream Response.Clear(); bitmap.Save(Response.OutputStream, new JpegEncoderOptions(70, true)); Response.End(); } #endregion </script>