Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imageistruecolor(3) [php man page]

IMAGEISTRUECOLOR(3)							 1						       IMAGEISTRUECOLOR(3)

imageistruecolor - Finds whether an image is a truecolor image

SYNOPSIS
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 image

SYNOPSIS
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)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find and replace

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)
Discussion started by: vikas_j@hotmail
3 Replies

2. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

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)
Discussion started by: Andrek
3 Replies

3. Linux

Writing ISO image to CD

(5 Replies)
Discussion started by: superuser84
5 Replies

4. AIX

How do I create a bootable mksysb image file

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)
Discussion started by: acascianelli
7 Replies

5. AIX

mksysb file image

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)
Discussion started by: enzote
3 Replies

6. Programming

How to Decode an image using openGL

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)
Discussion started by: Ravikishore
8 Replies

7. Red Hat

Create Linux gold image

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)
Discussion started by: fugitive
4 Replies

8. Ubuntu

does ddrescue or dd has capability to update the content of an image file

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)
Discussion started by: jao_madn
5 Replies

9. Emergency UNIX and Linux Support

T2000 Alom Upgrade

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)
Discussion started by: cecco16
5 Replies

10. IP Networking

Basic networking question

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)
Discussion started by: zing_foru
4 Replies

11. UNIX and Linux Applications

Compression (gzip) for image analysis

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)
Discussion started by: rudigarude
3 Replies

12. UNIX for Advanced & Expert Users

Installation through mksysb image backup

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)
Discussion started by: aix.rockie
11 Replies

13. Solaris

Copy image on Server-1 and Restores image on Server-2

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)
Discussion started by: sarshads
4 Replies

14. UNIX for Beginners Questions & Answers

Indentation for Lists in html

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)
Discussion started by: kristinu
20 Replies

15. Web Development

Center image between two text paragraphs.

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)
Discussion started by: jcdole
3 Replies