Guide for C#
Load Image from .NET Graphics
Core Document Formats
Additional Features

C# Imaging - Load Image from .NET Graphics

Visual C# Codes for Loading Image from .NET Graphics with Image Processing DLL

Visual C#
Home > .NET Imaging SDK > C# > Load Image from .NET Graphics
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

Because .NET Graphics object doesn't contain any image data, it is used to draw on a canvas, which is typically a Bitmap object or the screen. That means, loading image from .NET Graphics in fact, is loading image from computer screen. RasterEdge provides a method to load image from .NET Graphics in your applications:
Related .net document control helps:
asp.net powerpoint viewer: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
asp.net mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net word viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
asp.net edit pdf text: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net document viewer c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
  • Written in Visual C# managed code with easy integration for .NET Framework 2.0 or above
  • Compatible with Visual Studio 2005 / 2008 / 2010 / 2012 / 2013
  • C# sample codes provided to load image from .NET graphics to your system
  • Catch the current screenshot in bmp image format and save to your local disk using C#
  • Free to process the image such as converting bmp to jpg, bmp to gif, bmp to png, etc.
  • Use imaging demo included in the download package as example
This tutorial will guide you to easily load a bmp image from .NET Graphics using Visual C# programming language. Listed below are the sections which will be included in this tutorial page:
  • How to create a sample C# application
  • C# method for loading image from .NET Graphics
  • C# sample codes to load image from .NET Graphics
  • Some more C# imaging function tutorials
What if you are a Visual Basic.NET programmer? Don't worry. RasterEdge also provides Visual Basic Examples for Loading Image from .NET Graphics. For more image loading / importing user manuals, such as loading image from local file, or downloading from a URL, please refer to the last section of this tutorial.
How to Create a C# Sample Application
This guide tells users how to load image from .NET Graphics with RasterEdge .NET Imaging SDK using Visual C# sample codes. If you want to view images and documents in .NET Windows and web applications, please go to tutorials for loading Image from .NET Graphics in WinForms and Web Document Image Viewer for Viewing Images from ASP.NET.)
  • Download the package. Please download the .NET imaging library SDK by clicking on the trial button above, and save the package to your local disk.
  • Create a project. Start your Microsoft Visual Studio program and create a new Visual C# windows application. (You can create a Visual C# Class Library project as well.)
  • Add to reference. Right click on Solution Explorer and select Add Reference... to add the libraries to your C#.NET project reference: RasterEdge.Imaging.Basic.dll and RasterEdge.Imaging.Basic.Codec.dll.
  • You might need to activate product license in order to use the DLLs successfully.
  • Now you have created your own C# imaging project. Please call the namespaces listed below, and then follow the steps later for methods and C# sample codes.
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Codec;
Visual C# Methods for Image Loading
Here are the stream methods you need in order to load a bmp image file from .NET Graphics. Please select a proper method according to your C# imaging project requirements. For complete Visual C# sample codings, please refer to the section below to get the full C# codes for loading image from .NET Graphics.
public int LoadImageFromGraphicScreen();
public int LoadImageFromGraphicScreen(bool fWorkingArea);
How to Load Image from .NET Graphics Using C#
Here are the stream methods you need in order to load a bmp image file from .NET Graphics. Please select a proper method according to your C# imaging project requirements. For complete Visual C# sample codings, please refer to the section below to get the full C# codes for loading image from .NET Graphics.
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.Basic;

namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
// invoke this method only once at the beginning of your code register all assemblies you referenced to your project
WorkRegistry.Reset();

REImage reImage = new REImage();
// get image from screen (flag to indicate if working area or not)
reImage.LoadImageFromGraphicScreen(true);
// save reimage to bitmap format recongnized by windows image viewer.
reImage.Save(ImageType.BMP, "c:/reimage.bmp");
}
}
}
More C# Imaging Viewing User Manual!


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com