thumbnails of transparent background gifs

This is a discussion on thumbnails of transparent background gifs within the PHP Language forums, part of the PHP Programming Forums category; Making thumbnail images isn't all that hard, for the most part. There is lots of shrink-wrapped code out ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-23-2008
salmobytes
 
Posts: n/a
Default thumbnails of transparent background gifs

Making thumbnail images isn't all that hard, for the most
part. There is lots of shrink-wrapped code out there you
can download and/or munge from. But nothing I've yet
seen does the right thing with transparent background gifs.

If you (I) try to work with ImageCreateFromGif($this->path);
you end up with a black background.

Does anybody know how to make transparent background
gif thumbnails? Or maybe how to at least turn the background
to white?


--
/* Colin (Sandy) Pittendrigh >--O0>
**
*/
Reply With Quote
  #2 (permalink)  
Old 06-23-2008
Captain Paralytic
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

On 23 Jun, 14:24, salmobytes <sa...@byteme.org> wrote:
> Making thumbnail images isn't all that hard, for the most
> part. There is lots of shrink-wrapped code out there you
> can download and/or munge from. *But nothing I've yet
> seen does the right thing with transparent background gifs.
>
> If you (I) try to work with ImageCreateFromGif($this->path);
> you end up with a black background.
>
> Does anybody know how to make transparent background
> gif thumbnails? Or maybe how to at least turn the background
> to white?
>
> --
> /* Colin (Sandy) Pittendrigh >--O0>
> **
> */


Didn't the links (including the one to the manual) that you found when
you searched Google for
php transparent gif
help at all?
Reply With Quote
  #3 (permalink)  
Old 06-23-2008
Álvaro G. Vicario
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

salmobytes escribió:
> Making thumbnail images isn't all that hard, for the most
> part. There is lots of shrink-wrapped code out there you
> can download and/or munge from. But nothing I've yet
> seen does the right thing with transparent background gifs.
>
> If you (I) try to work with ImageCreateFromGif($this->path);
> you end up with a black background.


But, does it work with *non-transparent* GIFs? As manual says, GIF
support was removed for a while due to patent issues.



> Does anybody know how to make transparent background
> gif thumbnails? Or maybe how to at least turn the background
> to white?


I'm kinda lost. There isn't such thing as "background" and
"non-background" GIFs... :-?



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Reply With Quote
  #4 (permalink)  
Old 06-23-2008
whileone
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

On Jun 23, 7:54*am, Captain Paralytic <paul_laut...@yahoo.com> wrote:

> Didn't the links (including the one to the manual) that you found when
> you searched Google for
> php transparent gif
> help at all?


Googling "php transparent gif" turns up dozens of links
to question and answer forums where the same question is asked
many times over.........and the answers are not at all clear.
I'd venture to say this is a FAQ with infrequent solutions.
I'm sure it's possible. I might even be able to fight with it
and solve it all on my own.

Questions on usenet invariably incur at least a few acerbic responses.
But questions on usenet often lead to good answers too.
So it's always worth a try.

:-)

Reply With Quote
  #5 (permalink)  
Old 06-23-2008
Olaf Schinkel
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

salmobytes schrieb:
> Making thumbnail images isn't all that hard, for the most
> part. There is lots of shrink-wrapped code out there you
> can download and/or munge from. But nothing I've yet
> seen does the right thing with transparent background gifs.
>
> If you (I) try to work with ImageCreateFromGif($this->path);
> you end up with a black background.
>
> Does anybody know how to make transparent background
> gif thumbnails? Or maybe how to at least turn the background
> to white?
>
>

You know:
int imagecolortransparent ( resource $im [, int $col ] )

?

Reply With Quote
  #6 (permalink)  
Old 06-23-2008
salmobytes
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

Olaf Schinkel wrote:

>>

> You know:
> int imagecolortransparent ( resource $im [, int $col ] )


Thanks, that looks like the beginning of a solution.


--
/* Colin (Sandy) Pittendrigh >--O0>
** Have code will travel
*/
Reply With Quote
  #7 (permalink)  
Old 06-24-2008
Floortje
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

salmobytes wrote:
> Making thumbnail images isn't all that hard, for the most
> part. There is lots of shrink-wrapped code out there you
> can download and/or munge from. But nothing I've yet
> seen does the right thing with transparent background gifs.


Try mode imagick if you have a nice enough host.

http://php.net/imagick

Floortje
Reply With Quote
  #8 (permalink)  
Old 06-24-2008
Captain Paralytic
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

On 23 Jun, 17:11, whileone <Sandy.Pittendr...@gmail.com> wrote:
> On Jun 23, 7:54*am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
>
> > Didn't the links (including the one to the manual) that you found when
> > you searched Google for
> > php transparent gif
> > help at all?

>
> Googling "php transparent gif" turns up dozens of links
> to question and answer forums where the same question is asked
> many times over.........and the answers are not at all clear.

But it also turns up a link to the manual which talks about setting
transparent backgrounds.
Reply With Quote
  #9 (permalink)  
Old 06-24-2008
The Natural Philosopher
 
Posts: n/a
Default Re: thumbnails of transparent background gifs

Floortje wrote:
> salmobytes wrote:
>> Making thumbnail images isn't all that hard, for the most
>> part. There is lots of shrink-wrapped code out there you
>> can download and/or munge from. But nothing I've yet
>> seen does the right thing with transparent background gifs.

>
> Try mode imagick if you have a nice enough host.
>


...or can bear to spend a day downlaoding all the crap you need before
you can install it on your own machine.

I gave up.

> http://php.net/imagick
>
> Floortje

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:12 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0