Visual C#.NET: Load Document & Image from File

How to load, open documents & images from File using C#.NET
Sometimes, developers need to open existing image files for different purposes. Yiigo.Image for .NET provides two standard ways to open existing files of document & images: from file or from a stream. Find more document & image loading information on Yiigo.Image for .NET.
Yiigo.Image for .NET has those following functionalities:
  • Load images in bitonal, color and grayscale
  • Open both PDF and Word documents
  • Load existing image & documents file from disk
  • Load existing image & document using a Stream
  • Other image loading functions
This document provides comprehensive Visual C#.NET samples for guiding developers to load and open documents and images in different formats from file using Yiigo.Image for .NET. Find more image loading tutorials on Load Image & Documents from Files in VB.NET, Load Image & Documents from Files on Web Imaging Viewer & Documents from Files in .NET Winforms.
Load Image & Document from Files with C#.NET Sample Code

Requirements

Before loading & opening image and documents from files using Yiigo.Image for .NET in Visual C#.NET, make sure that you have installed.
  • Operating systems - Windows 7, Windows Vista, and Windows XP, etc
  • Compatible with .NET framework 2.0 and above versions
  • Support Visual Studio 2005, 2010 and other .NET development environments
  • Yiigo.Image for .NET installation

Start to Load Image and Document from Disk

  • Open and run your Microsoft Visual Studio;
  • Choose either "Visual C# Projects" in "New Project" dialog box;
  • Choose "Windows Application" in the "Templates" List and name it "YiigoImagingLoadCsharp";
  • Right-click on the "References" folder, and select "Add Reference..." from the context menu in the "Solution Explorer" window;
  • In the "Add Reference" dialog box, select the ".NET" tab and browse to Yiigo.Imaging.Net.dll library;
  • Add it to your Visual C# applications;
  • Call Yiigo .NET Image Namespace & Copy those following codes:
using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Loading;

// Load images
YiigoImage image = new YiigoImage();
image.Load(@"C:\1.png");

// Load PDF document
YiigoImage doc = new YiigoImage();
doc.Load(@"C:\1.pdf");

// Load Microsoft Word document
YiigoImage doc = new YiigoImage();
doc.Load(@"C:\1.docx");

Start to Load Image and Document Using a Stream

using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Loading;

// Create a stream object
System.IO.FileStream stream = new System.IO.FileStream(@"C:\yiggo_example.bmp", System.IO.FileMode.Open);

//Open image file using the Stream Object
YiigoImage image = new YiigoImage();
image.Load(stream);
Products
Other Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner