Jump to content


Photo

imagecolortransparent() problems


  • Please log in to reply
1 reply to this topic

#1 mort

mort
  • Members
  • PipPipPip
  • Advanced Member
  • 82 posts

Posted 12 September 2006 - 04:08 PM

Hey all

Having some problems with imagecolortransparent()

I am writing a script to copy and resize a bunch of images to thumbnails for a gallery. when it tries to make the thumbnail of a gif, the background is always black. is there anyway to make it transparent?

I will post the code if needs be, but sure what am asking isnt hard. the script at the mo contains all the database encoding steps etc as well and is generally over complicated

cheers in advance :)

#2 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 12 September 2006 - 05:01 PM

use black for the color in this function:
imagecolortransparent ( resource image [, int color] );
-if that does'nt work sample the color of the black part of the thumbnail created and get the exact RGB code of that and then plug it in the function above and it should work.
http://us3.php.net/m...transparent.php




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users