---
title: "Copy Clipping Path"
canonical: https://www.graphicsmill.com/samples/Metadata/ClippingPath/CopyClippingPath_cs
product: "Graphics Mill"
source: "Metadata/ClippingPath/CopyClippingPath.cs"
---

# Copy Clipping Path

Copies all Adobe resources including clipping path.

## Instruction

Copy the Adobe resources (including clipping paths) from one JPEG image and save it as a new JPEG.

## Usings

```csharp
using Aurigma.GraphicsMill.Codecs;
```

## Code Snippet

```csharp
using (var reader = new JpegReader("Apple.jpg"))
using (var bitmap = reader.Frames[0].GetBitmap())
{
    var jpegSettings = new JpegSettings();
    jpegSettings.AdobeResources = reader.AdobeResources;

    bitmap.Save("CopyClippingPath.jpg", jpegSettings);
}
```

## Explanation

The code:

- Reads a JPEG image and extracts its first frame.
- Creates a `JpegSettings` object and assigns the Adobe resources (including clipping paths) from the original image.
- Saves the image with the same Adobe resources to a new JPEG file.

## Tags

- [Adobe Resources](<https://www.graphicsmill.com/samples/tags/adobe-resources_md>): Working with Adobe image resource blocks
- [Bitmap](<https://www.graphicsmill.com/samples/tags/bitmap_md>): Working with images via the Bitmap API
- [Read](<https://www.graphicsmill.com/samples/tags/read_md>): Reading images with codecs
- [Write](<https://www.graphicsmill.com/samples/tags/write_md>): Writing images with codecs

## Input

- [Apple.jpg](<https://www.graphicsmill.com/samples/Metadata/compiled/Debug/Apple_jpg>) (preview)

## Output

- [CopyClippingPath.jpg](<https://www.graphicsmill.com/samples/Metadata/compiled/Debug/CopyClippingPath_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Codecs.Frame.GetBitmap](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Codecs_Frame_GetBitmap.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageReader.AdobeResources](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_ImageReader_AdobeResources.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageReader.Frames](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_ImageReader_Frames.htm.md>)
- [Aurigma.GraphicsMill.Codecs.JpegReader](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_JpegReader.htm.md>)
- [Aurigma.GraphicsMill.Codecs.JpegSettings](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_JpegSettings.htm.md>)
- [Aurigma.GraphicsMill.Codecs.JpegSettings.AdobeResources](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_JpegSettings_AdobeResources.htm.md>)
