# PdfImageFit enum

> How an image fills a box of another shape (the CSS object-fit values).

Namespace: [PdfNetStack.Drawing](https://www.jadev-corp.com/api/pdfnetstack-drawing/)  
Assembly: PdfNetStack.dll  
Package: `PdfNetStack`

How an image fills a box of another shape (the CSS object-fit values).

```csharp
public enum PdfImageFit
```

## Fields

`Fill = 0` 

Stretched to the box, its aspect ratio ignored.

`Contain = 1` 

Scaled to fit inside the box, keeping its aspect ratio: the whole image shows.

`Cover = 2` 

Scaled to cover the box, keeping its aspect ratio: what spills over is clipped.

`None = 3` 

At its natural size, clipped to the box.

`ScaleDown = 4` 

At its natural size, or as [Contain](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfimagefit/) when that is smaller.

## Used in

- [Add images to PDF in C# and .NET](https://www.jadev-corp.com/guides/images/)
- [Convert a TIFF to PDF in C#](https://www.jadev-corp.com/recipes/tiff-to-pdf/)

Source: https://www.jadev-corp.com/pdfnetstack/api/pdfnetstack-drawing/pdfimagefit/
