Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -167,9 +167,18 @@ |
168 | 168 | |
169 | 169 | $src_image = call_user_func( $loader, $srcPath ); |
170 | 170 | $dst_image = imagecreatetruecolor( $physicalWidth, $physicalHeight ); |
| 171 | + |
| 172 | + //PNG-24 Alpha Trans |
| 173 | + $background = imagecolorallocate($dst_image, 0, 0, 0); //Make $dst_image all black |
| 174 | + ImageColorTransparent($dst_image, $background); //Make $dst_image transparent |
| 175 | + imagealphablending($dst_image, false); |
| 176 | + |
171 | 177 | imagecopyresampled( $dst_image, $src_image, |
172 | 178 | 0,0,0,0, |
173 | 179 | $physicalWidth, $physicalHeight, imagesx( $src_image ), imagesy( $src_image ) ); |
| 180 | + |
| 181 | + imagesavealpha($dst_image, true); |
| 182 | + |
174 | 183 | call_user_func( $saveType, $dst_image, $dstPath ); |
175 | 184 | imagedestroy( $dst_image ); |
176 | 185 | imagedestroy( $src_image ); |