---
title: "Create linear pipeline"
canonical: https://www.graphicsmill.com/samples/LargeImages/PipelineAPISyntax/SimplifiedSyntax_cs
product: "Graphics Mill"
source: "LargeImages/PipelineAPISyntax/SimplifiedSyntax.cs"
---

# 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](<https://www.graphicsmill.com/docs/gm/processing-large-images-using-pipelines.htm>).

## Instruction

Resize an image to a specified width while maintaining the aspect ratio and save the result using the Pipeline API of Graphics Mill library.

## Usings

```csharp
using Aurigma.GraphicsMill.Codecs;
using Aurigma.GraphicsMill.Transforms;
```

## Code Snippet

```csharp
// reader --->  resize  --->  writer
using (var reader = ImageReader.Create("Venice.jpg"))
using (var resize = new Resize(320, 0, ResizeInterpolationMode.High))
using (var writer = ImageWriter.Create("SimplifiedSyntax.jpg"))
{
    // In most cases pipeline elements are used in a linear order,
    // so you can just chain them and run the pipeline
    (reader + resize + writer).Run();

    // Here is an alternative syntax for better readability
    Pipeline.Run(reader + resize + writer);
}
```

## Explanation

The code:

- Reads the image.
- Resizes the image to a specified width, maintaining the original aspect ratio.
- Saves the resized image.

## Tags

- [Pipeline](<https://www.graphicsmill.com/samples/tags/pipeline_md>): Working with images via the Pipeline API
- [Resize](<https://www.graphicsmill.com/samples/tags/resize_md>): Resizing images

## Input

- [Venice.jpg](<https://www.graphicsmill.com/samples/LargeImages/compiled/Debug/Venice_jpg>) (preview)

## Output

- [SimplifiedSyntax.jpg](<https://www.graphicsmill.com/samples/LargeImages/compiled/Debug/SimplifiedSyntax_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Codecs.ImageReader](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_ImageReader.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageReader.Create(String)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Codecs_ImageReader_Create_1_bb3a7a4f.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageWriter](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_ImageWriter.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageWriter.Create(String)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Codecs_ImageWriter_Create_1_bb3a7a4f.htm.md>)
- [Aurigma.GraphicsMill.Transforms.Resize](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Resize.htm.md>)
- [Aurigma.GraphicsMill.Transforms.ResizeInterpolationMode](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_ResizeInterpolationMode.htm.md>)
