473,657 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
(imagecreatefro mjpeg).

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 2582
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. imagecreatetrue color()

|<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
(imagecreatefro mjpeg).

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. imagecreatetrue color()


bingo! when i use imagecreatetrue color 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
2897
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? -- Best regards, Laszlo
0
1287
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 (255,255,255) white .... and so on. My truecolors images are somewhat greenish, with only a tiny bit of red or white, so when I use imagetruecolortopalette(), those colors are lost.
35
2656
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
1732
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 clustering function, I use the code below to quantize the original image to produce an image without dithering (so I can see better the quantization results). I have seen that the *standard* distance function I use isn't standard enough,...
1
1770
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 of the image (but not the minimum) * I would like to use my custom TrueType fonts, and some basic formatting: colors, underline, numbered and bulleted lists
1
1586
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 for JPEG files, but when used on flat color images and text it produces very small file sizes. The GIF format is not suitable for photographic images or images with gradient colors. Because the GIF format has a limited number of colors, gradients...
6
1908
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 requested the source code, but have not gotten a response (even though one site states "source code available on request"). It is obvious that they read the colors of each pixel and them manipulate that data. I would like to be able to do...
7
17049
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 = "photo/thumbs/"; // Path To Thumbnails Directory $twidth = "125"; // Maximum Width For Thumbnail Images
10
7055
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 only small sized iamages.. for eg. resizing takes place for 70 kb sized images but fails for 600kb or more.. my code is below..
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8826
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.