|
użytkowników online: 19
|
OPINIE UŻYTKOWNIKÓW
|
Mimo, że strony WWW tworzymy już 5 lat zawsze znajdziemy coś ciekawego. Świadczy o tym chociażby nasza aktówka, w której znajduje się kilkadziesiąt porad, z których często korzystamy. Otwarta forma poradnika, czyli możliwość podrzucania tematów oraz wspólny ich rozwój, to nieoceniona pomoc. Uważam, ze abonament roczny jest niewspółmiernie niski do jakości zaprezentowanych materiałów.
Marek Kończal
Internetix.pl
|
|
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net
[Spis]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[X]
[W]
[Z]
imagepalettecopy (PHP 4 >= 4.0.1, PHP 5) imagepalettecopy -- Copy the palette from one image to another Descriptionint imagepalettecopy ( resource destination, resource source )
imagepalettecopy() copies the
palette from the source image
to the destination image.
User Contributed Notesbuzz at nospam dot oska dot com
21-Oct-2005 01:51
actually it doesn't "copy" the palette exactly. It copys the colors from the source palette to the destination image. the palette you end up with in the destination image will be "same colors different order". If you want an EXACT palette copy (at the expense of messing up your image if you aren't careful), then use this code:
<?
function imagepalettecopy_exact ( $dst_img, $src_img) {
for( $c = 0 ; $c < imagecolorstotal($src_img); $c++) {
$col = imagecolorsforindex($src_img,$c); imagecolorset($dst_img,$c,$col[red],$col[green],$col[blue]); }
}
?>
Los Olvidados
10-Jan-2003 01:55
To be precise, this function replaces the palette in the destination.
|