---
application: "Intervention Image"
version: "Version 2"
status: "eol"
---

# Supported Formats

## Image & color formats




## Image Formats

The readable image formats depend on the choosen driver (GD or Imagick) and your local configuration. By default Intervention Image currently supports the following major formats.


    
        &nbsp;
        JPEG
        PNG
        GIF
        TIF
        BMP
        ICO
        PSD
        WebP
    
    
        GD
        ✔️
        ✔️
        ✔️
        -
        ✔️ &ast;&ast;
        -
        -
        ✔️ &ast;
    
    
        Imagick
        ✔️
        ✔️
        ✔️
        ✔️
        ✔️
        ✔️
        ✔️
        ✔️ &ast;
    


&ast; For WebP support **GD** driver must be used with PHP 5 >= 5.5.0 or PHP 7 in order to use [imagewebp()](http://php.net/manual/en/function.imagewebp.php). If **Imagick** is used, it must be compiled with libwebp for WebP support.

&ast;&ast; For BMP support **GD** driver must be used with PHP >= 7.2.0 or PHP 8 in order to use [imagewebp()](https://www.php.net/manual/en/function.imagebmp.php).

See documentation of [make](https://image.intervention.io/v2/api/make.md) method to see how to read image formats from different sources, respectively [encode](https://image.intervention.io/v2/api/encode.md) and [save](https://image.intervention.io/v2/api/save.md) to learn how to output images.

## Color Formats

Intervention Image supports four ways to define colors for its methods.

### Integer Format
By default the [pickColor](https://image.intervention.io/v2/api/pick-color.md) method returns the RGB value as integer. You can also pass a color in this format to all other methods.

#### Examples

```php
// pick color and fill image
$color = Image::make('public/foo.jpg')->pickColor(10, 10);
$img->fill($color);

// pass colors of the GD Library
$im = imagecreatefrompng('public/foo.jpg');
$rgb = imagecolorat($im, 10, 15);
$img->fill($rgb);
```

### Array Format

Pass the RGB integers of a color as a PHP array with or without an alpha value between 1 (opaque) and 0 (full transparency).

#### Examples

```php
// color in array format
$img->fill([255, 0, 0]);

// color in array format with alpha value
$img->fill([255, 255, 255, 0.5]);
```

### Hexadecimal Format
You can pass colors as a hex triplet used normally in HTML and CSS. It's possible to use six-digit format as well as the shorthand form.

#### Examples

```php
// shorthand hex color
$img->fill('#ccc');

// six-digit hex color
$img->fill('#cccccc');

// works without prefix
$img->fill('cccccc');
```

### RGB &amp; RGBA string format
RGB string values in functional notations are also supported. If you want to include an **alpha** value use the RGBA format like in the following example.

#### Examples

```php
// rgb color value in integer range
$img->fill('rgb(255, 0, 0)');

// rgba color value with alpha
$img->fill('rgba(255, 0, 0, 1)');

// rgba color value with transparent alpha
$img->fill('rgba(0, 0, 0, 0.5)');
```

---

## Become a Sponsor

### Intervention Image needs your help to keep the project going

Intervention Image is non-commercial, open source licensed and completely free to use. The considerable
effort required to maintain and develop the software is only possible with the financial support
of sponsors. There are two ways in which you can support this project.

- Support via [GitHub Sponsors](https://github.com/sponsors/Intervention)
- Support via [Ko-Fi](https://ko-fi.com/interventionphp)