|Does PHP only support 256 colors...............is there not any way in which PHP can allow more than 256 colors to be displayed in the browser window.I want support of upto a million colors.......plzz reply quickly.|
|2007-10-18 11:28:22 - In reply to message 1 from Arjumand Younus|
|PHP and the number of colours used by the browser is absolutely totally unrelated. Nothing in common.|
The number of colours is controlled by the machine the browser runs on and cannot be controlled by the webpage displayed in the browser. The images the website (aka your php script) sends can contain as many colours as you want, as long as the image is in a format the browser understands. if the browser does not support the million colours you want to display, it will try to match as close as possible.
Again, the question is nonsense. PHP and the displayed number of colours is totally unrelated.
|2007-10-18 13:38:52 - In reply to message 2 from Steffen Mueller|
|I am using GD2 which comes with Easy-PHP 1.8.I am reading a bitmap pixel by pixel and displaying it on the browser window.For bitmaps that have 256 colors or less it is working fine but as soon as I reach the 257th color that 257th color is not displayed properly rather it is some approximaetd value.|
Check out the following code.......the first should be a series of blue lines and second should be series of green lines.
$image = ImageCreate(500,400);
$gray = ImageColorAllocate($image,204,204,204);
$blue = ImageColorAllocate($image,0,0,$i);
$green = ImageColorAllocate($image,$j,0,0);
Hence the question is not nonsense...........tell me how to resolve this problem.