XImage.Raster
Features
Tech Specs
How-to C#
Pricing

C# Imaging Library
How to add, delete, extract, re-order multiple pages image file in C#.NET?


How to Process Image using C#.NET





RasterEdge XImage.Raster SDK for .NET is a powerful 3rd party toolkit with reasonable licensing. This .NET Raster SDK is compatible with both 32-bit and 64-bit operating systems and .NET Framework 2.0 & above versions.

This C#.NET Raster process library is a professional and advanced image manipulating control which can be applied to process and modify image.

RasterEdge XImage.Raster conversion toolkit for C#.NET supports to process various images, like Jpeg, Png, Bmp, Xmp and Gif, .NET Graphics, REImage (intermediate class), etc. In details, you may easily achieve the following image process. And detailed C# demo codes for these modifies are offered below.


Add, insert pages to a multi-page image file in C#



Insert an image or multipage document to the input file with specified location.

  1. Create a RasterImage object with an existing multi-page TIFF document loaded.
  2. Create the second RasterImage object with a PNG image loaded, which will be added to the tiff file later.
  3. Call method MultiPageImageProcess.InsetPage() to add, insert the PNG image file to the first page of the TIFF document, and print to a new TIFF file.

RasterImage tifDoc = new RasterImage("C://input//multi-page-tiff-sample.tif");
RasterImage newPage = new RasterImage("C://input//raster-sample-image.png");
MultiPageImageProcess.InsetPage(tifDoc, newPage, 
    0, "C://output//multi-page-tiff-new-page-inserted.tiff");




Delete, remove pages from a multi-page image file in C#



Using XImage.Raster C# image library, you can quickly delete, remove pages from a multiple pages image file (such as tiff, gif) in C# application.

  1. Load an existing multiple pages TIFF document into RasterImage object
  2. Specify the pages' index list which will be removed from the TIFF file. Here we will remove the first page (index value is 0), the 3rd page (index value is 2).
  3. Apply the pages deleting by calling method MultiPageImageProcess.DeletePages(), and print to a new TIFF file.

RasterImage tifDoc = new RasterImage("C://input//multi-page-tiff-sample.tif");
int[] index = new int[] {0, 2};
MultiPageImageProcess.DeletePages(tifDoc, index,
    "C://output//multi-page-tiff-page-deleted.tif");




Extract pages from a multi-page image file in C#



You can extract the specified pages from a multiple pages TIFF or GIF file, and print to a new image file in C# project.

  1. Create a new RasterImage object with a multi-page tiff file loaded.
  2. Specify the pages' index list which will be extracted from the TIFF file. Here we will remove the first page (index value is 0), the 3rd page (index value is 2).
  3. Apply the pages extraction function by calling method MultiPageImageProcess.ExtractPages(), and store the extracted image pages into a new RasterImage object.

RasterImage tifDoc = new RasterImage("C://input//multi-page-tiff-sample.tif");
int[] pageIndex = new int[]{0,2};
RasterImage extractedPagesImage = MultiPageImageProcess.ExtractPages(tifDoc, pageIndex);
extractedPagesImage.Save("C://output//multi-page-tiff-page-extracted.tif");




Re-order pages in a multi-page image file in C#



You can re-order the pages on a multi-page image file (tiff or gif) in C# application.

  1. Create a new RasterImage object with a multi-page image file loaded.
  2. Specify the new pages order. Here we will completely reverse the pages order. The last page will be put on the first position, and the first page will be on the last position.
  3. Apply the pages re-order function by calling method MultiPageImageProcess.ReOrderPages, and new multiple pages image file (tiff or gif) will be printed to the specified image file path.

RasterImage tifDoc = new RasterImage("C://input//multi-page-tiff-sample.tif");
int[] newOrders = new int[] {2, 1, 0};
MultiPageImageProcess.ReOrderPages(tifDoc, newOrders, "C://output//multi-page-tiff-page-reordered.tif");