Jump to content

imagecolortransparent() problems


mort

Recommended Posts

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 :)
Link to comment
Share on other sites

use black for the color in this function:
[code]imagecolortransparent ( resource image [, int color] );[/code]-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/manual/en/function.imagecolortransparent.php
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.