Imagick::clone

(No version information available, might be only in CVS)

Imagick::clone — Makes an exact copy of the Imagick object

Описание

Imagick Imagick::clone ( void )
Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.

Makes an exact copy of the Imagick object.

Возвращаемые значения

What the function returns, first on success, then on failure. See also the &return.success; entity

Коментарии

Автор:
This is great to use to make thumbnails

<?php

$im 
= new Imagick("image.jpg");

$thumb $im->clone();
$thumb->thumbnailImage(100);
$thumb->writeImage("thumb_image.jpg");

?>
2008-01-30 13:00:48
http://php5.kiev.ua/manual/ru/function.imagick-clone.html
Автор:
For making thumbnails. Try this:

<?php

$im 
= new Imagick("image.jpg");
$im->thumbnailImage(100);
$im->writeImage("thumb_image.jpg");

?>
2008-08-13 21:58:30
http://php5.kiev.ua/manual/ru/function.imagick-clone.html
Автор:
Create a banner with animated glowing text

<?php
$text 
"DJ Mike";
$font "lokicola.ttf";
$fontsize 100;
$fontcolor "#ffff88";
$file "banner.gif"# outfile

$glow_radius 3;
# Three glow colors
$glow = array( "#ff0000""#ff8800""#ffff00" );
$delay 15;
# moves text down
$offset 12;

# make a black pallete
$pallete = new Imagick;
$pallete->newimage(375,140"#000000");
# set pallet format to gif
$pallete->setimageformat("gif");

# make a draw object with settings
$draw = new imagickdraw();
$draw->setgravity(imagick::GRAVITY_CENTER);
$draw->setfont("$font");
$draw->setfontsize($fontsize);

# clone pallete to make 3 blank frames
$frame_0 $pallete->clone();
$frame_1 $pallete->clone();
$frame_2 $pallete->clone();

# put them in an array
$frames = array($frame_0$frame_1$frame_2);

# loop through frames, double glow radius each time, annotate
foreach( $frames as $frame)
 {
 
# Loop through glow colors, annotate and blur
 
foreach( $glow as $color)
  {
   
$draw->setfillcolor("$color");
   
$frame->annotateImage $draw,,$offset0$text );
   
$frame->annotateImage $draw,,$offset0$text );
   
$frame->BlurImage$glow_radius$glow_radius ); 
  }
 
# top layer of text over glow
 
$draw->setfillcolor("$fontcolor");
 
# center annotate on top of offset annotates
 
$frame->annotateImage $draw,,$offset0$text );
 
# double glow radius for next loop
 
$glow_radius $glow_radius*2;
 }

# add frames
$frame_0->addImage($frame_1);
$frame_0->addImage($frame_2);

# slow it down a little
$frame_0->setImageDelay("$delay");

# write frames
$frame_0->writeimages"$file"FALSE);
# write animation
$frame_0->writeimages"$file"TRUE);

header("Location:banner.gif");
?>
2011-07-22 04:50:54
http://php5.kiev.ua/manual/ru/function.imagick-clone.html

    Поддержать сайт на родительском проекте КГБ