470,815 Members | 1,287 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

gd library bug? image lost colors

|
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');
}
Jul 17 '05 #1
2 2414
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:
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?

Jul 17 '05 #2
|
Dnia 11/01/2004 09:05 AM, Użytkownik neur0maniak napisał:
i.e., imagecreate() vs. imagecreatetruecolor()


bingo! when i use imagecreatetruecolor everything works great!
--
body {
name: '|<ońrad Karpieszu>|';
visit: url('http://www.vivamozilla.civ.pl');
}
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Laszlo Zsolt Nagy | last post: by
reply views Thread by jean marc | last post: by
35 posts views Thread by Stan Sainte-Rose | last post: by
reply views Thread by bearophileHUGS | last post: by
1 post views Thread by Laszlo Nagy | last post: by
1 post views Thread by jitu78 | last post: by
6 posts views Thread by William Gill | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.