IMAGEISTRUECOLOR(3) 1 IMAGEISTRUECOLOR(3)imageistruecolor - Finds whether an image is a truecolor imageSYNOPSIS
bool imageistruecolor (resource $image)
DESCRIPTION imageistruecolor(3) finds whether the image $image is a truecolor image.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
RETURN VALUES
Returns TRUE if the $image is truecolor, FALSE otherwise.
EXAMPLES
Example #1
Simple detection of true color image instances using imageistruecolor(3)
<?php
// $im is an image instance
// Check if image is a true color image or not
if(!imageistruecolor($im))
{
// Create a new true color image instance
$tc = imagecreatetruecolor(imagesx($im), imagesy($im));
// Copy over the pixels
imagecopy($tc, $im, 0, 0, 0, 0, imagesx($im), imagesy($im));
imagedestroy($im);
$im = $tc;
$tc = NULL;
// OR use imagepalettetotruecolor()
}
// Continue working with image instance
?>
NOTES
Note
This function requires GD 2.0.1 or later (2.0.28 or later is recommended).
SEE ALSO imagecreatetruecolor(3), imagepalettetotruecolor(3).
PHP Documentation Group IMAGEISTRUECOLOR(3)
Check Out this Related Man Page
IMAGETRUECOLORTOPALETTE(3) 1 IMAGETRUECOLORTOPALETTE(3)imagetruecolortopalette - Convert a true color image to a palette imageSYNOPSIS
bool imagetruecolortopalette (resource $image, bool $dither, int $ncolors)
DESCRIPTION imagetruecolortopalette(3) converts a truecolor image to a palette image. The code for this function was originally drawn from the Indepen-
dent JPEG Group library code, which is excellent. The code has been modified to preserve as much alpha channel information as possible in
the resulting palette, in addition to preserving colors as well as possible. This does not work as well as might be hoped. It is usually
best to simply produce a truecolor output image instead, which guarantees the highest output quality.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $dither
- Indicates if the image should be dithered - if it is TRUE then dithering will be used which will result in a more speckled image
but with better color approximation.
o $ncolors
- Sets the maximum number of colors that should be retained in the palette.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Converting a true color image to a palette-based image
<?php
// Create a new true color image
$im = imagecreatetruecolor(100, 100);
// Convert to palette-based with no dithering and 255 colors
imagetruecolortopalette($im, false, 255);
// Save the image
imagepng($im, './paletteimage.png');
imagedestroy($im);
?>
NOTES
Note
This function requires GD 2.0.1 or later (2.0.28 or later is recommended).
PHP Documentation Group IMAGETRUECOLORTOPALETTE(3)
Hi
In our html pages, we have the image path as "/dir1/dir2/image.gif".
We are changing the location of the image directory.
So now we wish to do a global search and replace the path. I think we are having trouble with forward slash character.
Please help
Thanks in advance
Vikas
a... (3 Replies)
Hi, (HP-UX 11.11)
I need to create a tape image of an igniteUX image created on our igniteUX server.
That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
I have several systems which require software maintenance several times a year. After the software maintenance, it is required that we make two system tapes for DR purposes. The creation of these system tapes takes anywhere from 1-1.5 hours because of the performance of the tape drives. What I... (7 Replies)
Hello,
I have an mksysb image in my disk, created like:
# mksysb -i /mnt/backup/lpar2.image
I want to know if this image could be copied to a tape and make it a boot image.
Thanks
Enzote (3 Replies)
Hi,
How to decode an image using openGL library libjpeg ..
which are the steps needed to do this using C language..
actually my work is to decode the image, store it on the buffer,
and place it on cube surface..
please guide me,,any answer will appreciated .. (8 Replies)
I 'm new to linux .. can some one tell how can we create a linux image like solaris flash archive and then use it with kickstart server to build multiple clients
from same image ?
Thanks (4 Replies)
Hi
I would like to ask about the ddrescue or dd command imaging tool. is dd or ddrescue has a capability to update the created image so that i would not create a new image again if i want run the dd or ddrescue again. or if i will place it in the schedule task..
If not then is someone knows... (5 Replies)
Hi guys!
I need to upgrade the fw version of some T2000 servers, but unfortunately the image downloaded from the Oracle does not work...it seems that the image is not supported on the platform..
bash-3.00$ uname -a
SunOS adm01 5.10 Generic_141414-07 sun4v sparc SUNW,Sun-Fire-T200... (5 Replies)
Hii,
Today morning I attended an interview, they had showed me the attached image and had few questions about that.
The image shows a network with 4 nodes viz.. A B C & D and two switches(layer2) and a router(layer3). Just wanted to know can node A and node D would be on same network e.g... (4 Replies)
Hi Everyone,
I am a Ph.D student working on some image processing tasks and I have run into an interesting problem that I thought someone on here might have an idea about. This paper discusses a method to compare two images based upon the amount they can be compressed. Sorry, since this is my... (3 Replies)
Hi Experts,
I am very new to AIX, I have a mksysb image in one of my aix server (V6), I would like to install this mksysb image on newly lpar. Is it possible without tape and NIM?
Advice would be appreciated.
Regards,
Rockie (11 Replies)
Hi,
I have done Copy image and Restores back on Windows.
I have two solaris servers, one contains Solaris OS and Applications on Server-1.
Want i required is want to copy image of Server-1 and restores the copied image on Server-2.
First of all, is it possibile in Solaris. If it is then... (4 Replies)
An writing some html instructions to have text beside an image. The image
is located on the left and I want the tect to appear on the right side of the image.
The text includes a list. The problem is that the list boxes and not shifted.
The text within the list align on the left with the... (20 Replies)
I want to show a page with an image between 2 any paragraphs.
I tried the following script.
But the image is not centered.
SUSE Paste
<!DOCTYPE html>
<html>
<head>
<style>
center.center_1 {
margin: auto;
width: 60%;
... (3 Replies)