473,385 Members | 1,267 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2563
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Laszlo Zsolt Nagy | last post by:
Hello, How can I determine the number of colors used in an image? I tried to search on Google but I could figure out. I read the PIL handbook but I do not see how to do it. Can anyone help? ...
0
by: jean marc | last post by:
Hello I am trying to reduce a truecolor image to a palette one. imagetruecolortopalette() works just fine, except, that I would like to keep a few color unchanged. like a (255,0,0) red, a...
35
by: Stan Sainte-Rose | last post by:
Hi, What is the better way to save image into a database ? Just save the path into a field or save the image itself ? I have 20 000 images (~ 10/12 Ko per image ) to save. Stan
0
by: bearophileHUGS | last post by:
Hello, this time I have a question about PIL usage, maybe if Lundh has some time he can answer me. I am experimenting different color quantization algorithms, so having computed the palette with a...
1
by: Laszlo Nagy | last post by:
Hello, I'm looking for a library that can do the following: * Parse a simple structured text file (XML or HTML etc.) * Render its output to an image * I would like to give the maximum width...
1
by: jitu78 | last post by:
GIF Images Use GIF files for images that have a small number of colors. GIF files are always reduced to no more than 256 unique colors. The compression algorithm for GIF files is less complex than...
6
by: William Gill | last post by:
I have found a couple of sites that allow a visitor to upload an image and the site returns either the "average color", or a palette of colors. Several of them use PHP to accomplish this. I have...
7
by: mishrarajesh44 | last post by:
hii all Truly telling i hav got this code from net & i am finding error while running the code below.. code:- <?php $idir = "photo/"; // Path To Images Directory $tdir =...
10
by: mishrarajesh44 | last post by:
hii all, I am facing a problem currently.. i have a script for image uploading and resizing.. the image uploading takes place properly for every size images.. but, the resizing works for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.