<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>dotnetimageprocessor Wiki Rss Feed</title><link>http://dotnetimageprocessor.codeplex.com/</link><description>dotnetimageprocessor Wiki Rss Description</description><item><title>Updated Wiki: Home</title><link>http://dotnetimageprocessor.codeplex.com/wikipage?version=8</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;An image processing wrapper around GDI&amp;#43;, allowing you to apply one or more filters against an image source.&lt;br /&gt;&lt;br /&gt;Out-of-the-box support&amp;#58;&lt;br /&gt;&amp;#42; Conversion from one image type to another&lt;br /&gt;&amp;#42; Image resizing and various strategies for resolving aspect ratio&lt;br /&gt;&amp;#42; Edge detection&lt;br /&gt;&amp;#42; GIF support&lt;br /&gt;&amp;#42; Chaining filters together to perform complex operations on a single image&lt;br /&gt;&lt;br /&gt;Filters can be stacked and queued so that they run one after the other in a process queue. The processor can accept filenames, streams or a GDI image to perform the processing on.&lt;br /&gt;&lt;br /&gt;Future plans are&amp;#58;&lt;br /&gt;&amp;#42; More comprehensive filter support for blurring, sharpening, watermarking, inverting, and more&amp;#33;&lt;br /&gt;&amp;#42; Asynchronous processing support&lt;br /&gt;&amp;#42; Batch processing
&lt;h2&gt;Available on Nuget&lt;/h2&gt;As well as downloading the package straight from here, you can also install directly from inside Visual Studio using Nuget:&lt;br /&gt;&lt;pre&gt;
install-package Simplicode.ImageProcessor
&lt;/pre&gt;&lt;br /&gt;More information on the &lt;a href="http://nuget.org/List/Packages/Simplicode.ImageProcessor" class="externalLink"&gt;Nuget Package site&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Thu, 15 Mar 2012 10:06:47 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20120315100647A</guid></item><item><title>Updated Wiki: Documentation</title><link>http://dotnetimageprocessor.codeplex.com/documentation?version=6</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;.Net Image Processor&lt;/h1&gt;The main reason this project was created was to provide a simple wrapper for producing high-quality thumbnail images using GDI+ and .Net. The result is the beginnings of a processing framework which can be used to apply one or more filters to a single image in a processing queue. An interesting side-effect is that it can also easily be used to convert an image from one file format to another!&lt;br /&gt;
&lt;h2&gt;Creating an image processor&lt;/h2&gt;The image processor and its related objects live in the Simplicode.Imaging namespace:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor processor = new Imaging.ImageProcessor();
&lt;/pre&gt;
&lt;h2&gt;File format conversion&lt;/h2&gt;The image processing queue is kicked off by a call to &lt;span class="codeInline"&gt; ProcessImage() &lt;/span&gt;. &lt;br /&gt;To convert an image from PNG to Jpeg, simple process the two images using the overload which takes and input and output filename. The output file format is inferred from the filename extension, and the default Jpeg quality setting is 80%:&lt;br /&gt;&lt;pre&gt;
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_converted.jpg&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;You can force the output format and Jpeg quality settings by configuring the &lt;span class="codeInline"&gt;OutputFormat&lt;/span&gt; and &lt;span class="codeInline"&gt;JpegCompression&lt;/span&gt; properties. This can be useful when using the process overload which takes an input and output stream, where the output format cannot be inferred:&lt;br /&gt;&lt;pre&gt;
processor.OutputFormat = Imaging.OutputFormat.Jpeg;
processor.JpegCompression = 90L;
using (var inputStream = new FileStream(&amp;quot;testimage.png&amp;quot;, FileMode.Open))
{
  using (var outputStream = new FileStream(&amp;quot;testimage_converted_stream.jpg&amp;quot;, FileMode.Create))
  {
    processor.ProcessImage(inputStream, outputStream);
  }
}
&lt;/pre&gt;
&lt;h2&gt;GIF support&lt;/h2&gt;You can also output to GIF and specify the colour resolution, as in the following example which converts a test PNG image to GIF using a pallete of 128 colours:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
processor.GifColours = 128;
processor.OutputFormat = Imaging.OutputFormat.Gif;
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.gif&amp;quot;);
&lt;/pre&gt;
&lt;h2&gt;Resizing an image&lt;/h2&gt;To resize an image, simply add a &lt;span class="codeInline"&gt;Filters.ResizeFilter&lt;/span&gt; into the Filters collection on the processor. This can also be done during construction of the processor if desired:&lt;br /&gt;&lt;pre&gt;
var resizer = new ResizeFilter(400, 400);
processor.AddFilter(resizer);
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_resized.png&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;The default behaviour here is to resize the image to a &lt;b&gt;maximum&lt;/b&gt; of 400x400, keeping the aspect ratio of the original image. There, if your input image has an aspect ratio of 4:3, then using this configuration the actual size of the output image will be 400x300 pixels.&lt;br /&gt;&lt;br /&gt;To change the behaviour of the resizer, use the next overload which allows you to specify how the image is resized. For example, using &lt;span class="codeInline"&gt;ResizeMethod.Absolute&lt;/span&gt; will give you the output size you desire, but the image may appear stretched as it adapts to a new aspect ratio.&lt;br /&gt;
&lt;h3&gt;Cropping&lt;/h3&gt;To achieve the exact output size you want and also avoid stretching the image, you can use &lt;span class="codeInline"&gt;ResizeMethod.Crop&lt;/span&gt;, which will (by default) take the middle portion of the image if the difference between the input and output aspect ratios are such that stretching would normally occur. It will effectively give you the image size you want, but chopping off the top and bottom (or left and right, depending on the ratio difference) to compensate.&lt;br /&gt;&lt;br /&gt;You can use an additional overload to specify an anchor, which can be useful if you know that your area of interest is always in a particular part of the image (headshots, for example):&lt;br /&gt;&lt;pre&gt;
processor.Filters.Add(new ResizeFilter(400, 300, ResizeMethod.Crop, AnchorLocation.TopMiddle));
&lt;/pre&gt;&lt;br /&gt;Currently the anchor location is only used if &lt;span class="codeInline"&gt;ResizeMethod&lt;/span&gt; is set to &lt;span class="codeInline"&gt;ResizeMethod.Crop&lt;/span&gt;; it is ignore in all other cases.&lt;br /&gt;
&lt;h3&gt;Resize helper&lt;/h3&gt;If a simple image resize is all you need, you can also use a static helper method on the ImageProcessor class to resize an image:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor.ResizeImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.jpg&amp;quot;, 400, 300);
&lt;/pre&gt;&lt;br /&gt;This will resize an image using all the same default settings as when using filters normally. There are also optional parameters which allow you to specify some of the more detailed options:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor.ResizeImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.jpg&amp;quot;, 400, 300, 
  method: ResizeMethod.Crop, jpegQuality: 50L, anchorLocation: AnchorLocation.TopMiddle, outputFormat: Imaging.OutputFormat.Jpeg);
&lt;/pre&gt;
&lt;h2&gt;Edge Detection&lt;/h2&gt;To perform edge detection, simply use the built-in edge detection filter:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor(new EdgeDetectionFilter());
&lt;/pre&gt;&lt;br /&gt;This applies edge detection to an image, using a black background and white lines. You can specify the colours, and also the line threshold during construction or by setting the relevant properties:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor(new EdgeDetectionFilter(10, Color.Red, Color.Yellow));
&lt;/pre&gt;
&lt;h2&gt;Filter chaining&lt;/h2&gt;A feature of the library is the ability to &amp;#39;queue up&amp;#39; several filters and execute them in one go. Taking all of the above examples, we can apply some edge detection to an image and then resize it as in the following example:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
processor.Filters.Add(new EdgeDetectionFilter(7));
processor.Filters.Add(new ResizeFilter(200, 200));
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_chained.jpg&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;The image is first processed by the edge detection filter and then the result is passed on to the resize filter.
&lt;h2&gt;Watermarking&lt;/h2&gt;The library supports two types of watermarking - text and imaging. To apply either type, use the TextWatermarkFilter or ImageWatermarkFilter accordingly.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;TextWatermarkFilter&lt;/b&gt;&lt;br /&gt;To apply a text watermark to the processed image, add a TextWatermarkFilter into the processing chain. You can specify the text, font size, colour, style and anchor location when creating the class, like so:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
var textWatermark = new TextWatermarkFilter(&amp;quot;Copyright (C) Some Company 2011&amp;quot;)
{
  FontStyle = FontStyle.Bold,
  FontName = &amp;quot;Arial&amp;quot;,
  FontSize = 24,    
  Offset = new Point(-20, -20)
};
textWatermark.Opacity = .5f;
processor.AddFilter(textWatermark);
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_text_watermarked.png&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;ImageWatermarkFilter&lt;/b&gt;&lt;br /&gt;Image watermarking allows you to specify another image to watermark the processed image with. This simple overlays the processed image with another image (supporting transparency, if applicable), and again you can specify the anchor location:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
var watermark = new ImageWatermarkFilter(&amp;quot;watermark.png&amp;quot;, AnchorLocation.BottomRight);
watermark.Offset = new Point(-20, -20);
watermark.Opacity = .3f;

processor.AddFilter(watermark);
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_image_watermarked.png&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;Both types of filters allow you to specify the opacity (in the range 0 to 1, 0 being completely transparent) and an offset.&lt;br /&gt;
&lt;h2&gt;Creating filters&lt;/h2&gt;A powerful feature of the architecture is the ability to easily create filters, simply by implementing &lt;span class="codeInline"&gt;IImageFilter&lt;/span&gt;. Your filter can then be injected into the pipeline.&lt;br /&gt;&lt;br /&gt;Currently the interface just has a single method: &lt;span class="codeInline"&gt;ProcessImage&lt;/span&gt;, which takes an instance of a GDI &lt;span class="codeInline"&gt;Image&lt;/span&gt; and returns another image which has had some processing done to it. You are free to apply your own image processing, without worrying about how the images get there in the first place, what format they need to be in how they chain to other filters.&lt;br /&gt;&lt;br /&gt;A more complete example of creating custom filters is forthcoming.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Sun, 07 Aug 2011 11:15:50 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20110807111550A</guid></item><item><title>Updated Wiki: Documentation</title><link>http://dotnetimageprocessor.codeplex.com/documentation?version=5</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;.Net Image Processor&lt;/h1&gt;The main reason this project was created was to provide a simple wrapper for producing high-quality thumbnail images using GDI+ and .Net. The result is the beginnings of a processing framework which can be used to apply one or more filters to a single image in a processing queue. An interesting side-effect is that it can also easily be used to convert an image from one file format to another!&lt;br /&gt;
&lt;h2&gt;Creating an image processor&lt;/h2&gt;The image processor and its related objects live in the Simplicode.Imaging namespace:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor processor = new Imaging.ImageProcessor();
&lt;/pre&gt;
&lt;h2&gt;File format conversion&lt;/h2&gt;The image processing queue is kicked off by a call to &lt;span class="codeInline"&gt; ProcessImage() &lt;/span&gt;. &lt;br /&gt;To convert an image from PNG to Jpeg, simple process the two images using the overload which takes and input and output filename. The output file format is inferred from the filename extension, and the default Jpeg quality setting is 80%:&lt;br /&gt;&lt;pre&gt;
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_converted.jpg&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;You can force the output format and Jpeg quality settings by configuring the &lt;span class="codeInline"&gt;OutputFormat&lt;/span&gt; and &lt;span class="codeInline"&gt;JpegCompression&lt;/span&gt; properties. This can be useful when using the process overload which takes an input and output stream, where the output format cannot be inferred:&lt;br /&gt;&lt;pre&gt;
processor.OutputFormat = Imaging.OutputFormat.Jpeg;
processor.JpegCompression = 90L;
using (var inputStream = new FileStream(&amp;quot;testimage.png&amp;quot;, FileMode.Open))
{
  using (var outputStream = new FileStream(&amp;quot;testimage_converted_stream.jpg&amp;quot;, FileMode.Create))
  {
    processor.ProcessImage(inputStream, outputStream);
  }
}
&lt;/pre&gt;
&lt;h2&gt;GIF support&lt;/h2&gt;You can also output to GIF and specify the colour resolution, as in the following example which converts a test PNG image to GIF using a pallete of 128 colours:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
processor.GifColours = 128;
processor.OutputFormat = Imaging.OutputFormat.Gif;
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.gif&amp;quot;);
&lt;/pre&gt;
&lt;h2&gt;Resizing an image&lt;/h2&gt;To resize an image, simply add a &lt;span class="codeInline"&gt;Filters.ResizeFilter&lt;/span&gt; into the Filters collection on the processor. This can also be done during construction of the processor if desired:&lt;br /&gt;&lt;pre&gt;
var resizer = new ResizeFilter(400, 400);
processor.AddFilter(resizer);
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_resized.png&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;The default behaviour here is to resize the image to a &lt;b&gt;maximum&lt;/b&gt; of 400x400, keeping the aspect ratio of the original image. There, if your input image has an aspect ratio of 4:3, then using this configuration the actual size of the output image will be 400x300 pixels.&lt;br /&gt;&lt;br /&gt;To change the behaviour of the resizer, use the next overload which allows you to specify how the image is resized. For example, using &lt;span class="codeInline"&gt;ResizeMethod.Absolute&lt;/span&gt; will give you the output size you desire, but the image may appear stretched as it adapts to a new aspect ratio.&lt;br /&gt;
&lt;h3&gt;Cropping&lt;/h3&gt;To achieve the exact output size you want and also avoid stretching the image, you can use &lt;span class="codeInline"&gt;ResizeMethod.Crop&lt;/span&gt;, which will (by default) take the middle portion of the image if the difference between the input and output aspect ratios are such that stretching would normally occur. It will effectively give you the image size you want, but chopping off the top and bottom (or left and right, depending on the ratio difference) to compensate.&lt;br /&gt;&lt;br /&gt;You can use an additional overload to specify an anchor, which can be useful if you know that your area of interest is always in a particular part of the image (headshots, for example):&lt;br /&gt;&lt;pre&gt;
processor.Filters.Add(new ResizeFilter(400, 300, ResizeMethod.Crop, AnchorLocation.TopMiddle));
&lt;/pre&gt;&lt;br /&gt;Currently the anchor location is only used if &lt;span class="codeInline"&gt;ResizeMethod&lt;/span&gt; is set to &lt;span class="codeInline"&gt;ResizeMethod.Crop&lt;/span&gt;; it is ignore in all other cases.&lt;br /&gt;
&lt;h3&gt;Resize helper&lt;/h3&gt;If a simple image resize is all you need, you can also use a static helper method on the ImageProcessor class to resize an image:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor.ResizeImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.jpg&amp;quot;, 400, 300);
&lt;/pre&gt;&lt;br /&gt;This will resize an image using all the same default settings as when using filters normally. There are also optional parameters which allow you to specify some of the more detailed options:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor.ResizeImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.jpg&amp;quot;, 400, 300, 
  method: ResizeMethod.Crop, jpegQuality: 50L, anchorLocation: AnchorLocation.TopMiddle, outputFormat: Imaging.OutputFormat.Jpeg);
&lt;/pre&gt;
&lt;h2&gt;Edge Detection&lt;/h2&gt;To perform edge detection, simply use the built-in edge detection filter:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor(new EdgeDetectionFilter());
&lt;/pre&gt;&lt;br /&gt;This applies edge detection to an image, using a black background and white lines. You can specify the colours, and also the line threshold during construction or by setting the relevant properties:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor(new EdgeDetectionFilter(10, Color.Red, Color.Yellow));
&lt;/pre&gt;
&lt;h2&gt;Filter chaining&lt;/h2&gt;A feature of the library is the ability to &amp;#39;queue up&amp;#39; several filters and execute them in one go. Taking all of the above examples, we can apply some edge detection to an image and then resize it as in the following example:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
processor.Filters.Add(new EdgeDetectionFilter(7));
processor.Filters.Add(new ResizeFilter(200, 200));
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_chained.jpg&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;The image is first processed by the edge detection filter and then the result is passed on to the resize filter.
&lt;h2&gt;Watermarking&lt;/h2&gt;The library supports two types of watermarking - text and imaging. To apply either type, use the TextWatermarkFilter or ImageWatermarkFilter accordingly.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;TextWatermarkFilter&lt;/b&gt;&lt;br /&gt;To apply a text watermark to the processed image, add a TextWatermarkFilter into the processing chain. You can specify the text, font size, colour, style and anchor location when creating the class, like so:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
var textWatermark = new TextWatermarkFilter(&amp;quot;Copyright (C) Some Company 2011&amp;quot;)
{
  FontStyle = FontStyle.Bold,
  FontName = &amp;quot;Arial&amp;quot;,
  FontSize = 24,    
  Offset = new Point(-20, -20)
};
textWatermark.Opacity = .5f;
processor.AddFilter(textWatermark);
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_text_watermarked.png&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ImageWatermarkFilter&lt;/b&gt;&lt;br /&gt;Image watermarking allows you to specify another image to watermark the processed image with. This simple overlays the processed image with another image (supporting transparency, if applicable), and again you can specify the anchor location:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
var watermark = new ImageWatermarkFilter(&amp;quot;watermark.png&amp;quot;, AnchorLocation.BottomRight);
watermark.Offset = new Point(-20, -20);
watermark.Opacity = .3f;

processor.AddFilter(watermark);
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_image_watermarked.png&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Both types of filters allow you to specify the opacity (in the range 0 to 1, 0 being completely transparent) and an offset.&lt;br /&gt;
&lt;h2&gt;Creating filters&lt;/h2&gt;A powerful feature of the architecture is the ability to easily create filters, simply by implementing &lt;span class="codeInline"&gt;IImageFilter&lt;/span&gt;. Your filter can then be injected into the pipeline.&lt;br /&gt;&lt;br /&gt;Currently the interface just has a single method: &lt;span class="codeInline"&gt;ProcessImage&lt;/span&gt;, which takes an instance of a GDI &lt;span class="codeInline"&gt;Image&lt;/span&gt; and returns another image which has had some processing done to it. You are free to apply your own image processing, without worrying about how the images get there in the first place, what format they need to be in how they chain to other filters.&lt;br /&gt;&lt;br /&gt;A more complete example of creating custom filters is forthcoming.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Sun, 07 Aug 2011 11:14:16 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20110807111416A</guid></item><item><title>Updated Wiki: Home</title><link>http://dotnetimageprocessor.codeplex.com/wikipage?version=7</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;An image processing wrapper around GDI&amp;#43;, allowing you to apply one or more filters against an image source.&lt;br /&gt;&lt;br /&gt;Out-of-the-box support&amp;#58;&lt;br /&gt;&amp;#42; Conversion from one image type to another&lt;br /&gt;&amp;#42; Image resizing and various strategies for resolving aspect ratio&lt;br /&gt;&amp;#42; Edge detection&lt;br /&gt;&amp;#42; GIF support&lt;br /&gt;&amp;#42; Chaining filters together to perform complex operations on a single image&lt;br /&gt;&lt;br /&gt;Filters can be stacked and queued so that they run one after the other in a process queue. The processor can accept filenames, streams or a GDI image to perform the processing on.&lt;br /&gt;&lt;br /&gt;Future plans are&amp;#58;&lt;br /&gt;&amp;#42; More comprehensive filter support for blurring, sharpening, watermarking, inverting, and more&amp;#33;&lt;br /&gt;&amp;#42; Asynchronous processing support&lt;br /&gt;&amp;#42; Batch processing
&lt;h2&gt;Available on Nuget&lt;/h2&gt;As well as downloading the package straight from here, you can also install directly from inside Visual Studio 2010 using Nuget:&lt;br /&gt;&lt;pre&gt;
install-package Simplicode.ImageProcessor
&lt;/pre&gt;&lt;br /&gt;More information on the &lt;a href="http://nuget.org/List/Packages/Simplicode.ImageProcessor" class="externalLink"&gt;Nuget Package site&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Thu, 07 Jul 2011 09:47:14 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20110707094714A</guid></item><item><title>Updated Wiki: Home</title><link>http://dotnetimageprocessor.codeplex.com/wikipage?version=6</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;An image processing wrapper around GDI&amp;#43;, allowing you to apply one or more filters against an image source.&lt;br /&gt;&lt;br /&gt;Out-of-the-box support&amp;#58;&lt;br /&gt;&amp;#42; Conversion from one image type to another&lt;br /&gt;&amp;#42; Image resizing and various strategies for resolving aspect ratio&lt;br /&gt;&amp;#42; Edge detection&lt;br /&gt;&amp;#42; GIF support&lt;br /&gt;&amp;#42; Chaining filters together to perform complex operations on a single image&lt;br /&gt;&lt;br /&gt;Filters can be stacked and queued so that they run one after the other in a process queue. The processor can accept filenames, streams or a GDI image to perform the processing on.&lt;br /&gt;&lt;br /&gt;Future plans are&amp;#58;&lt;br /&gt;&amp;#42; More comprehensive filter support for blurring, sharpening, watermarking, inverting, and more&amp;#33;&lt;br /&gt;&amp;#42; Asynchronous processing support&lt;br /&gt;&amp;#42; Batch processing&lt;br /&gt;
&lt;h2&gt;ImageResizer.net Merge&lt;/h2&gt;There are currently talks underway to merge this project with &lt;a href="http://imageresizing.net" class="externalLink"&gt;ImageResizing.net&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, a performance image compositing library with many free and commercial plugins. Once the merge happens, it is unlikely that this library will continue to be updated and all development effort will go into that project instead.&lt;br /&gt;&lt;br /&gt;For more information please see &lt;a href="http://imageresizing.net" class="externalLink"&gt;ImageResizing.net homepage&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. Comments? &lt;a href="http://dotnetimageprocessor.codeplex.com/discussions/263376"&gt;Join the discussion&lt;/a&gt;!&lt;br /&gt;
&lt;h2&gt;Available on Nuget&lt;/h2&gt;As well as downloading the package straight from here, you can also install directly from inside Visual Studio 2010 using Nuget:&lt;br /&gt;&lt;pre&gt;
install-package Simplicode.ImageProcessor
&lt;/pre&gt;&lt;br /&gt;More information on the &lt;a href="http://nuget.org/List/Packages/Simplicode.ImageProcessor" class="externalLink"&gt;Nuget Package site&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Thu, 30 Jun 2011 08:52:33 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20110630085233A</guid></item><item><title>Updated Wiki: Home</title><link>http://dotnetimageprocessor.codeplex.com/wikipage?version=5</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;An image processing wrapper around GDI&amp;#43;, allowing you to apply one or more filters against an image source.&lt;br /&gt;&lt;br /&gt;Out-of-the-box support&amp;#58;&lt;br /&gt;&amp;#42; Conversion from one image type to another&lt;br /&gt;&amp;#42; Image resizing and various strategies for resolving aspect ratio&lt;br /&gt;&amp;#42; Edge detection&lt;br /&gt;&amp;#42; GIF support&lt;br /&gt;&amp;#42; Chaining filters together to perform complex operations on a single image&lt;br /&gt;&lt;br /&gt;Filters can be stacked and queued so that they run one after the other in a process queue. The processor can accept filenames, streams or a GDI image to perform the processing on.&lt;br /&gt;&lt;br /&gt;Future plans are&amp;#58;&lt;br /&gt;&amp;#42; More comprehensive filter support for blurring, sharpening, watermarking, inverting, and more&amp;#33;&lt;br /&gt;&amp;#42; Asynchronous processing support&lt;br /&gt;&amp;#42; Batch processing&lt;br /&gt;
&lt;h2&gt;ImageResizer.net Merge&lt;/h2&gt;There are currently talks underway to merge this project with &lt;a href="http://imageresizing.net" class="externalLink"&gt;ImageResizing.net&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, a performance image compositing library with many free and commercial plugins. Once the merge happens, it is unlikely that this library will continue to be updated and all development effort will go into that project instead.&lt;br /&gt;&lt;br /&gt;For more information please see &lt;a href="http://imageresizing.net" class="externalLink"&gt;ImageResizing.net homepage&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. Comments? &lt;a href="http://dotnetimageprocessor.codeplex.com/discussions/236376"&gt;Join the discussion&lt;/a&gt;!&lt;br /&gt;
&lt;h2&gt;Available on Nuget&lt;/h2&gt;As well as downloading the package straight from here, you can also install directly from inside Visual Studio 2010 using Nuget:&lt;br /&gt;&lt;pre&gt;
install-package Simplicode.ImageProcessor
&lt;/pre&gt;&lt;br /&gt;More information on the &lt;a href="http://nuget.org/List/Packages/Simplicode.ImageProcessor" class="externalLink"&gt;Nuget Package site&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Thu, 30 Jun 2011 08:50:54 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20110630085054A</guid></item><item><title>Updated Wiki: Home</title><link>http://dotnetimageprocessor.codeplex.com/wikipage?version=4</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;An image processing wrapper around GDI&amp;#43;, allowing you to apply one or more filters against an image source.&lt;br /&gt;&lt;br /&gt;Out-of-the-box support&amp;#58;&lt;br /&gt;&amp;#42; Conversion from one image type to another&lt;br /&gt;&amp;#42; Image resizing and various strategies for resolving aspect ratio&lt;br /&gt;&amp;#42; Edge detection&lt;br /&gt;&amp;#42; GIF support&lt;br /&gt;&amp;#42; Chaining filters together to perform complex operations on a single image&lt;br /&gt;&lt;br /&gt;Filters can be stacked and queued so that they run one after the other in a process queue. The processor can accept filenames, streams or a GDI image to perform the processing on.&lt;br /&gt;&lt;br /&gt;Future plans are&amp;#58;&lt;br /&gt;&amp;#42; More comprehensive filter support for blurring, sharpening, watermarking, inverting, and more&amp;#33;&lt;br /&gt;&amp;#42; Asynchronous processing support&lt;br /&gt;&amp;#42; Batch processing&lt;br /&gt;
&lt;h2&gt;ImageResizer.net Merge&lt;/h2&gt;There are currently talks underway to merge this project with &lt;a href="http://imageresizing.net" class="externalLink"&gt;ImageResizing.net&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, a performance image compositing library with many free and commercial plugins. Once the merge happens, it is unlikely that this library will continue to be updated and all development effort will go into that project instead.&lt;br /&gt;&lt;br /&gt;For more information please see &lt;a href="http://imageresizing.net" class="externalLink"&gt;ImageResizing.net homepage&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Available on Nuget&lt;/h2&gt;As well as downloading the package straight from here, you can also install directly from inside Visual Studio 2010 using Nuget:&lt;br /&gt;&lt;pre&gt;
install-package Simplicode.ImageProcessor
&lt;/pre&gt;&lt;br /&gt;More information on the &lt;a href="http://nuget.org/List/Packages/Simplicode.ImageProcessor" class="externalLink"&gt;Nuget Package site&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Thu, 30 Jun 2011 08:41:36 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20110630084136A</guid></item><item><title>Updated Wiki: Home</title><link>http://dotnetimageprocessor.codeplex.com/wikipage?version=3</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Project Description&lt;/b&gt;&lt;br /&gt;An image processing wrapper around GDI&amp;#43;, allowing you to apply one or more filters against an image source.&lt;br /&gt;&lt;br /&gt;Out-of-the-box support&amp;#58;&lt;br /&gt;&amp;#42; Conversion from one image type to another&lt;br /&gt;&amp;#42; Image resizing and various strategies for resolving aspect ratio&lt;br /&gt;&amp;#42; Edge detection&lt;br /&gt;&amp;#42; GIF support&lt;br /&gt;&amp;#42; Chaining filters together to perform complex operations on a single image&lt;br /&gt;&lt;br /&gt;Filters can be stacked and queued so that they run one after the other in a process queue. The processor can accept filenames, streams or a GDI image to perform the processing on.&lt;br /&gt;&lt;br /&gt;Future plans are&amp;#58;&lt;br /&gt;&amp;#42; More comprehensive filter support for blurring, sharpening, watermarking, inverting, and more&amp;#33;&lt;br /&gt;&amp;#42; Asynchronous processing support&lt;br /&gt;&amp;#42; Batch processing&lt;br /&gt;
&lt;h2&gt;Available on Nuget&lt;/h2&gt;As well as downloading the package straight from here, you can also install directly from inside Visual Studio 2010 using Nuget:&lt;br /&gt;&lt;pre&gt;
install-package Simplicode.ImageProcessor
&lt;/pre&gt;&lt;br /&gt;More information on the &lt;a href="http://nuget.org/List/Packages/Simplicode.ImageProcessor" class="externalLink"&gt;Nuget Package site&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Mon, 27 Jun 2011 22:55:52 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20110627105552P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://dotnetimageprocessor.codeplex.com/documentation?version=4</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;.Net Image Processor&lt;/h1&gt;The main reason this project was created was to provide a simple wrapper for producing high-quality thumbnail images using GDI+ and .Net. The result is the beginnings of a processing framework which can be used to apply one or more filters to a single image in a processing queue. An interesting side-effect is that it can also easily be used to convert an image from one file format to another!&lt;br /&gt;
&lt;h2&gt;Creating an image processor&lt;/h2&gt;The image processor and its related objects live in the Simplicode.Imaging namespace:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor processor = new Imaging.ImageProcessor();
&lt;/pre&gt;
&lt;h2&gt;File format conversion&lt;/h2&gt;The image processing queue is kicked off by a call to &lt;span class="codeInline"&gt; ProcessImage() &lt;/span&gt;. &lt;br /&gt;To convert an image from PNG to Jpeg, simple process the two images using the overload which takes and input and output filename. The output file format is inferred from the filename extension, and the default Jpeg quality setting is 80%:&lt;br /&gt;&lt;pre&gt;
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_converted.jpg&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;You can force the output format and Jpeg quality settings by configuring the &lt;span class="codeInline"&gt;OutputFormat&lt;/span&gt; and &lt;span class="codeInline"&gt;JpegCompression&lt;/span&gt; properties. This can be useful when using the process overload which takes an input and output stream, where the output format cannot be inferred:&lt;br /&gt;&lt;pre&gt;
processor.OutputFormat = Imaging.OutputFormat.Jpeg;
processor.JpegCompression = 90L;
using (var inputStream = new FileStream(&amp;quot;testimage.png&amp;quot;, FileMode.Open))
{
  using (var outputStream = new FileStream(&amp;quot;testimage_converted_stream.jpg&amp;quot;, FileMode.Create))
  {
    processor.ProcessImage(inputStream, outputStream);
  }
}
&lt;/pre&gt;
&lt;h2&gt;GIF support&lt;/h2&gt;You can also output to GIF and specify the colour resolution, as in the following example which converts a test PNG image to GIF using a pallete of 128 colours:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
processor.GifColours = 128;
processor.OutputFormat = Imaging.OutputFormat.Gif;
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.gif&amp;quot;);
&lt;/pre&gt;
&lt;h2&gt;Resizing an image&lt;/h2&gt;To resize an image, simply add a &lt;span class="codeInline"&gt;Filters.ResizeFilter&lt;/span&gt; into the Filters collection on the processor. This can also be done during construction of the processor if desired:&lt;br /&gt;&lt;pre&gt;
var resizer = new ResizeFilter(400, 400);
processor.AddFilter(resizer);
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_resized.png&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;The default behaviour here is to resize the image to a &lt;b&gt;maximum&lt;/b&gt; of 400x400, keeping the aspect ratio of the original image. There, if your input image has an aspect ratio of 4:3, then using this configuration the actual size of the output image will be 400x300 pixels.&lt;br /&gt;&lt;br /&gt;To change the behaviour of the resizer, use the next overload which allows you to specify how the image is resized. For example, using &lt;span class="codeInline"&gt;ResizeMethod.Absolute&lt;/span&gt; will give you the output size you desire, but the image may appear stretched as it adapts to a new aspect ratio.&lt;br /&gt;
&lt;h3&gt;Cropping&lt;/h3&gt;To achieve the exact output size you want and also avoid stretching the image, you can use &lt;span class="codeInline"&gt;ResizeMethod.Crop&lt;/span&gt;, which will (by default) take the middle portion of the image if the difference between the input and output aspect ratios are such that stretching would normally occur. It will effectively give you the image size you want, but chopping off the top and bottom (or left and right, depending on the ratio difference) to compensate.&lt;br /&gt;&lt;br /&gt;You can use an additional overload to specify an anchor, which can be useful if you know that your area of interest is always in a particular part of the image (headshots, for example):&lt;br /&gt;&lt;pre&gt;
processor.Filters.Add(new ResizeFilter(400, 300, ResizeMethod.Crop, AnchorLocation.TopMiddle));
&lt;/pre&gt;&lt;br /&gt;Currently the anchor location is only used if &lt;span class="codeInline"&gt;ResizeMethod&lt;/span&gt; is set to &lt;span class="codeInline"&gt;ResizeMethod.Crop&lt;/span&gt;; it is ignore in all other cases.&lt;br /&gt;
&lt;h3&gt;Resize helper&lt;/h3&gt;If a simple image resize is all you need, you can also use a static helper method on the ImageProcessor class to resize an image:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor.ResizeImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.jpg&amp;quot;, 400, 300);
&lt;/pre&gt;&lt;br /&gt;This will resize an image using all the same default settings as when using filters normally. There are also optional parameters which allow you to specify some of the more detailed options:&lt;br /&gt;&lt;pre&gt;
Simplicode.Imaging.ImageProcessor.ResizeImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage.jpg&amp;quot;, 400, 300, 
  method: ResizeMethod.Crop, jpegQuality: 50L, anchorLocation: AnchorLocation.TopMiddle, outputFormat: Imaging.OutputFormat.Jpeg);
&lt;/pre&gt;
&lt;h2&gt;Edge Detection&lt;/h2&gt;To perform edge detection, simply use the built-in edge detection filter:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor(new EdgeDetectionFilter());
&lt;/pre&gt;&lt;br /&gt;This applies edge detection to an image, using a black background and white lines. You can specify the colours, and also the line threshold during construction or by setting the relevant properties:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor(new EdgeDetectionFilter(10, Color.Red, Color.Yellow));
&lt;/pre&gt;
&lt;h2&gt;Filter chaining&lt;/h2&gt;A feature of the library is the ability to &amp;#39;queue up&amp;#39; several filters and execute them in one go. Taking all of the above examples, we can apply some edge detection to an image and then resize it as in the following example:&lt;br /&gt;&lt;pre&gt;
processor = new Imaging.ImageProcessor();
processor.Filters.Add(new EdgeDetectionFilter(7));
processor.Filters.Add(new ResizeFilter(200, 200));
processor.ProcessImage(&amp;quot;testimage.png&amp;quot;, &amp;quot;testimage_chained.jpg&amp;quot;);
&lt;/pre&gt;&lt;br /&gt;The image is first processed by the edge detection filter and then the result is passed on to the resize filter.&lt;br /&gt;
&lt;h2&gt;Creating filters&lt;/h2&gt;A powerful feature of the architecture is the ability to easily create filters, simply by implementing &lt;span class="codeInline"&gt;IImageFilter&lt;/span&gt;. Your filter can then be injected into the pipeline.&lt;br /&gt;&lt;br /&gt;Currently the interface just has a single method: &lt;span class="codeInline"&gt;ProcessImage&lt;/span&gt;, which takes an instance of a GDI &lt;span class="codeInline"&gt;Image&lt;/span&gt; and returns another image which has had some processing done to it. You are free to apply your own image processing, without worrying about how the images get there in the first place, what format they need to be in how they chain to other filters.&lt;br /&gt;&lt;br /&gt;A more complete example of creating custom filters is forthcoming.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>elkdanger</author><pubDate>Mon, 27 Jun 2011 22:22:04 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20110627102204P</guid></item></channel></rss>