Dear all,
I'm sure that im doing something wrong, but I can't imagine what!
My problem is the following:
I create an image using imagecreatetrue color, and, after some
painting, I push the resulting image to the client in 256 colors:
imagetruecolort opalette($this->m_oIMG, false, 256);
header("Content-type: image/png");
if(!imagepng($t his->m_oIMG)) echo("Error Creating Image!!!");
The problem is that the resulting image never contain more that 128
colors! I can't push the 24bit image because of the size, as the
images are pretty big.
As you may imagine, the final image quality is quite horrible, for an
example, http://eqsearchpro.pleyhades.com/Sho...8&recipe=26059
save the image and open it with photoshop (for instance...), after
that, count the colors.
Any ideas? :)
Thx for your time,
Vegethalia. 1 2634
Vegethalia <ve********@gma il.comwrote:
> Anyway, you know why when you tell imagetrucolorto palette to use a certain number of colors (ie 64), it never uses as much? Is that a bug or just an nonperfect algorithm?
The beauty of a system like PHP is that you can download the source and
look at it yourself.
The process of identifying an "ideal" 8-bit palette for a true-color image
is surprisingly complicated. Most palettized displays don't actually have
256 colors available (a few dozen are almost always reserved for system
use), so perhaps they optimized it for 128. However, I'm just pulling that
from thin air.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: tornado |
last post by:
Hi all,
I am pretty new to PHP. I was reading PHP manual and trying out the
example from 2nd
chapter (A simple Tutorial). When i try to print the variable as
given in the example it returns
a empty value instead of returning the browser type.
Here is the line which i am using in my code and from manual:
<?php echo $_SERVER; ?>
|
by: aznFETISH |
last post by:
I have a list of links that I ue on my page, I alternate background colors
for these links in a table, I usually do it using a DB but this list of link
is manually added into the page so my question, is it possible to alternate
the row colors automatic and have it created from a list of URL's?
|
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
|
by: Dan Jacobson |
last post by:
What's Nielsen talking about in
http://www.useit.com/alertbox/20040503.html
http://www.useit.com/alertbox/20040510.html
Can't a good browser keep track of visited vs. unvisited link colors?
Is my site deficient as I have not messed with link colors?
Does Nielsen address why all this can't be left up to the browser?
Are link colors supposed to be special, like background images, to make
a big impression?
|
by: Marc |
last post by:
Hi,
maybe you guys know something I don't know...
Is it possible (and how) to achieve the following:
1) A <BODY> with specific background-color, say blue.
2) A <DIV class='main'> (which contains the main content text of the page)
with no colors assigned at all.
| |
by: Danny Lesandrini |
last post by:
I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?
Danny J Lesandrini
dlesandrini@hotmail.com
|
by: Sami |
last post by:
Hello,
I just started out with Windows.Forms and was going through the MS
tutorials.
In the tutorial where you can create a non-rectangular shaped window by
using your own window painted with some paint utility, I am having some
problems with trying to compare the color of the pixel that I retrieve using
Bitmap.GetPixel(...) method.
My pseudo-code looks like this:...
|
by: Morten Nielsen |
last post by:
Does anyone have any idea why I can't get a pixel-value of 255 returned in
the code below?
Any color-value from 0 up to 254 is returned correctly, but any
color-component of 255 returns zero. ie. bright white pixel would return
0,0,0 with the function below: The color (234,123,255) returns (234,123,0).
I would have thought that the byte value could hold values from 0..255 and
not only 0..254. At least thats what the C# specs and my...
|
by: Demi |
last post by:
I want to be able to define standard colors in a base form, then have
child forms use those values instead of standard colors.
Ex in my base form I want to do this:
Color myColor = System.Drawing.SystemColors.Control;
Then in my child form in the designer, I want to be able to enter
"myColor" in the BackColor property.
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |