Esempio n. 1
0
 /// <summary> Save image to stream in BMP-format.</summary>
 /// <param name="stream"></param>
 /// <param name="format"></param>
 /// <param name="saveResolution">Save original/user-defined resolution</param>
 public void SaveBmp(Stream stream, ImageFormat format, bool saveResolution)
 {
     ImageOutput.SaveStream(this, stream, format, saveResolution);
 }
Esempio n. 2
0
 /// <summary>Generic method that will save the image in the specified ImageFormat.</summary>
 /// <param name="fileName"></param>
 /// <param name="format">Image format to save the file in, for example ImageFormat.Tiff</param>
 /// <param name="saveResolution">Save original/user-defined resolution</param>
 /// <example>
 ///     <code title="Example" description="" lang="CS">
 /// // Save image to file system in the selected format
 /// image.SaveImage(@"C:\MyImages\Output.tif", ImageFormat.Tiff, true);</code>
 /// </example>
 public void SaveImage(string fileName, ImageFormat format, bool saveResolution)
 {
     ImageOutput.SaveFile(this, fileName, format, saveResolution);
 }
Esempio n. 3
0
 /// <summary>Save image to stream in PNG-format</summary>
 /// <param name="stream"></param>
 /// <param name="saveResolution">Save original/user-defined resolution</param>
 public void SavePng(Stream stream, bool saveResolution)
 {
     ImageOutput.SaveStream(this, stream, ImageFormat.Png, saveResolution);
 }
Esempio n. 4
0
 /// <summary>Save image to file in BMP-format.</summary>
 /// <param name="fileName"></param>
 /// <param name="saveResolution">Save original/user-defined resolution</param>
 public void SaveBmp(string fileName, bool saveResolution)
 {
     ImageOutput.SaveFile(this, fileName, ImageFormat.Bmp, saveResolution);
 }
Esempio n. 5
0
 public void SavePng(Stream stream, long quality)
 {
     ImageOutput.SaveStream(this, stream, quality, "image/png", false);
 }
Esempio n. 6
0
 public void SavePng(string fileName, long quality)
 {
     ImageOutput.SaveFile(this, fileName, quality, "image/png", false);
 }
Esempio n. 7
0
 /// <summary>Save image to stream in JPG-format</summary>
 /// <param name="stream">Stream to save the image to</param>
 /// <param name="quality">Compression quality setting (0-100)</param>
 /// <param name="saveResolution">Save original/user-defined resolution</param>
 /// <example>
 ///     <code title="Example" description="" lang="CS">
 /// // Save image to stream in jpg format with quality setting 90
 /// MemoryStream memoryStream = new MemoryStream();
 /// image.SaveJpg(memoryStream, 90, true);</code>
 /// </example>
 public void SaveJpg(Stream stream, long quality, bool saveResolution)
 {
     ImageOutput.SaveStream(this, stream, quality, "image/jpeg", saveResolution);
 }
Esempio n. 8
0
 /// <summary>Save image to file in JPG-format.</summary>
 /// <param name="fileName">Name of the file</param>
 /// <param name="quality">Compression quality setting (0-100)</param>
 /// <param name="saveResolution">Save original/user-defined resolution</param>
 /// <example>
 ///     <code title="Example" description="" lang="CS">
 /// // Save image to file system in jpg format with quality setting 90
 /// image.SaveJpg(@"C:\MyImages\Output.jpg", 90, true);</code>
 /// </example>
 public void SaveJpg(string fileName, long quality, bool saveResolution)
 {
     ImageOutput.SaveFile(this, fileName, quality, "image/jpeg", saveResolution);
 }
Esempio n. 9
0
        /// <summary>Save image to the response stream in GIF-format. Ideal for sending realtime generated images to the web client requesting it.</summary>
        /// <param name="fileName"></param>
        /// <remarks>This method will set the proper HTTP-headers such as filename and mime-type.</remarks>
        public void StreamGif(string fileName)
        {
            var imageStream = ImageOutput.PrepareImageStream(fileName, "image/gif");

            SaveGif(imageStream);
        }
Esempio n. 10
0
        /// <summary>
        /// Save image to the response stream in PNG-format. Ideal for sending realtime generated images to the web client requesting it.
        /// </summary>
        /// <param name="fileName"></param>
        /// <remarks>This method will set the proper HTTP-headers such as filename and mime-type.</remarks>
        public void StreamPng(string fileName)
        {
            var imageStream = ImageOutput.PrepareImageStream(fileName, "image/png");

            SavePng(imageStream);
        }
Esempio n. 11
0
        /// <summary>Save image to the response stream in JPG-format. Ideal for sending realtime generated images to the web client requesting it.</summary>
        /// <param name="quality"></param>
        /// <param name="fileName"></param>
        /// <remarks>This method will set the proper HTTP-headers such as filename and mime-type.</remarks>
        public void StreamJpg(long quality, string fileName)
        {
            var imageStream = ImageOutput.PrepareImageStream(fileName, "image/jpeg");

            SaveJpg(imageStream, quality);
        }
Esempio n. 12
0
 public void SavePng(string fileName, long quality)
 {
     ImageOutput.SaveFile(Image, fileName, quality, "image/png");
 }
Esempio n. 13
0
 public void SavePng(Stream stream, long quality)
 {
     ImageOutput.SaveStream(Image, stream, quality, "image/png");
 }