Connecting Tech Pros Worldwide Forums | Help | Site Map

gd library bug? image lost colors

|
Guest
 
Posts: n/a
#1: Jul 17 '05
hi,

is it a php bug or i do smth wrong?

From site

http://www.allegro.pl/show_user_auctions.php?uid=45432

I`m taking images (those thumbs) and its name at right.

Then i generate with those elements png image

I make big ligh yellow rectangle with smaller rectangle: once grey, once
white. At those rectangles i put names (with ImageTTFText) and images
(imagecreatefromjpeg).

And finall image look... ugly. Look at this, most colors are lost

http://www.linux.webd.pl/allegro/

I have to admit that if i do not attach thumb images, colors are good.

Can i fix something or i it is libgd bug?

--
body {
name: '|<ońrad Karpieszu>|';
visit: url('http://www.vivamozilla.civ.pl');
}

neur0maniak
Guest
 
Posts: n/a
#2: Jul 17 '05

re: gd library bug? image lost colors


It would be useful to see a snippet of code to see what is happening.

Though, my best guess would be that you're copying images from a http
source into an image created at run-time, and that the base image that
you're copying all the images onto, is a palette based image

i.e., imagecreate() vs. imagecreatetruecolor()



|<onrad wrote:[color=blue]
> hi,
>
> is it a php bug or i do smth wrong?
>
> From site
>
> http://www.allegro.pl/show_user_auctions.php?uid=45432
>
> I`m taking images (those thumbs) and its name at right.
>
> Then i generate with those elements png image
>
> I make big ligh yellow rectangle with smaller rectangle: once grey, once
> white. At those rectangles i put names (with ImageTTFText) and images
> (imagecreatefromjpeg).
>
> And finall image look... ugly. Look at this, most colors are lost
>
> http://www.linux.webd.pl/allegro/
>
> I have to admit that if i do not attach thumb images, colors are good.
>
> Can i fix something or i it is libgd bug?
>[/color]
|
Guest
 
Posts: n/a
#3: Jul 17 '05

re: gd library bug? image lost colors


Dnia 11/01/2004 09:05 AM, Użytkownik neur0maniak napisał:[color=blue]
> i.e., imagecreate() vs. imagecreatetruecolor()[/color]

bingo! when i use imagecreatetruecolor everything works great!


--
body {
name: '|<ońrad Karpieszu>|';
visit: url('http://www.vivamozilla.civ.pl');
}
Closed Thread