Resize

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.

Conditionally adding pipeline elements

This sample demonstrates how to conditionally add elements to a pipeline based on the properties of the input image. It shows how to create thumbnails in the sRGB color space with a specified DPI value.

You can read more information about pipelines in the documentation.

Create linear pipeline

This sample demonstrates how to create a linear pipeline using simplified syntax. This is the most common use case, when all elements are known and their order is straightforward.

You can read more information about pipelines in the documentation.

Draw text watermark on thumbnail image

This sample shows how to create a thumbnail image and draw a semi-transparent text watermark on top of it using the GraphicsMill transforms and advanced drawing APIs. It demonstrates how to resize the source image with the Resize transform, register a custom font, and render text with Drawer and PlainText. You can read more information about drawing in the documentation.

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.

Resize

Resizes image using memory-friendly Pipeline API.

Resize

Resizes image.

Resize And Preserve Metadata

Resize a JPEG and preserve/update metadata with Aurigma Graphics Mill. Halves width (keeps aspect), updates EXIF Software, adds IPTC keyword, sets Adobe copyright flag, adds XMP dc:contributor, and saves all metadata.

Resize Animated Gif

Resizes animated image in GIF format.

Resize Image And Clipping Path (Memory Friendly)

Resizes image and clipping path using memory-friendly Pipeline API.

Resize Sharp

Resizes image and maintains original sharpness (like Bicubic Sharper mode in Photoshop).

Resize while reading JPEG

Demonstrates how to resize a JPEG image using the codec's resize capability.

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