<p>You'll need to have <a href="https://secure.php.net/manual/en/book.imagick.php" rel="nofollow noreferrer">Imagick</a> installed on your box if you want to preserve alpha channels in a PNG during transforms.</p>

<p>If Craft sees it is installed, it will use it by default.</p>

CC BY-SA 3.0
2017-04-06T10:15:23.600Z
Thanks for your input ! Imagick is now installed and, surprisingly, the transform alpha layers of my jpgs-transformed-from-pngs are now black and not white as it is on my local
Antoine
CC BY-SA 3.0
2017-04-06T18:18:13.790Z
Are you running a newish version? https://www.imagemagick.org/script/changelog.php and https://pecl.php.net/package-changelog.php?package=imagick
Brad Bell
CC BY-SA 3.0
2017-04-10T15:57:18.930Z
Nope :-/ 
imagick module version 3.4.0RC6
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version ImageMagick 6.8.9-9 Q16 x86_64
Antoine
CC BY-SA 3.0
2017-04-10T21:56:22.423Z
Maybe try updating those and see if it helps.
Brad Bell
CC BY-SA 3.0
2017-04-05T17:58:07.780Z
2017-04-05T17:58:07.780Z
Brad Bell
<p>I have several png images that when transformed from png to jpg, the alpha layer is transformed to an horizontally lined pattern. </p>

<p>Therefore I have to keep them as png, wich is in my case unnecessary and a drastic data load issue. </p>

<p>The problem appears in production, wich is an ArcusTech server. </p>

<p>Anyone knows what it could be ?</p>

<p>Thanks !</p>

CC BY-SA 3.0
2017-04-05T11:48:20.190Z
Are you using GD or Imagick on the server? Also, alpha is transparency which is not supported by jpg. What exactly are you expecting here?
Andris Sevcenko
CC BY-SA 3.0
2017-04-05T14:18:39.883Z
Ooooh I've looked into the installed dependencies on my prod, and only GD is installed. As Craft stands: "GD or ImageMagick is required, however ImageMagick is recommended as it adds animated GIF support, and preserves 8-bit and 24-bit PNGs during image transforms.".
I asked the ArcusTech team to install it since it could be the issue :-) 

Usually, alpha layers in png are replaced by plain colors in jpg (and generally plain white) as it does on my local.

Thanks already !
Antoine
CC BY-SA 3.0
2017-04-06T06:16:29.440Z
As Brad pointed out below, let's see how Imagick handles this. Should be much better.
Andris Sevcenko
<image-transforms>
When image transforming png to jpg, alpha layer become lined
# When image transforming png to jpg, alpha layer become lined

(Asked by: username_0 on 2017-04-05)

I have several png images that when transformed from png to jpg, the alpha layer is transformed to an horizontally lined pattern.

Therefore I have to keep them as png, wich is in my case unnecessary and a drastic data load issue.

The problem appears in production, wich is an ArcusTech server.

Anyone knows what it could be ?

Thanks !

**Tags:** image-transforms
> **Comments:**
> **username_1**: Are you using GD or Imagick on the server? Also, alpha is transparency which is not supported by jpg. What exactly are you expecting here?  
> **username_0**: Ooooh I've looked into the installed dependencies on my prod, and only GD is installed. As Craft stands: "GD or ImageMagick is required, however ImageMagick is recommended as it adds animated GIF support, and preserves 8-bit and 24-bit PNGs during image transforms.". I asked the ArcusTech team to install it since it could be the issue :-)   Usually, alpha layers in png are replaced by plain colors in jpg (and generally plain white) as it does on my local.  Thanks already !  
> **username_1**: As Brad pointed out below, let's see how Imagick handles this. Should be much better.  

---

## 1 answers

### Answer by username_2 on 2017-04-05. Score: 1

You'll need to have [Imagick](https://secure.php.net/manual/en/book.imagick.php) installed on your box if you want to preserve alpha channels in a PNG during transforms.

If Craft sees it is installed, it will use it by default.

> **Comments:**
> **username_0**: Thanks for your input ! Imagick is now installed and, surprisingly, the transform alpha layers of my jpgs-transformed-from-pngs are now black and not white as it is on my local  
> **username_2**: Are you running a newish version? https://www.imagemagick.org/script/changelog.php and https://pecl.php.net/package-changelog.php?package=imagick  
> **username_0**: Nope :-/  imagick module version 3.4.0RC6 imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel Imagick compiled with ImageMagick version ImageMagick 6.8.9-9 Q16 x86_64  
> **username_2**: Maybe try updating those and see if it helps.  

---

