PHP thumbnail transparency problem

Discussion in 'PHP' started by computerzworld, Feb 17, 2008.

  1. #1
    Hello,
    I have a PHP code which is creating 100x100 thumbnails from larger images. But when I create thumbnails the images having transperant background turns into black color. How can I solve it? Please help me. Thanks in advance.
     
    computerzworld, Feb 17, 2008 IP
  2. James.Blant

    James.Blant Active Member

    Messages:
    250
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #2
    what is your thumbnail generator PHP code ?
    when you create new image for creating thumbnail you can fill background of image .
     
    James.Blant, Feb 17, 2008 IP
  3. computerzworld

    computerzworld Active Member

    Messages:
    214
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #3
    that background color change i have tried but using that one, one of my gif file was fully converted into white color. Here is the code which I had written along with the thumbnail generation code.

    $white = imagecolorallocate($tn, 255, 255, 255);
    imagefill($tn, 0, 0, $white);
     
    computerzworld, Feb 17, 2008 IP