Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imagepalettecopy(3) [php man page]

IMAGEPALETTECOPY(3)							 1						       IMAGEPALETTECOPY(3)

imagepalettecopy - Copy the palette from one image to another

SYNOPSIS
void imagepalettecopy (resource $destination, resource $source) DESCRIPTION
imagepalettecopy(3) copies the palette from the $source image to the $destination image. PARAMETERS
o $destination - The destination image resource. o $source - The source image resource. RETURN VALUES
No value is returned. EXAMPLES
Example #1 imagepalettecopy(3) example <?php // Create two palette images $palette1 = imagecreate(100, 100); $palette2 = imagecreate(100, 100); // Allocate the background to be // green in the first palette image $green = imagecolorallocate($palette1, 0, 255, 0); // Copy the palette from image 1 to image 2 imagepalettecopy($palette2, $palette1); // Since the palette is now copied we can use the // green color allocated to image 1 without using // imagecolorallocate() twice imagefilledrectangle($palette2, 0, 0, 99, 99, $green); // Output image to the browser header('Content-type: image/png'); imagepng($palette2); imagedestroy($palette1); imagedestroy($palette2); ?> PHP Documentation Group IMAGEPALETTECOPY(3)

Check Out this Related Man Page

IMAGECOLORMATCH(3)							 1							IMAGECOLORMATCH(3)

imagecolormatch - Makes the colors of the palette version of an image more closely match the true color version

SYNOPSIS
bool imagecolormatch (resource $image1, resource $image2) DESCRIPTION
Makes the colors of the palette version of an image more closely match the true color version. PARAMETERS
o $image1 - A truecolor image link resource. o $image2 - A palette image link resource pointing to an image that has the same size as $image1. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 imagecolormatch(3) example <?php // Setup the true color and palette images $im1 = imagecreatefrompng('./gdlogo.png'); $im2 = imagecreate(imagesx($im1), imagesy($im1)); // Add some colors to $im2 $colors = Array(); $colors[] = imagecolorallocate($im2, 255, 36, 74); $colors[] = imagecolorallocate($im2, 40, 0, 240); $colors[] = imagecolorallocate($im2, 82, 100, 255); $colors[] = imagecolorallocate($im2, 84, 63, 44); // Match these colors with the true color image imagecolormatch($im1, $im2); // Free from memory imagedestroy($im1); imagedestroy($im2); ?> NOTES
Note This function requires GD 2.0.1 or later (2.0.28 or later is recommended). SEE ALSO
imagecreatetruecolor(3). PHP Documentation Group IMAGECOLORMATCH(3)
Man Page

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

oops! Style Manager

Solaris 2.6, using CDE: agh. I accidentally set an ugly palette as my Home Session. The problem is, when I change the palette back to Default, I am informed that my change will be apparent in my next session. But when I log out and in, it's still the Ugly Palette. Doesn't matter if I set the... (1 Reply)
Discussion started by: kristy
1 Replies

2. Post Here to Contact Site Administrators and Moderators

Unable to open uploaded image

Hi, I am unable to view/open the image I uploded in one of the forums. https://www.unix.com/showthread.php?t=37793&page=2&pp=20 Please help. enc. (2 Replies)
Discussion started by: encrypted
2 Replies

3. 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

4. AIX

mksysb installation(clone) on a different server

if VG_SOURCE_DISK_LIST varaible(value set to = hdisk1 hdisk0 )is set in image.data file when taking mksysb image backup on a source server and if we use this image to install it on a different server(clone). Does it warn during installation on the target server if it doesn't have disks hdisk1 and... (1 Reply)
Discussion started by: saikiran_1984
1 Replies

5. 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