imagecreatefromgif & imagecolortransparent() ??



Hi all, the simple code snippet:

header('Content-type: image/gif');
$im = imagecreatefromgif("/path/Mypic.gif");
$background = imagecolorallocate($im, 255, 255, 255);
imagecolortransparent($im,$background);

imagegif($im,'/path/TransparentPic.gif');
imagedestroy($im);


is creating the new image but is not setting the white background to
transparent;
I am sure about the presence of the white color in the background
(checked it with imagecolorat() etc).

a similarly simple test setting transparency on a new image created
with 'imagecreatetruecolor()' works correctly... any hints?!

Cheers, Luca
.



Relevant Pages

  • Re: Transparency on the background of a picture
    ... Enhanced Metafile format supporting Transparent backgrounds. ... > dark red and the logo looks silly with a white background. ...
    (microsoft.public.access.forms)
  • Re: BMP Print Problem
    ... if that makes the grey area transparent in the places you need it to be ... area as opposed to a white background. ... "Indy" wrote in message ... > PowerPoint and I just made the bmp in MS Paint with the ...
    (microsoft.public.powerpoint)
  • Re: help creating transparent image
    ... You can create images with alpha support using BufferedImage and such. ... not aware of MIDP supporting transparent images created in code ... Said workaround involves creating a PNG ... But I don't want the white background, I want the background to be ...
    (comp.lang.java.programmer)
  • Re: Ladybird question
    ... to make it transparent ... >save as a transparent GIF ... >looks just fine against a white background, ... But the pixels at the ...
    (uk.comp.sys.mac)
  • Re: Transparent Image
    ... open one bitmap image and i need to display it in exsisting display. ... color is Black then i replace all black color in the image current opening ... transparent color of the image. ... transparent color of the original image is replace with white color. ...
    (microsoft.public.vc.mfc)