Jump to content

gd library backgrounds


fooDigi

Recommended Posts

With difficulty!

 

I tried this code on your image hoping to give it a blue background which could then be defined as transparent. But there seems to be substantial anti-aliasing around the image which, although it appears white, isn't.

 

<?php
$im = imagecreatefromjpeg('2006-Honda-CR125R-small.jpg');
$blue = imagecolorallocate($im, 0x00, 0x00, 0xFF);
imagefill($im, 0,0,$blue);
imagejpeg($im);
imagedestroy($im);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.