How to C#: Imaging
Using Imaging SDK for C#.NET
Winforms Controls
Image Load
Image Access and Modify
Image Save
Using Imaging SDK for C#.NET ››

C# Imaging - Image Saving & Printing in C#.NET

Free Visual C# Codes for Saving and Printing Image in C#.NET Imaging SDK

C#.NET Imaging Saving & Printing Overview

RasterEdge .NET Imaging SDK is a pre-configured, high-end image and document toolkit designed to offer fast, high-end image and document viewing, manipulation, saving, printing and scanning solutions without the need to download any additional controls on end-user side. RasterEdge .NET Imaging SDK also can be employed to streamline image and document processing for a wide variety of industries and document types. The .NET applications can integrate RasterEdge .NET Imaging SDK are Windows Forms, ASP.NET, ASP.NET MVC, C#.NET , VB.NET, vb6, Delphi, etc.

Rich functions are provided for Visual C#.NET developers to save customized images as black and white, grayscale or color images with appropriate settings. Windows printing is also supported if you have installed a valid Windows printer driver.

C#.NET Image Saving and Printing Features

Completely free C# code for image and document saving and printing

Easy to save as single page documents within C# code

Easy to save as multi-page file formats

Use C# code to save image as black and white, grayscale or color image

Use C# code to save image into disk or project memory as you wish

Support for single or multi-page printing

Include normal and fast image printing in C#.NET project

Support for low-resolution or high-resolution printing

C# code for saving customized images & documents into 30+ formats

Image Saving & Printing in C#.NET

This guide describes how to save and print images or documents using RasterEdge .NET Imaging SDK with Visual C# sample codes. As showed in the following guide tips, users need to create a C#.NET Windows application in Visual Studio 2005 or greater versions.

Start Visual Studio 2005 and create a C#.NET Windows Application;

After you created a project in Visual Studio, you may add the following RasterEdge DocImage SDK for .NET assemblies to your C# project reference;

  RasterEdge.Imaging.Basic.dll & RasterEdge.Imaging.Basic.Codec.dll

Activate .NET Imaging SDK license as required;

Add following using statements of RasterEdge DocImage SDK for .NET.

  using RasterEdge.Imaging.Basic.Core;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.Imaging.Basic.Codec;

Methods to Save Files in C#.NET Project

As a premier image and document management library vendor, RasterEdge aims at developing the most complete and robust document imaging APIs for C#.NET users to write customized imaging functions. Following saving methods are used for saving REImage to file, stream or byte array in C#.NET windows and web applications.

public byte[] Save(ImageType targetType);
public void Save(ImageType targetType, Stream stream);
public void Save(ImageType targetType, string filePath);

Method to Print Image in C#.NET Project

Except for methods for saving image and document, method for printing image and document files is also available by using RasterEdge C#.NET Imaging SDK. If you have installed the valid Windows printer devices, following printing method can be applied to your application directly and efficiently.

Public Print(int ImageID);

Entire C# Code for Image Saving

The following Visual C# class code demonstrates how to save an image. And our main supported image formats are: gif, bmp, png, jpeg and tiff.

string fileName = "c:/Sample.png";
string destinationFilePath = "c:/destn.png";

REImage reImage = new REImage(fileName);
MemoryStream stream  = new MemoryStream();
// save image to the stream
// save image to file