Branched Pipeline

Codecs Format Conversion Drawing Bitmap Pipeline Write Metadata Read Transform Color Conversion Text JPG TIFF Channels Filesystem Adobe Resources PDF Color Management Resize Color Adjustment Multiple frames Text Layout PSD Clipping Paths EXIF Formatted Text Branched Pipeline Personalization PSD Processor Color Profile Crop Extra Channels Graphics Container Interoperability Lossless JPEG Spot Color WEBP Font GIF IPTC Rotate Thumbnail WPF Advanced Art Text Indexed format PNG Stream TGA XMP Compression EPS Gradient Image Validation Modify Container SVG Watermark Green Screen Pixel Access Rasterization RAW Transparentize VDP Vignette BMP

Assemble Pipeline manually

In general, the Pipeline API assumes that each element may have several receivers, and each of them receives the same data to process. Here we illustrate how to implement the use case shown in the Create linear pipeline sample using the Pipeline class only for running, while constructing the data flow manually.

You can read more information about pipelines in the documentation.

Combine Channels

Merges separate image channels into a single RGB image using Pipeline API.

Multiple thumbnails

Creates two different-sized images from a single read of the source image. In most cases, reading the image is the bottleneck, so this approach significantly improves performance.

Split And Combine Channels

Splits an image into its RGB channels, adjusts each channel's brightness, and recombines them.

Split Channels

Split the RGB channels of an image, adjust their brightness individually, and save each channel as a separate image.

Using the OnInit event to configure pipeline elements

What if we want to adjust pipeline element settings depending on the actual input data? In most cases you have access to the source element, but in more sophisticated scenarios the pipeline may be large, and it may be hard to track all possible changes of the image parameters. Or you may decide to split the pipeline assembly logic into several methods. In this case, it is possible to change pipeline element settings from an OnInit event handler. You get the actual image parameters that the element receives from its source, and change the properties according to those parameters. In this example, we'll scale the original image by a factor of 2.5 while preserving its aspect ratio, and place a watermark image in the center. The watermark image will be half the size of the bottom image.

You can read more information about pipelines in the documentation.

For AI-assisted development: Download Graphics Mill Code Samples XML Catalog