Gregwar / Image

A PHP library to handle images
MIT License
1k stars 191 forks source link

Resize function #4

Closed Leph closed 12 years ago

Leph commented 12 years ago

Dear Gregwar,

There is a problem with your _resize function. The function does not conserve the alpha channel of an image. Transparency pixels are turns into white pixels after the resizing.

Best regards.

Leph

Gregwar commented 12 years ago

Hello,

You can force the background to be transparent doing so:

<?php

$img->resize($width, $height, 'transparent');