How to C#: Imaging
Using Imaging SDK for C#.NET
Winforms Controls
Image Load
Image Access and Modify
Effect: Color and Lightness
Effect: Color and Lightness
  |  
Home ›› XImage.Raster ›› C# Raster: Color and Lightness Effects

How to C#: Color and Lightness Effects


Overview for Color and Lightness Effects



vb.net pdf text extract, barcode scanner code in c#.net, vb.net pdf sdk, vb.net pdfreader class, azure function pdf generation, c# remove text from pdf.

Related .net document control helps:
asp.net sharepoint document viewer control: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
asp.net office viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
asp.net view excel in browser: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net view powerpoint: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
asp.net pdf editor component: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net annotate pdf control: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net mvc pdf editor control: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC


Overview



By using the XImage.Raster SDK, you can get and modify the color and lightness effects of image by assigning to processor. The related properties are as follows. convert powerpoint to pdf c# interop, pdf to tiff vb.net, convert pdf to tiff asp.net c#, c# pdf highlight text, c# imagemagick convert pdf to png, itextsharp split pdf vb.net, c# generate pdf from template.


Binarize


It may be useful to convert an image to 1bpp for facilitate cleanup image or image recognition. By setting the BinarizeThreshold property whose value range is 0 to 255, it will permanently modify the image to 1bpp grayscale image of the same dimensions. asp.net pdf writer, asp.net show image from url, asp.net multipage tiff viewer, asp.net mvc display pdf, best pdf preview in asp net c#, how to show pdf file in asp.net page c#, open word document file in browser in asp.net. While, the BinarizeLceFactor property will control the image's contrast.


Negate


Negate colors in image, if you only want to negate grayscale values in the image, then pass value true to NegateImage method.


Solorize


Simulate the scene of exposing a photographic film to light during the development process. The colors above threshold value will be negated.


Posterize


The images' colors will be reduced to simulate a “poster” effect.


Emboss


Convert the image to grayscale with a three-dimensional effect.




Steps to Posterize Image



Load an image with RasterImage object.


Create an image processor with ImageProcess object.


Call the PosterizeImage method of ImageProcess object to complete the task flopping image.


Save the modified image to an image file on the disk.


In order to acheive the work, please refer to the following steps.




Install XImage.Raster in C# Project



Add necessary references to your C#.NET project. Right-click the project and select "Add Reference..." to locate and add the following DLLs as project references;


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


Use corresponding namespaces;


  using RasterEdge.XImage.Raster;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:

       

       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.

       

       If using x86, the platform target should be x86.




Posterize Image



Sample Code (posterize image):




RasterImage img = new RasterImage(@"C:\input.tif");
ImageProcess process = new ImageProcess(img);
//simulate a poster effect, the number of color levels in each channel is set to 4. 
process.PosterizeImage(4, false);
//only posterize the second page of the input tif.
process.PosterizeImage(4, false, 1);
img.Save(@"C:\output.tif">);