- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- AmbiguousFontCollisionException Class
- Bitmap Class
- BitmapEmptyException Class
- BitmapStatisticsProvider Class
- Channel Enumeration
- ChannelCombiner Class
- ChannelSplitter Class
- ChannelsProvider Class
- CMAdobeModuleLoadException Class
- CMException Class
- CMInappropriateProfileException Class
- CMOpenProfileException Class
- CMTransformException Class
- Cmyk16Color Class
- CmykChannelCombiner Class
- CmykChannelSplitter Class
- CmykColor Class
- CodecAdapter Class
- Color Class
- ColorAdjustmentProvider Class
- ColorManagementProvider Class
- ColorPalette Class
- ColorPaletteEmptyException Class
- ColorPaletteType Enumeration
- ColorProfile Class
- ColorProfileClass Enumeration
- ColorSpace Enumeration
- CompressedImage Class
- CompressedStream Class
- Configuration Class
- DuplicateFamilyStyleException Class
- DuplicateFontAliasException Class
- DuplicatePostscriptNameException Class
- FamilyStyleConflict Class
- FontException Class
- FontMissingException Class
- GMException Class
- GraphicsContainerRasterizer Class
- Grayscale16Color Class
- GrayscaleChannelCombiner Class
- GrayscaleChannelSplitter Class
- GrayscaleColor Class
- Histogram Class
- HistogramMode Enumeration
- IImageDescriptor Interface
- IImageParams Interface
- Image Class
- ImageGenerator Class
- ImageParams Class
- IndexedColor Class
- Ink Class
- InvalidPropertyValueException Class
- InvalidSourceException Class
- Lab16Color Class
- LabChannelCombiner Class
- LabChannelSplitter Class
- LabColor Class
- MissingIndexColorException Class
- ObjectClosedException Class
- ObjectEmptyException Class
- OnInitEventArgs Class
- OutOfMemoryException Class
- Pipeline Class
- PipelineElement Class
- PipelineException Class
- PixelFormat Class
- PostscriptNameConflict Class
- ProgressEventArgs Class
- ProgressReporter Class
- Rational Class
- Rgb16Color Class
- RgbChannelCombiner Class
- RgbChannelSplitter Class
- RgbColor Class
- SehException Class
- SpotColor Class
- TransformException Class
- TransformsProvider Class
- TrialPeriodTimeException Class
- UnexpectedException Class
- Unit Enumeration
- UnitConverter Class
- UnsignedRational Class
- UnsupportedFontException Class
- UnsupportedPixelFormatException Class
- Win32Exception Class
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Codecs.ClippingPath Namespace
- Aurigma.GraphicsMill.Codecs.Psd Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Drawing.Art Namespace
- Aurigma.GraphicsMill.Drawing.Effects Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Templates Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Aurigma.GraphicsMill Namespace
- Licensing
- End User License Agreement
- Copyright Notices
Pipeline Class
Represents a collection of PipelineElements.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
C#
public sealed class Pipeline : Collection<PipelineElement>
Remarks
Pipelines allow reading and writing image files and processing them without the necessity to load a whole bitmap into memory. This essentially means that you can process large images without getting out-of-memory errors, even on an x86 platform. Pipelines offer the following benefites:
- Within a pipeline, an image is processed stripe by stripe - a portion of image data having the same width as the original and height selected by Graphics Mill for optimal processing.
- Temporary bitmap data may be dumped to the hard drive if it is necessary.
- Descriptive image processing sequence, meaning that image data flows through the pipeline from one transformation to another, so each next element receives the result of the previous processing.
- Ability to build branched pipelines. This is an approach whereby the transformation result can be passed to an arbitrary number of receivers and each of them can process the received data in its own way. For example, you can open an image and save it to JPEG and PNG files, or produce multiple thumbnails of different size at one pass. See the Examples section for details.
Examples
This code sample reads an image from JPEG file, crops a square from its center, adjusts brightness, and writes the result to another file.
C#
using (var reader = ImageReader.Create(@"Images\in.jpg"))
{
var rect = new System.Drawing.Rectangle()
{
X = Math.Max((reader.Width - reader.Height) / 2, 0),
Y = Math.Max((reader.Height - reader.Width) / 2, 0),
Width = Math.Min(reader.Width, reader.Height),
Height = Math.Min(reader.Width, reader.Height)
};
using (var crop = new Crop(rect))
using (var brightness = new Brightness())
using (var writer = ImageWriter.Create(@"Images\Output\out.jpg"))
{
Pipeline.Run(reader + crop + brightness + writer);
}
}
The following code shows how to create two 128x128 and 2048x2048 thumbnails for a single image.
C#
using (var reader = ImageReader.Create(@"Images\in.jpg"))
{
var resizeBig = new Pipeline()
{
new Resize(2048, 0),
ImageWriter.Create(@"Images\Output\out_2048.jpg")
};
var resizeSmall = new Pipeline()
{
new Resize(128, 0),
ImageWriter.Create(@"Images\Output\out_128.jpg")
};
reader.Receivers.Add(resizeBig.Build());
reader.Receivers.Add(resizeSmall.Build());
Pipeline.Run(reader);
resizeBig.DisposeAllElements();
resizeSmall.DisposeAllElements();
}
Inheritance Hierarchy
System.Object