package.xml0000644000000000000000000012244214145213432011675 0ustar rootroot imagick pecl.php.net Provides a wrapper to the ImageMagick library. Imagick is a native php extension to create and modify images using the ImageMagick API. This extension requires ImageMagick version 6.5.3-10+ and PHP 5.4.0+. Dan Ackroyd danack danack@php.net yes 2021-11-17 3.6.0 3.6.0 stable stable PHP License - No change from 3.6.0RC2 5.4.0 1.4.0 imagick imagick-3.6.0/examples/polygon.php0000644000000000000000000000533014145213427015644 0ustar rootroot 378.1, "y" => 81.72 ), array( "x" => 381.1, "y" => 79.56 ), array( "x" => 384.3, "y" => 78.12 ), array( "x" => 387.6, "y" => 77.33 ), array( "x" => 391.1, "y" => 77.11 ), array( "x" => 394.6, "y" => 77.62 ), array( "x" => 397.8, "y" => 78.77 ), array( "x" => 400.9, "y" => 80.57 ), array( "x" => 403.6, "y" => 83.02 ), array( "x" => 523.9, "y" => 216.8 ), array( "x" => 526.2, "y" => 219.7 ), array( "x" => 527.6, "y" => 223 ), array( "x" => 528.4, "y" => 226.4 ), array( "x" => 528.6, "y" => 229.8 ), array( "x" => 528.0, "y" => 233.3 ), array( "x" => 526.9, "y" => 236.5 ), array( "x" => 525.1, "y" => 239.5 ), array( "x" => 522.6, "y" => 242.2 ), array( "x" => 495.9, "y" => 266.3 ), array( "x" => 493, "y" => 268.5 ), array( "x" => 489.7, "y" => 269.9 ), array( "x" => 486.4, "y" => 270.8 ), array( "x" => 482.9, "y" => 270.9 ), array( "x" => 479.5, "y" => 270.4 ), array( "x" => 476.2, "y" => 269.3 ), array( "x" => 473.2, "y" => 267.5 ), array( "x" => 470.4, "y" => 265 ), array( "x" => 350, "y" => 131.2 ), array( "x" => 347.8, "y" => 128.3 ), array( "x" => 346.4, "y" => 125.1 ), array( "x" => 345.6, "y" => 121.7 ), array( "x" => 345.4, "y" => 118.2 ), array( "x" => 346, "y" => 114.8 ), array( "x" => 347.1, "y" => 111.5 ), array( "x" => 348.9, "y" => 108.5 ), array( "x" => 351.4, "y" => 105.8 ), array( "x" => 378.1, "y" => 81.72 ), ); /* This ImagickPixel is used to set background color */ $ImagickPixel->setColor( 'gray' ); /* Create new image, set color to gray and format to png*/ $Imagick->newImage( 700, 500, $ImagickPixel ); $Imagick->setImageFormat( 'png' ); /* Create the polygon*/ $ImagickDraw->polygon( $array ); /* Render the polygon to image*/ $Imagick->drawImage( $ImagickDraw ); /* Send headers and output the image */ header( "Content-Type: image/{$Imagick->getImageFormat()}" ); echo $Imagick->getImageBlob( ); ?> imagick-3.6.0/examples/captcha.php0000644000000000000000000000305014145213427015555 0ustar rootrootsetColor( 'white' ); /* Create a drawing object and set the font size */ $ImagickDraw = new ImagickDraw(); /* Set font and font size. You can also specify /path/to/font.ttf */ $ImagickDraw->setFont( 'Helvetica Regular' ); $ImagickDraw->setFontSize( 20 ); /* Create the text */ $alphanum = 'ABXZRMHTL23456789'; $string = substr( str_shuffle( $alphanum ), 2, 6 ); /* Create new empty image */ $Imagick->newImage( 85, 30, $bg ); /* Write the text on the image */ $Imagick->annotateImage( $ImagickDraw, 4, 20, 0, $string ); /* Add some swirl */ $Imagick->swirlImage( 20 ); /* Create a few random lines */ $ImagickDraw->line( rand( 0, 70 ), rand( 0, 30 ), rand( 0, 70 ), rand( 0, 30 ) ); $ImagickDraw->line( rand( 0, 70 ), rand( 0, 30 ), rand( 0, 70 ), rand( 0, 30 ) ); $ImagickDraw->line( rand( 0, 70 ), rand( 0, 30 ), rand( 0, 70 ), rand( 0, 30 ) ); $ImagickDraw->line( rand( 0, 70 ), rand( 0, 30 ), rand( 0, 70 ), rand( 0, 30 ) ); $ImagickDraw->line( rand( 0, 70 ), rand( 0, 30 ), rand( 0, 70 ), rand( 0, 30 ) ); /* Draw the ImagickDraw object contents to the image. */ $Imagick->drawImage( $ImagickDraw ); /* Give the image a format */ $Imagick->setImageFormat( 'png' ); /* Send headers and output the image */ header( "Content-Type: image/{$Imagick->getImageFormat()}" ); echo $Imagick->getImageBlob( ); ?>imagick-3.6.0/examples/thumbnail.php0000644000000000000000000000065614145213427016146 0ustar rootrootreadImage( '/tmp/test.png' ); /* Thumbnail the image ( width 100, preserve dimensions ) */ $im->thumbnailImage( 100, null ); /* Write the thumbail to disk */ $im->writeImage( '/tmp/th_test.png' ); /* Free resources associated to the Imagick object */ $im->destroy(); ?>imagick-3.6.0/examples/watermark.php0000644000000000000000000000121314145213427016146 0ustar rootrootsetFontSize( 50 ); /* Read image into object*/ $Imagick->readImage( '/tmp/test.jpg' ); /* Seek the place for the text */ $ImagickDraw->setGravity( Imagick::GRAVITY_CENTER ); /* Write the text on the image */ $Imagick->annotateImage( $ImagickDraw, 4, 20, 0, "Test Watermark" ); /* Set format to png */ $Imagick->setImageFormat( 'png' ); /* Output */ header( "Content-Type: image/{$Imagick->getImageFormat()}" ); echo $Imagick->getImageBlob(); ?>imagick-3.6.0/tests/001_imagick_readimage.phpt0000644000000000000000000000053514145213427017651 0ustar rootroot--TEST-- Imagick::readImage test --SKIPIF-- --FILE-- readImage('foo.jpg'); } catch (ImagickException $e) { echo "got exception"; } ?> --EXPECTF-- --- Catch exception with try/catch got exceptionimagick-3.6.0/tests/002_thumbnail.phpt0000644000000000000000000000745114145213427016237 0ustar rootroot--TEST-- Different types of thumbnailing --SKIPIF-- --FILE-- newImage( 400, 200, "white" ); $imagick->thumbnailImage( 100, null, false ); $g = $imagick->getImageGeometry(); echo "{$g['width']}x{$g['height']}\n"; echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, 100, false )\n"; $imagick = new Imagick(); $imagick->newImage( 400, 200, "white" ); $imagick->thumbnailImage( null, 100, false ); $g = $imagick->getImageGeometry(); echo "{$g['width']}x{$g['height']}\n"; echo "--- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, false )\n"; $imagick = new Imagick(); $imagick->newImage( 400, 200, "white" ); $imagick->thumbnailImage( 100, 100, false); $g = $imagick->getImageGeometry(); echo "{$g['width']}x{$g['height']}\n"; echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, null, false )\n"; $imagick = new Imagick(); $imagick->newImage( 400, 200, "white" ); try { $imagick->thumbnailImage( null, null, false ); echo "FAILED TEST\n"; } catch ( ImagickException $e ) { echo $e->getMessage() . "\n"; } echo "--- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, true )\n"; $imagick = new Imagick(); $imagick->newImage( 400, 200, "white" ); $imagick->thumbnailImage( 100, 100, true ); $g = $imagick->getImageGeometry(); echo "{$g['width']}x{$g['height']}\n"; echo "--- Source Image: 400x200, Imagick::thumbnailImage( 100, null, true )\n"; $imagick = new Imagick(); $imagick->newImage( 400, 200, "white" ); try { $imagick->thumbnailImage( 100, null, true ); echo "FAILED TEST\n"; } catch ( ImagickException $e ) { echo $e->getMessage() . "\n"; } echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, 100, true )\n"; $imagick = new Imagick(); $imagick->newImage( 400, 200, "white" ); try { $imagick->thumbnailImage( null, 100, true ); echo "FAILED TEST\n"; } catch ( ImagickException $e ) { echo $e->getMessage() . "\n"; } echo "--- Source Image: 400x200, Imagick::thumbnailImage( null, null, true )\n"; $imagick = new Imagick(); $imagick->newImage( 400, 200, "white" ); try { $imagick->thumbnailImage( null, null, true ); echo "FAILED TEST\n"; } catch ( ImagickException $e ) { echo $e->getMessage() . "\n"; } // Legacy version $imagick = new Imagick(); $imagick->newImage(2961, 2592, "white" ); $imagick->thumbnailImage(300, 0, false, false, true); if ($imagick->getImageWidth() != 300) { echo "Error in height for 2961, 2592: actual is ".$image->getImageWidth()." not 300.".PHP_EOL; } if ($imagick->getImageHeight() != 262) { echo "Error in height for 2961, 2592: actual is ".$image->getImageHeight()." not 262.".PHP_EOL; } // Correct version $imagick = new Imagick(); $imagick->newImage(2961, 2592, "white" ); $imagick->thumbnailImage(300, 0); if ($imagick->getImageWidth() != 300) { echo "Error in height for 2961, 2592: actual is ".$image->getImageWidth()." not 300.".PHP_EOL; } if ($imagick->getImageHeight() != 263) { echo "Error in height for 2961, 2592: actual is ".$image->getImageHeight()." not 263.".PHP_EOL; } ?> --EXPECTF-- --- Source Image: 400x200, Imagick::thumbnailImage( 100, null, false ) 100x50 --- Source Image: 400x200, Imagick::thumbnailImage( null, 100, false ) 200x100 --- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, false ) 100x100 --- Source Image: 400x200, Imagick::thumbnailImage( null, null, false ) Invalid image geometry --- Source Image: 400x200, Imagick::thumbnailImage( 100, 100, true ) 100x50 --- Source Image: 400x200, Imagick::thumbnailImage( 100, null, true ) Invalid image geometry --- Source Image: 400x200, Imagick::thumbnailImage( null, 100, true ) Invalid image geometry --- Source Image: 400x200, Imagick::thumbnailImage( null, null, true ) Invalid image geometry imagick-3.6.0/tests/003_cast_color_opacity.phpt0000644000000000000000000000155514145213427020134 0ustar rootroot--TEST-- Casting color and opacity to pixel --SKIPIF-- --FILE-- newImage(100, 100, "red"); $im->tintImage("red", "gray(50%)"); echo "Casting color and opacity succeeded\n"; } catch (Exception $e) { echo "Casting color and opacity failed: " , $e->getMessage() . PHP_EOL; } try { $im = new Imagick(); $pixel = new ImagickPixel("red"); $strengthPixel = new ImagickPixel("gray"); $im->newImage(100, 100, $pixel); $im->tintImage($pixel, $strengthPixel); echo "Setting color and opacity without cast succeeded\n"; } catch (Exception $e) { echo "Setting color and opacity without cast failed: " , $e->getMessage() . PHP_EOL; } ?> --EXPECTF-- --- Testing casts Casting color and opacity succeeded Setting color and opacity without cast succeededimagick-3.6.0/tests/004_clone.phpt0000644000000000000000000000077214145213427015355 0ustar rootroot--TEST-- Testing clone keyword --SKIPIF-- --FILE-- newImage(100, 100, new ImagickPixel("white")); $new = clone $im; if ($new->getImageWidth() == 100 && $new->getImageHeight() == 100) { echo "Cloning succeeded\n"; } else { echo "Cloning failed\n"; } } catch (Exception $e) { echo "Cloning failed\n"; } ?> --EXPECTF-- --- Testing clone keyword Cloning succeededimagick-3.6.0/tests/005_bestfit.phpt0000644000000000000000000000050014145213427015703 0ustar rootroot--TEST-- Test thumbnail bestfit --SKIPIF-- --FILE-- newImage(50, 100, 'white'); $im->thumbnailImage(100, 50, true); var_dump($im->getImageGeometry()); ?> --EXPECTF-- array(2) { ["width"]=> int(25) ["height"]=> int(50) }imagick-3.6.0/tests/006_cropthumbnail.phpt0000644000000000000000000000215514145213427017123 0ustar rootroot--TEST-- Test cropthumbnail --SKIPIF-- --FILE-- cropThumbnailImage(200, 200); var_dump($im->getImageGeometry()); $im = new Imagick("magick:rose"); $im->cropThumbnailImage(170, 120); var_dump($im->getImageGeometry()); $im = new Imagick("magick:rose"); $im->cropThumbnailImage(50, 50); var_dump($im->getImageGeometry()); $im = new Imagick("magick:rose"); $im->cropThumbnailImage(60, 120); var_dump($im->getImageGeometry()); $im = new Imagick("magick:logo"); $im->cropThumbnailImage(100, 100); var_dump($im->getImageGeometry()); $im = new Imagick("magick:rose"); $im->cropThumbnailImage(200, 10); var_dump($im->getImageGeometry()); ?> --EXPECTF-- array(2) { ["width"]=> int(200) ["height"]=> int(200) } array(2) { ["width"]=> int(170) ["height"]=> int(120) } array(2) { ["width"]=> int(50) ["height"]=> int(50) } array(2) { ["width"]=> int(60) ["height"]=> int(120) } array(2) { ["width"]=> int(100) ["height"]=> int(100) } array(2) { ["width"]=> int(200) ["height"]=> int(10) }imagick-3.6.0/tests/007_thumbnail_fill.phpt0000644000000000000000000000145014145213427017243 0ustar rootroot--TEST-- Test filling thumbnail with color --SKIPIF-- = 0x660 && $v ['versionNumber'] < 0x670) die ('skip seems to be broken in this version of ImageMagick'); ?> --FILE-- setImageBackgroundColor("pink"); $im->thumbnailImage(200, 200, true, true); $color = $im->getImagePixelColor(5, 5); if ($color->isPixelSimilar("pink", 0)) echo "Similar" . PHP_EOL; else var_dump ($color->getColorAsString()); $color = $im->getImagePixelColor(199, 5); if ($color->isPixelSimilar("pink", 0)) echo "Similar" . PHP_EOL; else var_dump ($color->getColorAsString()); ?> --EXPECT-- Similar Similarimagick-3.6.0/tests/008_newpseudoimage.phpt0000644000000000000000000000146714145213427017277 0ustar rootroot--TEST-- Test pseudo formats --SKIPIF-- --FILE-- newPseudoImage(100, 100, "XC:red"); var_dump($im->getImageGeometry()); $im->newPseudoImage(10, 10, "magick:logo"); var_dump($im->getImageGeometry()); $im->readImage("magick:logo"); var_dump($im->getImageGeometry()); $im->newPseudoImage(10, 10, "rose:"); var_dump($im->getImageGeometry()); try { $im->newPseudoImage(10, 10, "png:"); var_dump($im->getImageGeometry()); } catch (Exception $e) { echo "fail\n"; } ?> --EXPECTF-- array(2) { ["width"]=> int(%d) ["height"]=> int(%d) } array(2) { ["width"]=> int(%d) ["height"]=> int(%d) } array(2) { ["width"]=> int(%d) ["height"]=> int(%d) } array(2) { ["width"]=> int(%d) ["height"]=> int(%d) } failimagick-3.6.0/tests/009_properties.phpt0000644000000000000000000000051114145213427016445 0ustar rootroot--TEST-- Test reading properties --SKIPIF-- --FILE-- newPseudoImage(100, 100, "XC:red"); $im->setImageFormat("png"); echo $im->width . "x" . $im->height . "\n"; echo $im->format; ?> --EXPECTF-- 100x100 pngimagick-3.6.0/tests/010_importimagepixels.phpt0000644000000000000000000000215514145213427020011 0ustar rootroot--TEST-- Test importimagepixels --SKIPIF-- --FILE-- newImage($width, $height, 'gray'); /* Import the pixels into image. width * height * strlen("RGB") must match count($pixels) */ $im->importImagePixels(0, 0, $width, $height, "RGB", Imagick::PIXEL_CHAR, $pixels); var_dump($width, $height); var_dump($im->getImageGeometry()); ?> --EXPECTF-- int(100) int(100) array(2) { ["width"]=> int(100) ["height"]=> int(100) }imagick-3.6.0/tests/011_polygon.phpt0000644000000000000000000000074414145213427015741 0ustar rootroot--TEST-- Test polygon method arguments --SKIPIF-- --FILE-- polygon(array( array('x' => 1, 'y' => 2), array('x' => 'hello', 'y' => array()) )); echo "pass\n"; } catch (Exception $e) { echo "fail\n"; } try { $draw->polygon(array(array())); echo "fail\n"; } catch (ImagickDrawException $e) { echo "pass\n"; } ?> --EXPECTF-- pass passimagick-3.6.0/tests/012-clone-separation.phpt0000644000000000000000000000103614145213427017427 0ustar rootroot--TEST-- Testing that cloned object does not affect the original --SKIPIF-- --FILE-- newImage(100, 100, new ImagickPixel("white")); $new = clone $im; $new->thumbnailImage(200, null); var_dump($im->width, $new->width); $new2 = $im->clone(); $new2->thumbnailImage(200, null); var_dump($im->width, $new2->width); ?> --EXPECTF-- int(100) int(200) %s: Imagick::clone method is deprecated and it's use should be avoided in %s on line %d int(100) int(200)imagick-3.6.0/tests/013-read-filehandle.phpt0000644000000000000000000000077414145213427017201 0ustar rootroot--TEST-- Imagick::readImageFile test --SKIPIF-- --FILE-- setImageFormat('jpg'); $imagick->writeImage($file); $imagick->clear(); $handle = fopen($file, 'rb'); $imagick->readImageFile($handle); unlink($file); echo 'success'; ?> --CLEAN-- --EXPECT-- successimagick-3.6.0/tests/014-setresourcelimit.phpt0000644000000000000000000000412114145213427017566 0ustar rootroot--TEST-- Imagick::setResourceLimit test --SKIPIF-- --FILE-- 100000000, // Set maximum amount of disk space in bytes permitted for use by the pixel cache. When this limit is exceeded, the pixel cache is not be created and an error message is returned. Imagick::RESOURCETYPE_DISK => 100, //Set maximum number of open pixel cache files. When this limit is exceeded, any subsequent pixels cached to disk are closed and reopened on demand. This behavior permits a large number of images to be accessed simultaneously on disk, but with a speed penalty due to repeated open/close calls. Imagick::RESOURCETYPE_FILE => 100, // Set maximum amount of memory map in bytes to allocate for the pixel cache. When this limit is exceeded, the image pixels are cached to disk Imagick::RESOURCETYPE_MAP => 10 * $g, // Set maximum amount of memory in bytes to allocate for the pixel cache from the heap. When this limit is exceeded, the image pixels are cached to memory-mapped disk Imagick::RESOURCETYPE_MEMORY => 10 * $g, ); if (defined('Imagick::RESOURCETYPE_TIME')) { $tests[Imagick::RESOURCETYPE_TIME] = 30; } if (defined('Imagick::RESOURCETYPE_THROTTLE')) { $tests[Imagick::RESOURCETYPE_THROTTLE] = 1; } if (defined('Imagick::RESOURCETYPE_THREAD')) { $tests[Imagick::RESOURCETYPE_THREAD] = 1; } if (defined('Imagick::RESOURCETYPE_WIDTH')) { $tests[Imagick::RESOURCETYPE_WIDTH] = $g; } if (defined('Imagick::RESOURCETYPE_HEIGHT')) { $tests[Imagick::RESOURCETYPE_HEIGHT] = $g; } foreach ($tests as $resourceType => $value) { Imagick::setResourceLimit($resourceType, $value); $actualValue = Imagick::getResourceLimit($resourceType); if ($actualValue != $value) { echo "Error testing $resourceType, value returned $actualValue is not $value \n"; } } echo 'success'; ?> --EXPECTF-- successimagick-3.6.0/tests/015-imagickdrawsetresolution.phpt0000644000000000000000000000304314145213427021311 0ustar rootroot--TEST-- Test ImagickDraw->setResolution --SKIPIF-- --FILE-- newImage(1000,1000, "white","png"); $draw = new ImagickDraw(); $draw->setFont (dirname (__FILE__) . '/anonymous_pro_minus.ttf'); $draw->setFontSize(72); $draw->setResolution(10, 10); $small = $im->queryFontMetrics($draw, "Hello World"); $draw->setResolution(300, 300); $large = $im->queryFontMetrics($draw, "Hello World"); if ($small['textWidth'] < $large['textWidth']) { echo "Small font _is_ smaller than big font.".PHP_EOL; } //These will both be one line. $oneLine = $im->queryFontMetrics($draw, "Hello Hello"); $forceOneLine = $im->queryFontMetrics($draw, "Hello \nHello", false); //These will both be multiline $forceMultiLine = $im->queryFontMetrics($draw, "Hello \nHello", true); $guessLine = $im->queryFontMetrics($draw, "Hello\nHello"); if (abs($oneLine["textHeight"] - $forceOneLine["textHeight"]) > 0.1) { //Reaching this is bad echo "One line and forced one line are not the same height.".PHP_EOL; echo $oneLine["textHeight"]." ".$forceOneLine["textHeight"].PHP_EOL; } if ($forceMultiLine["textHeight"] - (2 * $forceOneLine["textHeight"]) + 2 > 0) { echo "Two lines are 2 times one line.".PHP_EOL; } if ($guessLine["textHeight"] - (2 * $forceOneLine["textHeight"]) + 2 > 0) { echo "Two lines are 2 times one line.".PHP_EOL; } echo "OK\n"; ?> --EXPECT-- Small font _is_ smaller than big font. Two lines are 2 times one line. Two lines are 2 times one line. OK imagick-3.6.0/tests/016-static-methods.phpt0000644000000000000000000000061114145213427017116 0ustar rootroot--TEST-- Test static methods --SKIPIF-- --FILE-- queryFormats ()) . PHP_EOL; echo gettype (Imagick::queryFonts ()) . PHP_EOL; echo gettype ($im->queryFonts ()) . PHP_EOL; echo 'success'; ?> --EXPECT-- array array array array successimagick-3.6.0/tests/017-clear-destroy.phpt0000644000000000000000000000067714145213427016760 0ustar rootroot--TEST-- Clear and destroy aliases --SKIPIF-- --FILE-- clear (); $im->destroy (); $im = new ImagickDraw (); $im->clear (); $im->destroy (); $im = new ImagickPixel (); $im->clear (); $im->destroy (); $magick = new Imagick ('magick:rose'); $im = new ImagickPixelIterator ($magick); $im->clear (); $im->destroy (); echo 'success'; ?> --EXPECT-- successimagick-3.6.0/tests/018-clone-length.phpt0000644000000000000000000000125314145213427016552 0ustar rootroot--TEST-- Test clone length, this is expected upstream behaviour --SKIPIF-- = 0x640 && $v ['versionNumber'] < 0x650) die ('skip seems to be different in this version of ImageMagick'); ?> --FILE-- setImageFormat ('png'); if ($im->getImageLength()) { echo "Image created has length" . PHP_EOL; } else { echo "Image created has zero length" . PHP_EOL; } $cloned = clone $im; $cloned->setImageFormat ('png'); var_dump ($cloned->getImageLength ()); ?> --EXPECT-- Image created has length int(0) imagick-3.6.0/tests/019-readimages.phpt0000644000000000000000000000165114145213427016277 0ustar rootroot--TEST-- Imagick::readImages --SKIPIF-- --FILE-- readImages (array ( 'magick:rose', 'magick:rose', 'magick:rose', )); echo 'OK readImages' . PHP_EOL; try{ $imagick->readImages (array ( 'magick:rose', 'fail_this_does_not_exist.jpg', )); echo 'Fail' . PHP_EOL; } catch (ImagickException $e) { echo 'OK readImages exception'. PHP_EOL; } ?> --EXPECT-- OK construct exception OK construct OK readImages OK readImages exceptionimagick-3.6.0/tests/020-pixeliterator.phpt0000644000000000000000000000351414145213427017061 0ustar rootroot--TEST-- Pixel Iterator tests --SKIPIF-- --FILE-- rewind(); $pixelRegion->resetIterator(); while($pixelRow = $pixelRegion->current()) { $row++; foreach ($pixelRow as $pixel) { $objects++; } $pixelRegion->syncIterator(); $pixelRegion->next(); if (!$pixelRegion->valid()) { break; } } return $objects; } $im = new Imagick ('magick:rose'); $it1 = new ImagickPixelIterator ($im); $it2 = ImagickPixelIterator::getPixelIterator ($im); $it3 = $im->getPixelIterator(); $count1 = count_rows ($it1); $count2 = count_rows ($it2); $count3 = count_rows ($it3); if ($count1 != $count2 || $count1 != $count3) { printf( "Row counts do not match %d %d %d", $count1, $count2, $count3 ); } if ($count1 != $count2 || $count1 != $count3) { printf( "Object counts do not match %d %d %d", $count1, $count2, $count3 ); } $objects = array($it1, $it2, $it3); foreach ($objects as $object) { $loop = 0; $count = count_objects($object); $countIterator = count_objects_with_iterator($object); if ($countIterator != $count) { echo "Counting with iterator doesn't match counting with foreach $loop, $count != $countIterator."; $loop++; } } $it1->newPixelIterator (new Imagick ('magick:rose')); echo 'done' . PHP_EOL; ?> --EXPECTF-- %s: ImagickPixelIterator::newPixelIterator is deprecated. ImagickPixelIterator::getPixelIterator should be used instead in %s on line %d doneimagick-3.6.0/tests/021-countable.phpt0000644000000000000000000000054514145213427016144 0ustar rootroot--TEST-- Test countable interface --SKIPIF-- --FILE-- --EXPECT-- 3 doneimagick-3.6.0/tests/022-writeimagefileformat.phpt0000644000000000000000000000332214145213427020373 0ustar rootroot--TEST-- Test format support in writeImageFile --SKIPIF-- --FILE-- writeImage (JPEG_FILE); $im->clear (); // This is the problematic case, setImageFormat doesn't really // affect writeImageFile. // So in this case we want to write PNG but file should come out // as JPEG $fp = fopen (PNG_FILE, "w+"); $im->readImage (JPEG_FILE); $im->setImageFormat ('png'); $im->writeImageFile ($fp); $im->clear (); fclose ($fp); // Output the format $identify = new Imagick (PNG_FILE); echo $identify->getImageFormat () . PHP_EOL; // Lets try again, setting the filename rather than format // This should cause PNG image to be written $fp = fopen (PNG_FILE, "w+"); $im->readImage (JPEG_FILE); $im->setImageFilename ('png:'); $im->writeImageFile ($fp); $im->clear (); fclose ($fp); // If all goes according to plan, on second time we should get PNG $identify = new Imagick (PNG_FILE); echo $identify->getImageFormat () . PHP_EOL; // Lastly, test the newly added format parameter $fp = fopen (PNG_FILE, "w+"); $im->readImage (JPEG_FILE); $im->writeImageFile ($fp, 'png'); $im->clear (); fclose ($fp); // If all goes according to plan, on second time we should get PNG $identify = new Imagick (PNG_FILE); echo $identify->getImageFormat () . PHP_EOL; unlink (PNG_FILE); unlink (JPEG_FILE); echo 'done' . PHP_EOL; ?> --CLEAN-- --EXPECT-- JPEG PNG PNG doneimagick-3.6.0/tests/024-ispixelsimilar.phpt0000644000000000000000000000431314145213427017226 0ustar rootroot--TEST-- Test ImagickPixel::isPixelSimilar --SKIPIF-- isPixelSimilarQuantum($color2Pixel, $testDistance * \Imagick::getquantum()); if ($isSimilar !== $expectation) { echo "isSimilar failed. Color [$color1] compared to color [$color2] distance $testDistance doesn't meet expected result [$expectation].". PHP_EOL; } $isPixelSimilar = $color1Pixel->isPixelSimilar($color2Pixel, $testDistance); if ($isPixelSimilar !== $expectation) { echo "isPixelSimilar failed. Color [$color1] compared to color [$color2] distance $testDistance doesn't meet expected result [$expectation].". PHP_EOL; } } echo "success"; } catch (\Exception $e) { echo "Exception caught in ImagickPixel::isPixelSimilar test: ".$e->getMessage() . PHP_EOL; } ?> --EXPECT-- successimagick-3.6.0/tests/025-function-image.phpt0000644000000000000000000000040414145213427017073 0ustar rootroot--TEST-- Test functionimage --SKIPIF-- --FILE-- convolveimage (array (1, 'a', 1)); echo "OK" . PHP_EOL; ?> --EXPECT-- OKimagick-3.6.0/tests/025-get-color.phpt0000644000000000000000000000652314145213427016071 0ustar rootroot--TEST-- Test getColor and getColorQuantum --SKIPIF-- --FILE-- 1 ); $v = Imagick::getVersion(); $versionNumber = $v['versionNumber']; if (array_key_exists($versionNumber, $troubledVersions)) { $variance = $troubledVersions[$versionNumber]; } if (Imagick::getHDRIEnabled()) { return abs($expectedValue - $actualValue) < (0.01 + $variance); } if ($hasVariance) { $difference = abs($expectedValue - $actualValue); if ($difference < 1 + $variance) { return true; } echo "difference $difference not < 1 + variance $variance\n"; return false; } else if($expectedValue == $actualValue) { return true; } return false; } function getExpectedValue($someValue) { if (Imagick::getHDRIEnabled()) { return $someValue; } $v = Imagick::getVersion(); if ($v['versionNumber'] >= 0x692) { //this is the new correct behaviour return (intval(round($someValue, 0, PHP_ROUND_HALF_UP))); } else { //old behaviour had wrong rounding. return (intval(round($someValue, 0, PHP_ROUND_HALF_DOWN))); } } $tests = array( array( 'red', ORIGINAL, array( array('r', getExpectedValue(255), 0), array('a', getExpectedValue(1.0), 0) ), ), array( 'red', QUANTUM, array( array('r', getExpectedValue(\Imagick::getQuantum()), 0), array('a', getExpectedValue(\Imagick::getQuantum()), 0) ), ), array( 'rgb(25%, 25%, 25%)', QUANTUM, array( array('r', getExpectedValue(\Imagick::getQuantum() / 4), 0), array('a', getExpectedValue(\Imagick::getQuantum()), 0), ) ) ); $version = Imagick::getVersion(); // The following don't seem stable in lesser versions. if ($version['versionNumber'] >= 0x687) { $tests[] = array( 'green', QUANTUM, array( array('g', getExpectedValue(\Imagick::getQuantum() * (128 / 255)), 1), array('a', getExpectedValue(\Imagick::getQuantum()), 1) ), ); $tests[] = array( 'rgb(0, 50%, 0)', QUANTUM, array( array('g', getExpectedValue(\Imagick::getQuantum() / 2), 1), array('a', getExpectedValue(\Imagick::getQuantum()), 0) ), ); } foreach ($tests as $test) { list($colorString, $type, $expectations) = $test; $pixel = new ImagickPixel($colorString); switch ($type) { case(ORIGINAL): { $color = $pixel->getColor(); break; } case(NORMALISED): { $color = $pixel->getColor(true); break; } case(NORMALISED_INCLUDING_ALPHA): { $color = $pixel->getColor(2); break; } case(QUANTUM): { $color = $pixel->getColorQuantum(); break; } default:{ echo "Unknown test type $type" . PHP_EOL; break; } } foreach ($expectations as $test) { list($key, $expectedValue, $hasVariance) = $test; if (!checkExpectedValue($expectedValue, $color[$key], $hasVariance)) { printf( "%s %s is wrong for colorString '%s': actual %s != expected %s" . PHP_EOL, $type, $key, $colorString, $color[$key], $expectedValue ); } } } echo "OK" . PHP_EOL; ?> --EXPECT-- OKimagick-3.6.0/tests/026_phpinfo.phpt0000644000000000000000000000057414145213427015724 0ustar rootroot--TEST-- Test Imagick module hasn't broken phpinfo --SKIPIF-- --FILE-- enabled') !== false) { echo "Ok"; } else { echo "Imagick was not reported as enabled?"; var_dump($contents); } ?> --EXPECTF-- Okimagick-3.6.0/tests/027_Imagick_adaptiveResizeImage_basic.phpt0000644000000000000000000000113114145213427022757 0ustar rootroot--TEST-- Test Imagick, adaptiveResizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->adaptiveResizeImage($width, $height, $bestFit); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } adaptiveResizeImage($width, $height, $bestFit) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/028_Imagick_adaptiveSharpenImage_basic.phpt0000644000000000000000000000115714145213427023127 0ustar rootroot--TEST-- Test Imagick, adaptiveSharpenImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->adaptiveSharpenImage($radius, $sigma, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } adaptiveSharpenImage($radius, $sigma, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/029_Imagick_adaptiveBlurImage_basic.phpt0000644000000000000000000000114314145213427022427 0ustar rootroot--TEST-- Test Imagick, adaptiveBlurImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->adaptiveBlurImage($radius, $sigma, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } adaptiveBlurImage($radius, $sigma, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/030_Imagick_adaptiveThresholdImage_basic.phpt0000644000000000000000000000133014145213427023445 0ustar rootroot--TEST-- Test Imagick, adaptiveThresholdImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $adaptiveOffsetQuantum = intval($adaptiveOffset * \Imagick::getQuantum()); $imagick->adaptiveThresholdImage($width, $height, $adaptiveOffsetQuantum); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } adaptiveThresholdImage($width, $height, $adaptiveOffset) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/031_Imagick_affineTransformImage_basic.phpt0000644000000000000000000000757014145213427023134 0ustar rootroot--TEST-- Test Imagick, affineTransformImage --SKIPIF-- --XFAIL-- I don't understand what values are returned in which elements of getImageChannelStatistics --FILE-- newPseudoImage(640, 640, "xc:black"); $draw = new \ImagickDraw(); $angle = deg2rad(45); //$angle = deg2rad(3); $draw->setFillColor('white'); $draw->setStrokeColor('white'); $draw->setStrokeWidth(10.0); $draw->setStrokeLineCap(Imagick::LINECAP_SQUARE); $draw->setStrokeLineJoin(Imagick::LINEJOIN_BEVEL); $draw->line( $start_x = -50, $start_y = -50, $end_x = 690, $end_y = 690 ); $imagick->drawImage($draw); $draw = new \ImagickDraw(); $affineRotate = array( "sx" => cos($angle), "sy" => cos($angle), "rx" => sin($angle), "ry" => -sin($angle), "tx" => 0, "ty" => 0, ); $draw->affine($affineRotate); $imagick->setImageVirtualPixelMethod(Imagick::VIRTUALPIXELMETHOD_BLACK); $imagick->affineTransformImage($draw); $imagick->setImagePage($imagick->getimageWidth(), $imagick->getimageheight(), 0, 0); $imagick->cropImage( $imagick->getImageWidth() - 40, $imagick->getImageHeight() - 40, 20, 20 ); $imagick->setImageFormat('png'); $imagick->writeImage(__DIR__ . '/test_031.png'); $lineCheckBlack = clone $imagick; $blackout = new \ImagickDraw(); $blackout->setStrokeColor('black'); $blackout->setFillColor('black'); $blackout->rectangle( ($lineCheckBlack->getImageWidth() / 2) - 20, 0, ($lineCheckBlack->getImageWidth() / 2) + 20, $lineCheckBlack->getImageHeight() ); $lineCheckBlack->drawImage($blackout); // $lineCheckBlack->writeImage(__DIR__ . '/test_031_blank.png'); $whiteout = new \ImagickDraw(); $lineCheckWhite = clone $imagick; $whiteout->setStrokeColor('white'); $whiteout->setFillColor('white'); $whiteout->rectangle( ($lineCheckBlack->getImageWidth() / 2) - 4, 0, 0, $lineCheckBlack->getImageHeight() ); $whiteout->rectangle( ($lineCheckWhite->getImageWidth() / 2) + 4, 0, $lineCheckWhite->getImageWidth(), $lineCheckWhite->getImageHeight() ); $lineCheckWhite->drawImage($whiteout); // $lineCheckWhite->writeImage(__DIR__ . '/test_031_white.png'); $channelStatistics = $lineCheckWhite->getImageChannelStatistics(); echo "Checking white\n"; checkAllStatsAreValue($channelStatistics, Imagick::getQuantum()); $channelStatistics = $lineCheckBlack->getImageChannelStatistics(); // var_dump( // "lineCheckBlack channel stats are:", // $channelStatistics // ); echo "Checking black\n"; checkAllStatsAreValue($channelStatistics, 0); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } affineTransformImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Checking white Stats checked Checking black Stats checked Ok imagick-3.6.0/tests/032_Imagick_addNoiseImage_basic.phpt0000644000000000000000000000162114145213427021526 0ustar rootroot--TEST-- Test Imagick, addNoiseImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->addNoiseImage($noiseType, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } function addNoiseImageWithAttenuate($noiseType, $channel) { $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $imagick->addNoiseImageWithAttenuate($noiseType, 1.4, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } addNoiseImage($noiseType, $channel); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/033_Imagick_autoLevelImage_basic.phpt0000644000000000000000000000071614145213427021745 0ustar rootroot--TEST-- Test Imagick, autoLevelImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->autoLevelImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } autoLevelImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/034_Imagick_annotateImage_basic.phpt0000644000000000000000000000175014145213427021616 0ustar rootroot--TEST-- Test Imagick, annotateImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $draw = new \ImagickDraw(); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setFontSize(36); $text = "Imagick is a native php \nextension to create and \nmodify images using the\nImageMagick API."; setFontForImagick($imagick); setFontForImagickDraw($draw); $imagick->annotateimage($draw, 40, 40, 0, $text); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } annotateImage($strokeColor, $fillColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/035_Imagick_blackThresholdImage_basic.phpt0000644000000000000000000000106614145213427022737 0ustar rootroot--TEST-- Test Imagick, blackThresholdImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->blackthresholdimage($thresholdColor); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } blackThresholdImage($thresholdColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/036_Imagick_blueShiftImage_basic.phpt0000644000000000000000000000077514145213427021742 0ustar rootroot--TEST-- Test Imagick, blueShiftImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->blueShiftImage($blueShift); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } blueShiftImage($blueShift) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/037_Imagick_blurImage_basic.phpt0000644000000000000000000000110214145213427020743 0ustar rootroot--TEST-- Test Imagick, blurImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->blurImage($radius, $sigma, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } blurImage($radius, $sigma, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/038_Imagick_brightnessContrastImage_basic.phpt0000644000000000000000000000123214145213427023672 0ustar rootroot--TEST-- Test Imagick, brightnessContrastImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->brightnessContrastImage($brightness, $contrast, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } brightnessContrastImage($brightness, $contrast, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/039_Imagick_borderImage_basic.phpt0000644000000000000000000000110014145213427021254 0ustar rootroot--TEST-- Test Imagick, borderImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->borderImage($color, $width, $height); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } borderImage($color, $width, $height) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/039_Imagick_borderImage_im7.phpt0000644000000000000000000001330514145213427020701 0ustar rootroot--TEST-- Test Imagick, borderImageWithComposite --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->borderImage($color, $width, $height); if ($blendOption === null) { $imagick->borderImage($color, $width, $height); } else { $imagick->borderImageWithComposite($color, $width, $height, $blendOption); } $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image."; } return $imagick; } $blendOptions = [ "null" => null, // "COMPOSITE_NO" => Imagick::COMPOSITE_NO, // //"COMPOSITE_ADD" => Imagick::COMPOSITE_ADD, "COMPOSITE_ATOP" => Imagick::COMPOSITE_ATOP, // "COMPOSITE_BLEND" => Imagick::COMPOSITE_BLEND, // "COMPOSITE_BUMPMAP" => Imagick::COMPOSITE_BUMPMAP, // "COMPOSITE_CLEAR" => Imagick::COMPOSITE_CLEAR, // "COMPOSITE_COLORBURN" => Imagick::COMPOSITE_COLORBURN, // "COMPOSITE_COLORDODGE" => Imagick::COMPOSITE_COLORDODGE, // "COMPOSITE_COLORIZE" => Imagick::COMPOSITE_COLORIZE, // "COMPOSITE_COPYBLACK" => Imagick::COMPOSITE_COPYBLACK, // "COMPOSITE_COPYBLUE" => Imagick::COMPOSITE_COPYBLUE, // "COMPOSITE_COPY" => Imagick::COMPOSITE_COPY, // "COMPOSITE_COPYCYAN" => Imagick::COMPOSITE_COPYCYAN, // "COMPOSITE_COPYGREEN" => Imagick::COMPOSITE_COPYGREEN, // "COMPOSITE_COPYMAGENTA" => Imagick::COMPOSITE_COPYMAGENTA, // "COMPOSITE_COPYALPHA" => Imagick::COMPOSITE_COPYALPHA, // "COMPOSITE_COPYOPACITY" => Imagick::COMPOSITE_COPYOPACITY, // "COMPOSITE_COPYRED" => Imagick::COMPOSITE_COPYRED, // "COMPOSITE_COPYYELLOW" => Imagick::COMPOSITE_COPYYELLOW, // "COMPOSITE_DARKEN" => Imagick::COMPOSITE_DARKEN, // "COMPOSITE_DSTATOP" => Imagick::COMPOSITE_DSTATOP, // "COMPOSITE_DST" => Imagick::COMPOSITE_DST, // "COMPOSITE_DSTIN" => Imagick::COMPOSITE_DSTIN, // "COMPOSITE_DSTOUT" => Imagick::COMPOSITE_DSTOUT, // "COMPOSITE_DSTOVER" => Imagick::COMPOSITE_DSTOVER, // "COMPOSITE_DIFFERENCE" => Imagick::COMPOSITE_DIFFERENCE, // "COMPOSITE_DISPLACE" => Imagick::COMPOSITE_DISPLACE, // "COMPOSITE_DISSOLVE" => Imagick::COMPOSITE_DISSOLVE, // "COMPOSITE_EXCLUSION" => Imagick::COMPOSITE_EXCLUSION, // "COMPOSITE_HARDLIGHT" => Imagick::COMPOSITE_HARDLIGHT, // "COMPOSITE_HUE" => Imagick::COMPOSITE_HUE, // "COMPOSITE_IN" => Imagick::COMPOSITE_IN, // "COMPOSITE_LIGHTEN" => Imagick::COMPOSITE_LIGHTEN, // "COMPOSITE_LUMINIZE" => Imagick::COMPOSITE_LUMINIZE, // //"COMPOSITE_MINUS" => Imagick::COMPOSITE_MINUS, // "COMPOSITE_MODULATE" => Imagick::COMPOSITE_MODULATE, // "COMPOSITE_MULTIPLY" => Imagick::COMPOSITE_MULTIPLY, // "COMPOSITE_OUT" => Imagick::COMPOSITE_OUT, "COMPOSITE_OVER" => Imagick::COMPOSITE_OVER, // "COMPOSITE_OVERLAY" => Imagick::COMPOSITE_OVERLAY, // "COMPOSITE_PLUS" => Imagick::COMPOSITE_PLUS, // "COMPOSITE_REPLACE" => Imagick::COMPOSITE_REPLACE, // "COMPOSITE_SATURATE" => Imagick::COMPOSITE_SATURATE, // "COMPOSITE_SCREEN" => Imagick::COMPOSITE_SCREEN, // "COMPOSITE_SOFTLIGHT" => Imagick::COMPOSITE_SOFTLIGHT, // "COMPOSITE_SRCATOP" => Imagick::COMPOSITE_SRCATOP, // "COMPOSITE_SRC" => Imagick::COMPOSITE_SRC, // "COMPOSITE_SRCIN" => Imagick::COMPOSITE_SRCIN, // "COMPOSITE_SRCOUT" => Imagick::COMPOSITE_SRCOUT, // "COMPOSITE_SRCOVER" => Imagick::COMPOSITE_SRCOVER, // // "COMPOSITE_SUBTRACT" => Imagick::COMPOSITE_SUBTRACT, // "COMPOSITE_THRESHOLD" => Imagick::COMPOSITE_THRESHOLD, // "COMPOSITE_XOR" => Imagick::COMPOSITE_XOR, // "COMPOSITE_CHANGEMASK" => Imagick::COMPOSITE_CHANGEMASK, // "COMPOSITE_LINEARLIGHT" => Imagick::COMPOSITE_LINEARLIGHT, // "COMPOSITE_DIVIDE" => Imagick::COMPOSITE_DIVIDE, // "COMPOSITE_DISTORT" => Imagick::COMPOSITE_DISTORT, // //"COMPOSITE_BLUR" => Imagick::COMPOSITE_BLUR, // "COMPOSITE_PEGTOPLIGHT" => Imagick::COMPOSITE_PEGTOPLIGHT, // "COMPOSITE_VIVIDLIGHT" => Imagick::COMPOSITE_VIVIDLIGHT, // "COMPOSITE_PINLIGHT" => Imagick::COMPOSITE_PINLIGHT, // "COMPOSITE_LINEARDODGE" => Imagick::COMPOSITE_LINEARDODGE, // "COMPOSITE_LINEARBURN" => Imagick::COMPOSITE_LINEARBURN, // "COMPOSITE_MATHEMATICS" => Imagick::COMPOSITE_MATHEMATICS, // "COMPOSITE_MODULUSADD" => Imagick::COMPOSITE_MODULUSADD, // "COMPOSITE_MODULUSSUBTRACT" => Imagick::COMPOSITE_MODULUSSUBTRACT, // "COMPOSITE_MINUSDST" => Imagick::COMPOSITE_MINUSDST, // "COMPOSITE_DIVIDEDST" => Imagick::COMPOSITE_DIVIDEDST, // "COMPOSITE_DIVIDESRC" => Imagick::COMPOSITE_DIVIDESRC, // "COMPOSITE_MINUSSRC" => Imagick::COMPOSITE_MINUSSRC, // "COMPOSITE_DARKENINTENSITY" => Imagick::COMPOSITE_DARKENINTENSITY, // "COMPOSITE_LIGHTENINTENSITY" => Imagick::COMPOSITE_LIGHTENINTENSITY, // "COMPOSITE_HARDMIX" => Imagick::COMPOSITE_HARDMIX, // "COMPOSITE_STEREO" => Imagick::COMPOSITE_STEREO, // "COMPOSITE_FREEZE" => Imagick::COMPOSITE_FREEZE, // "COMPOSITE_INTERPOLATE" => Imagick::COMPOSITE_INTERPOLATE, // "COMPOSITE_NEGATE" => Imagick::COMPOSITE_NEGATE, // "COMPOSITE_REFLECT" => Imagick::COMPOSITE_REFLECT, // "COMPOSITE_SOFTBURN" => Imagick::COMPOSITE_SOFTBURN, // "COMPOSITE_SOFTDODGE" => Imagick::COMPOSITE_SOFTDODGE, // "COMPOSITE_STAMP" => Imagick::COMPOSITE_STAMP, // "COMPOSITE_RMSE" => Imagick::COMPOSITE_RMSE, ]; foreach ($blendOptions as $name => $blendOption) { // echo "name: $name \n"; $imagick = borderImage($color, $width, $height, $blendOption); $filename = "039_border_" . $name . ".png"; // $imagick->writeImage($filename); } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/040_Imagick_charcoalImage_basic.phpt0000644000000000000000000000101714145213427021552 0ustar rootroot--TEST-- Test Imagick, charcoalImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->charcoalImage($radius, $sigma); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } charcoalImage($radius, $sigma) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/041_Imagick_chopImage_basic.phpt0000644000000000000000000000112414145213427020727 0ustar rootroot--TEST-- Test Imagick, chopImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->chopImage($width, $height, $startX, $startY); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } chopImage($startX, $startY, $width, $height) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/042_Imagick_clutImage_basic.phpt0000644000000000000000000000117214145213427020751 0ustar rootroot--TEST-- Test Imagick, clutImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); //$imagick->quantizeImage(16, \Imagick::COLORSPACE_YIQ, 8, true, false); $clutImagick = new \Imagick(); $clutImagick->newPseudoImage(640, 480, "magick:NETSCAPE"); $imagick->clutImage($clutImagick); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } clutImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/043_Imagick_colorizeImage_basic.phpt0000644000000000000000000000205214145213427021627 0ustar rootroot--TEST-- Test Imagick, colorizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $opacity = $opacity / 255.0; $opacityColor = new \ImagickPixel("rgba(0, 0, 0, $opacity)"); $imagick->colorizeImage($color, $opacityColor); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } colorizeImage($color, $opacity) ; $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $opacity = $opacity / 255.0; $opacityColor = new \ImagickPixel("rgba(0, 0, 0, $opacity)"); // TODO - legacy mode of setting fraction as transparency needs // to be removed. $imagick->colorizeImage($color, 0.5, true); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image for legacy mode.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/044_Imagick_colorMatrixImage_basic.phpt0000644000000000000000000000300714145213427022306 0ustar rootroot--TEST-- Test Imagick, colorMatrixImage --SKIPIF-- --FILE-- 1.5, 1 => 0, 2 => 0, 3 => 0, 4 => -0.157, 5 => 0, 6 => 1, 7 => 0.5, 8 => 0, 9 => -0.157, 10 => 0, 11 => 0, 12 => 0.5, 13 => 0, 14 => 0.5, 15 => 0, 16 => 0, 17 => 0, 18 => 1, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, 24 => 1, ); function colorMatrixImage($colorMatrix) { $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); //$imagick->setImageOpacity(1); //A color matrix should look like: // $colorMatrix = [ // 1.5, 0.0, 0.0, 0.0, 0.0, -0.157, // 0.0, 1.0, 0.5, 0.0, 0.0, -0.157, // 0.0, 0.0, 1.5, 0.0, 0.0, -0.157, // 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, // 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, // 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 // ]; $background = new \Imagick(); $background->newPseudoImage($imagick->getImageWidth(), $imagick->getImageHeight(), "pattern:checkerboard"); $background->setImageFormat('png'); $imagick->setImageFormat('png'); $imagick->colorMatrixImage($colorMatrix); $background->compositeImage($imagick, \Imagick::COMPOSITE_ATOP, 0, 0); $bytes = $background->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } colorMatrixImage($colorMatrix) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/045_Imagick_compositeImage_basic.phpt0000644000000000000000000000205214145213427022005 0ustar rootroot--TEST-- Test Imagick, compositeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $img2 = new \Imagick(); $img2->newPseudoImage(640, 480, "magick:logo"); $img2->negateImage(false); $img2->blurimage(10, 5); $img1->resizeimage( $img2->getImageWidth(), $img2->getImageHeight(), \Imagick::FILTER_LANCZOS, 1 ); $opacity = new \Imagick(); $opacity->newPseudoImage( $img1->getImageHeight(), $img1->getImageWidth(), "gradient:gray(10%)-gray(90%)" ); $opacity->rotateimage('black', 90); $img2->compositeImage($opacity, \Imagick::COMPOSITE_COPYOPACITY, 0, 0); $img1->compositeImage($img2, \Imagick::COMPOSITE_ATOP, 0, 0); $bytes = $img1->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } compositeImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/046_Imagick_contrastImage_basic.phpt0000644000000000000000000000105414145213427021642 0ustar rootroot--TEST-- Test Imagick, contrastImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); if ($contrastType != 2) { $imagick->contrastImage($contrastType); } $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } contrastImage($contrastType) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/047_Imagick_convolveImage_6.phpt0000644000000000000000000000155314145213427020731 0ustar rootroot--TEST-- Test Imagick, convolveImage --SKIPIF-- --FILE-- -1, 1 => -1, 2 => -1, 3 => -1, 4 => 8, 5 => -1, 6 => -1, 7 => -1, 8 => -1, ); function convolveImage($bias, $kernelMatrix) { $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); //$edgeFindingKernel = [-1, -1, -1, -1, 8, -1, -1, -1, -1,]; $imagick->setImageBias($bias * \Imagick::getQuantum()); $imagick->convolveImage($kernelMatrix); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } convolveImage($bias, $kernelMatrix) ; echo "Ok"; ?> --EXPECTF-- Deprecated: %s Imagick::setImageBias() is deprecated in %s Ok imagick-3.6.0/tests/047_Imagick_convolveImage_7.phpt0000644000000000000000000000123714145213427020731 0ustar rootroot--TEST-- Test Imagick, convolveImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $kernel = ImagickKernel::fromMatrix($kernelMatrix); $imagick->convolveImage($kernel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } convolveImage($bias, $kernelMatrix) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/048_Imagick_cropImage_basic.phpt0000644000000000000000000000112314145213427020747 0ustar rootroot--TEST-- Test Imagick, cropImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->cropImage($width, $height, $startX, $startY); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } cropImage($startX, $startY, $width, $height) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/049_Imagick_deskewImage_basic.phpt0000644000000000000000000000315214145213427021273 0ustar rootroot--TEST-- Test Imagick, deskewImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $deskewImagick = clone $imagick; //This is the only thing required for deskewing. $deskewImagick->deskewImage($threshold); //The rest of this example is to make the result obvious - because //otherwise the result is not obvious. $trim = 9; $deskewImagick->cropImage($deskewImagick->getImageWidth() - $trim, $deskewImagick->getImageHeight(), $trim, 0); $imagick->cropImage($imagick->getImageWidth() - $trim, $imagick->getImageHeight(), $trim, 0); $deskewImagick->resizeimage($deskewImagick->getImageWidth() / 2, $deskewImagick->getImageHeight() / 2, \Imagick::FILTER_LANCZOS, 1); $imagick->resizeimage( (int)($imagick->getImageWidth() / 2), (int)($imagick->getImageHeight() / 2), \Imagick::FILTER_LANCZOS, 1 ); $newCanvas = new \Imagick(); $newCanvas->newimage($imagick->getImageWidth() + $deskewImagick->getImageWidth() + 20, $imagick->getImageHeight(), 'red', 'jpg'); $newCanvas->compositeimage($imagick, \Imagick::COMPOSITE_COPY, 5, 0); $newCanvas->compositeimage($deskewImagick, \Imagick::COMPOSITE_COPY, $imagick->getImageWidth() + 10, 0); $bytes = $newCanvas->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } deskewImage($threshold) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/050_Imagick_distortImage_Affine.phpt0000644000000000000000000000140514145213427021577 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 0, 0, 25, 25, 100, 0, 100, 50 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND ); $imagick->distortImage( \Imagick::DISTORTION_AFFINE, $points, TRUE ); header( "Content-Type: image/jpeg" ); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/051_Imagick_distortImage_Projection.phpt0000644000000000000000000000136614145213427022532 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 0.9,0.3, -0.2,0.7, 20,15 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND ); $imagick->distortImage( \Imagick::DISTORTION_AFFINEPROJECTION, $points, TRUE ); header( "Content-Type: image/jpeg" ); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/052_Imagick_distortImage_Arc.phpt0000644000000000000000000000174114145213427021121 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $degrees = array( 180 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND ); $imagick->distortImage( \Imagick::DISTORTION_ARC, $degrees, TRUE ); header( "Content-Type: image/jpeg" ); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/053_Imagick_distortImage_RotatedArc.phpt0000644000000000000000000000126614145213427022447 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $degrees = array( 180, 45, 100, 20 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND ); $imagick->distortImage( \Imagick::DISTORTION_ARC, $degrees, TRUE ); header( "Content-Type: image/jpeg" ); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/054_Imagick_distortImage_Bilinear.phpt0000644000000000000000000000152014145213427022136 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 0,0, 25,25, # top left 176,0, 126,0, # top right 0,135, 0,105, # bottom right 176,135, 176,135 # bottum left ); $imagick->setImageBackgroundColor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND ); $imagick->distortImage( \Imagick::DISTORTION_BILINEAR, $points, TRUE ); header( "Content-Type: image/jpeg" ); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/055_Imagick_distortImage_ScaleRotateTransform.phpt0000644000000000000000000000130514145213427024515 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 1.5, # scale 150% 150 # rotate ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND ); $imagick->distortImage( \Imagick::DISTORTION_SCALEROTATETRANSLATE, $points, TRUE ); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/056_Imagick_distortImage_Perspective.phpt0000644000000000000000000000264714145213427022717 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- rsiControl->getImagePath())); $imagick = new \Imagick(); /* Create new checkerboard pattern */ $imagick->newPseudoImage(100, 100, "pattern:checkerboard"); /* Set the image format to png */ $imagick->setImageFormat('png'); /* Fill new visible areas with transparent */ $imagick->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT); /* Activate matte */ $imagick->setImageMatte(true); /* Control points for the distortion */ $controlPoints = array( 10, 10, 10, 5, 10, $imagick->getImageHeight() - 20, 10, $imagick->getImageHeight() - 5, $imagick->getImageWidth() - 10, 10, $imagick->getImageWidth() - 10, 20, $imagick->getImageWidth() - 10, $imagick->getImageHeight() - 10, $imagick->getImageWidth() - 10, $imagick->getImageHeight() - 30); /* Perform the distortion */ $imagick->distortImage(\Imagick::DISTORTION_PERSPECTIVE, $controlPoints, true); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/057_Imagick_distortImage_PerspectiveProjection.phpt0000644000000000000000000000173614145213427024753 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 1.945622, 0.071451, -12.187838, 0.799032, 1.276214, -24.470275, 0.006258, 0.000715 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND); $imagick->distortImage(\Imagick::DISTORTION_PERSPECTIVEPROJECTION, $points, TRUE); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/058_Imagick_distortImage_Polynomial.phpt0000644000000000000000000000247614145213427022553 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 1.5, //Order 1.5 = special 0, 0, 26, 0, 128,0, 114,23, 128,128, 128,100, 0,128, 0,123 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND); $imagick->distortImage(\Imagick::DISTORTION_POLYNOMIAL, $points, TRUE); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/059_Imagick_distortImage_Polar.phpt0000644000000000000000000000145514145213427021502 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 0 ); //Only do partial arc // $points = array( // 60,20, 0,0, -60,60 // ); // HorizontalTile $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_HORIZONTALTILE); $imagick->distortImage(\Imagick::DISTORTION_POLAR, $points, TRUE); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/060_Imagick_distortImage_Polar.phpt0000644000000000000000000000124514145213427021467 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( 0 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_BACKGROUND); $imagick->distortImage(\Imagick::DISTORTION_DEPOLAR, $points, TRUE); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/061_Imagick_distortImage_Barrel.phpt0000644000000000000000000000244514145213427021625 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( //0.2, 0.0, 0.0, 1.0 0.4, 0.6, 0.0, 1.0 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_EDGE); $imagick->distortImage(\Imagick::DISTORTION_BARREL, $points, TRUE); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/062_Imagick_distortImage_BarrelInverse.phpt0000644000000000000000000000155414145213427023162 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( //0.2, 0.0, 0.0, 1.0 0.2, 0.1, 0.0, 1.0 ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_EDGE); $imagick->distortImage(\Imagick::DISTORTION_BARRELINVERSE, $points, TRUE); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/063_Imagick_distortImage_Shepards.phpt0000644000000000000000000000370714145213427022173 0ustar rootroot--TEST-- Test Imagick, distortImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $points = array( //Setup some control points that don't move 5 * $imagick->getImageWidth() / 100, 5 * $imagick->getImageHeight() / 100, 5 * $imagick->getImageWidth() / 100, 5 * $imagick->getImageHeight() / 100, 5 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100, 5 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100, 95 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100, 95 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100, 5 * $imagick->getImageWidth() / 100, 5 * $imagick->getImageHeight() / 100, 95 * $imagick->getImageWidth() / 100, 95 * $imagick->getImageHeight() / 100, // //Move the centre of the image down and to the right // 50 * $imagick->getImageWidth() / 100, 50 * $imagick->getImageHeight() / 100, // 60 * $imagick->getImageWidth() / 100, 60 * $imagick->getImageHeight() / 100, // // //Move a point near the top-right of the image down and to the left and down // 90 * $imagick->getImageWidth(), 10 * $imagick->getImageHeight(), // 80 * $imagick->getImageWidth(), 15 * $imagick->getImageHeight(), ); $imagick->setimagebackgroundcolor("#fad888"); $imagick->setImageVirtualPixelMethod( \Imagick::VIRTUALPIXELMETHOD_EDGE); $imagick->distortImage(\Imagick::DISTORTION_SHEPARDS, $points, TRUE); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/065_Imagick_despeckleImage_basic.phpt0000644000000000000000000000071514145213427021750 0ustar rootroot--TEST-- Test Imagick, despeckleImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->despeckleImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } despeckleImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/066_Imagick_embossImage_basic.phpt0000644000000000000000000000100714145213427021275 0ustar rootroot--TEST-- Test Imagick, embossImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->embossImage($radius, $sigma); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } embossImage($radius, $sigma) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/067_Imagick_edgeImage_basic.phpt0000644000000000000000000000073314145213427020717 0ustar rootroot--TEST-- Test Imagick, edgeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->edgeImage($radius); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } edgeImage($radius) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/068_Imagick_enhanceImage_basic.phpt0000644000000000000000000000070514145213427021414 0ustar rootroot--TEST-- Test Imagick, enhanceImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->enhanceImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } enhanceImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/069_Imagick_equalizeImage_case1.phpt0000644000000000000000000000071114145213427021543 0ustar rootroot--TEST-- Test Imagick, equalizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->equalizeImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } equalizeImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/070_Imagick_equalizeImage_case2.phpt0000644000000000000000000000127514145213430021534 0ustar rootroot--TEST-- Test Imagick, equalizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->equalizeImage(); $imagick->extentImage( $startX, $startY, $width, $height ); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } $startX = 50; $startY = 50; $width = 150; $height = 150; extentImage($startX, $startY, $width, $height) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/071_Imagick_flipImage_basic.phpt0000644000000000000000000000067114145213430020733 0ustar rootroot--TEST-- Test Imagick, flipImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->flipImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } flipImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/072_Imagick_evaluateImage_basic.phpt0000644000000000000000000000602614145213430021610 0ustar rootroot--TEST-- Test Imagick, evaluateImage --SKIPIF-- --FILE-- newPseudoImage( $size, $size, "gradient:$gradientStartColor-$gradientEndColor" ); $quantumScaledTypes = array( \Imagick::EVALUATE_ADD, \Imagick::EVALUATE_AND, \Imagick::EVALUATE_MAX, \Imagick::EVALUATE_MIN, \Imagick::EVALUATE_OR, \Imagick::EVALUATE_SET, \Imagick::EVALUATE_SUBTRACT, \Imagick::EVALUATE_XOR, \Imagick::EVALUATE_THRESHOLD, \Imagick::EVALUATE_THRESHOLDBLACK, \Imagick::EVALUATE_THRESHOLDWHITE, \Imagick::EVALUATE_ADDMODULUS, ); $unscaledTypes = array( \Imagick::EVALUATE_DIVIDE, \Imagick::EVALUATE_MULTIPLY, \Imagick::EVALUATE_RIGHTSHIFT, \Imagick::EVALUATE_LEFTSHIFT, \Imagick::EVALUATE_POW, \Imagick::EVALUATE_LOG, \Imagick::EVALUATE_GAUSSIANNOISE, \Imagick::EVALUATE_IMPULSENOISE, \Imagick::EVALUATE_LAPLACIANNOISE, \Imagick::EVALUATE_MULTIPLICATIVENOISE, \Imagick::EVALUATE_POISSONNOISE, \Imagick::EVALUATE_UNIFORMNOISE, \Imagick::EVALUATE_COSINE, \Imagick::EVALUATE_SINE, ); if (in_array($evaluateType, $unscaledTypes)) { $imagick->evaluateimage($evaluateType, $firstTerm); } else if (in_array($evaluateType, $quantumScaledTypes)) { $imagick->evaluateimage($evaluateType, $firstTerm * \Imagick::getQuantum()); } else { throw new \Exception("Evaluation type $evaluateType is not listed as either scaled or unscaled"); } $imagick->setimageformat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } foreach ($evaluateTypes as $evaluateType) { evaluateImage($evaluateType, $firstTerm, $gradientStartColor, $gradientEndColor) ; } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/073_Imagick_forwardFourierTransformImage_basic.phpt0000644000000000000000000000343214145213430024675 0ustar rootroot--TEST-- Test Imagick, forwardFourierTransformImage --SKIPIF-- --FILE-- setStrokeOpacity(0); $draw->setStrokeColor('rgb(255, 255, 255)'); $draw->setFillColor('rgb(255, 255, 255)'); //Draw a circle on the y-axis, with it's centre //at x, y that touches the origin $draw->circle(250, 250, 220, 250); $imagick = new \Imagick(); $imagick->newImage(512, 512, "black"); $imagick->drawImage($draw); $imagick->gaussianBlurImage(20, 20); $imagick->autoLevelImage(); return $imagick; } function forwardFourierTransformImage() { $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $imagick->resizeimage(512, 512, \Imagick::FILTER_LANCZOS, 1); $mask = createMask(); $imagick->forwardFourierTransformImage(true); $imagick->setIteratorIndex(0); $magnitude = $imagick->getimage(); $imagick->setIteratorIndex(1); $imagickPhase = $imagick->getimage(); if (true) { $imagickPhase->compositeImage($mask, \Imagick::COMPOSITE_MULTIPLY, 0, 0); } if (false) { $output = clone $imagickPhase; $output->setimageformat('png'); $bytes = $output->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } $magnitude->inverseFourierTransformImage($imagickPhase, true); $magnitude->setimageformat('png'); $bytes = $magnitude->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } forwardFourierTransformImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/074_Imagick_flopImage_basic.phpt0000644000000000000000000000067214145213430020745 0ustar rootroot--TEST-- Test Imagick, flopImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->flopImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } flopImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/075_Imagick_floodFillPaintImage_basic.phpt0000644000000000000000000000157314145213430022715 0ustar rootroot--TEST-- Test Imagick, floodFillPaintImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->floodFillPaintImage( $fillColor, $fuzz * \Imagick::getQuantum(), $targetColor, $x, $y, $inverse, $channel ); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } floodFillPaintImage($fillColor, $fuzz, $targetColor, $x, $y, $inverse, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/076_Imagick_fxImage_basic.phpt0000644000000000000000000000110314145213430020412 0ustar rootroot--TEST-- Test Imagick, fxImage --SKIPIF-- --FILE-- newPseudoImage(200, 200, "xc:white"); $fx = 'xx=i-w/2; yy=j-h/2; rr=hypot(xx,yy); (.5-rr/140)*1.2+.5'; $fxImage = $imagick->fxImage($fx); $fxImage->setimageformat('png'); $bytes = $fxImage->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } fxImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/077_Imagick_frameImage_basic.phpt0000644000000000000000000000177714145213430021111 0ustar rootroot--TEST-- Test Imagick, frameImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setImageFormat('png'); $width = $width + $innerBevel + $outerBevel; $height = $height + $innerBevel + $outerBevel; $imagick->frameimage( $color, $width, $height, $innerBevel, $outerBevel ); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image."; } return $imagick; } $imagick = frameImage($color, $width, $height, $innerBevel, $outerBevel) ; // $imagick->writeImage("frame_image.png"); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/077_Imagick_frameImage_im7.phpt0000644000000000000000000000316314145213430020513 0ustar rootroot--TEST-- Test Imagick, frameImageWithComposite --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $width = $width + $innerBevel + $outerBevel; $height = $height + $innerBevel + $outerBevel; if ($blendOption === null) { $imagick->frameimage( $color, $width, $height, $innerBevel, $outerBevel ); } else { $imagick->frameImageWithComposite( $color, $width, $height, $innerBevel, $outerBevel, $blendOption ); } $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image."; } return $imagick; } $blendOptions = [ "null" => null, "COMPOSITE_NO" => Imagick::COMPOSITE_NO, "COMPOSITE_BLEND" => Imagick::COMPOSITE_BLEND, "COMPOSITE_COPYRED" => Imagick::COMPOSITE_COPYRED, "COMPOSITE_ATOP" => Imagick::COMPOSITE_ATOP, "COMPOSITE_OVER" => Imagick::COMPOSITE_OVER, ]; foreach ($blendOptions as $name => $blendOption) { $imagick = frameImage($color, $width, $height, $innerBevel, $outerBevel, $blendOption) ; $filename = "077_frame_" . $name . ".png"; // $imagick->writeImage($filename); } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/078_Imagick_gammaImage_basic.phpt0000644000000000000000000000104014145213430021061 0ustar rootroot--TEST-- Test Imagick, gammaImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->gammaImage($gamma, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } gammaImage($gamma, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/079_Imagick_getImageGeometry_basic.phpt0000644000000000000000000000066314145213430022305 0ustar rootroot--TEST-- Test Imagick, getImageGeometry --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } getImageGeometry() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/080_Imagick_gaussianBlurImage_basic.phpt0000644000000000000000000000114214145213430022432 0ustar rootroot--TEST-- Test Imagick, gaussianBlurImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->gaussianBlurImage($radius, $sigma, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } gaussianBlurImage($radius, $sigma, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/081_Imagick_getImageHistogram_basic.phpt0000644000000000000000000000555714145213430022447 0ustar rootroot--TEST-- Test Imagick, getImageHistogram --SKIPIF-- --FILE-- getColorValueQuantum($colorChannel); $color = $histogramElement->getColorValue($colorChannel); $color = intval($color * 255); $count = $histogramElement->getColorCount(); if (array_key_exists($color, $colorStatistics)) { $colorStatistics[$color] += $count; } else { $colorStatistics[$color] = $count; } } ksort($colorStatistics); return $colorStatistics; } function getImageHistogram() { $backgroundColor = 'black'; $draw = new \ImagickDraw(); $draw->setStrokeWidth(0); //Lines have a wi $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $histogramWidth = 256; $histogramHeight = 100; // the height for each RGB segment $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); //Resize the image to be small, otherwise PHP tends to run out of memory //This might lead to bad results for images that are pathologically 'pixelly' $imagick->adaptiveResizeImage(200, 200, true); $histogramElements = $imagick->getImageHistogram(); $histogram = new \Imagick(); $histogram->newpseudoimage($histogramWidth, $histogramHeight * 3, 'xc:black'); $histogram->setImageFormat('png'); $getMax = function ($carry, $item) { if ($item > $carry) { return $item; } return $carry; }; $colorValues = array( 'red' => getColorStatistics($histogramElements, \Imagick::COLOR_RED), 'lime' => getColorStatistics($histogramElements, \Imagick::COLOR_GREEN), 'blue' => getColorStatistics($histogramElements, \Imagick::COLOR_BLUE), ); $max = array_reduce($colorValues['red'] , $getMax, 0); $max = array_reduce($colorValues['lime'] , $getMax, $max); $max = array_reduce($colorValues['blue'] , $getMax, $max); $scale = $histogramHeight / $max; $count = 0; foreach ($colorValues as $color => $values) { $draw->setstrokecolor($color); $offset = ($count + 1) * $histogramHeight; foreach ($values as $index => $value) { $draw->line($index, $offset, $index, $offset - ($value * $scale)); } $count++; } $histogram->drawImage($draw); $bytes = $histogram->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } getImageHistogram(); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/083_Imagick_getPixelIterator_basic.phpt0000644000000000000000000000176414145213430022340 0ustar rootroot--TEST-- Test Imagick, getPixelIterator --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = $imagick->getPixelIterator(); /** @noinspection PhpUnusedLocalVariableInspection */ foreach ($imageIterator as $row => $pixels) { /* Loop trough pixel rows */ foreach ($pixels as $column => $pixel) { /* Loop through the pixels in the row (columns) */ /** @var $pixel \ImagickPixel */ if ($column % 2) { $pixel->setColor("rgba(0, 0, 0, 0)"); /* Paint every second pixel black*/ } } $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */ } $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } getPixelIterator() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/084_Imagick_getPixelRegionIterator_basic.phpt0000644000000000000000000000203614145213430023476 0ustar rootroot--TEST-- Test Imagick, getPixelRegionIterator --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = $imagick->getPixelRegionIterator(100, 100, 200, 200); /** @noinspection PhpUnusedLocalVariableInspection */ foreach ($imageIterator as $row => $pixels) { /* Loop trough pixel rows */ foreach ($pixels as $column => $pixel) { /* Loop through the pixels in the row (columns) */ /** @var $pixel \ImagickPixel */ if ($column % 2) { $pixel->setColor("rgba(0, 0, 0, 0)"); /* Paint every second pixel black*/ } } $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */ } $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } getPixelRegionIterator() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/085_Imagick_haldClutImage_basic.phpt0000644000000000000000000000115214145213430021541 0ustar rootroot--TEST-- Test Imagick, haldClutImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagickPalette = new \Imagick(); $imagickPalette->newPseudoImage(640, 480, "magick:NETSCAPE"); $imagickPalette->sepiatoneImage(55); $imagick->haldClutImage($imagickPalette); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } haldClutImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/086_Imagick_forwardFourierTransformImage_basic.phpt0000644000000000000000000000336514145213430024706 0ustar rootroot--TEST-- Test Imagick, forwardFourierTransformImage --SKIPIF-- --FILE-- setStrokeOpacity(0); $draw->setStrokeColor('rgb(255, 255, 255)'); $draw->setFillColor('rgb(255, 255, 255)'); //Draw a circle on the y-axis, with it's centre //at x, y that touches the origin $draw->circle(250, 250, 220, 250); $imagick = new \Imagick(); $imagick->newImage(512, 512, "black"); $imagick->drawImage($draw); $imagick->gaussianBlurImage(20, 20); $imagick->autoLevelImage(); return $imagick; } function forwardFourierTransformImage() { $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $imagick->resizeimage(512, 512, \Imagick::FILTER_LANCZOS, 1); $mask = createMask(); $imagick->forwardFourierTransformImage(true); $imagick->setIteratorIndex(0); $magnitude = $imagick->getimage(); $imagick->setIteratorIndex(1); $imagickPhase = $imagick->getimage(); if (true) { $imagickPhase->compositeImage($mask, \Imagick::COMPOSITE_MULTIPLY, 0, 0); } if (false) { $output = clone $imagickPhase; $output->setimageformat('png'); $bytes = $output->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } $magnitude->inverseFourierTransformImage($imagickPhase, true); $magnitude->setimageformat('png'); $bytes = $magnitude->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } forwardFourierTransformImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/087_Imagick_levelImage_basic.phpt0000644000000000000000000000122714145213430021115 0ustar rootroot--TEST-- Test Imagick, levelImage --SKIPIF-- --FILE-- newPseudoimage(500, 500, 'gradient:black-white'); $imagick->setFormat('png'); $quantum = $imagick->getQuantum(); $imagick->levelImage($blackPoint / 100 , $gamma, $quantum * $whitePoint / 100); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } levelImage($blackPoint, $gamma, $whitePoint) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/088_Imagick_implodeImage_basic.phpt0000644000000000000000000000071414145213430021440 0ustar rootroot--TEST-- Test Imagick, implodeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->implodeImage(0.0001); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } implodeImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/089_Imagick_medianFilterImage_basic.phpt0000644000000000000000000000106614145213430022414 0ustar rootroot--TEST-- Test Imagick, medianFilterImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); @$imagick->medianFilterImage($radius); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } medianFilterImage($radius) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/090_Imagick_magnifyImage_basic.phpt0000644000000000000000000000070514145213430021432 0ustar rootroot--TEST-- Test Imagick, magnifyImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->magnifyImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } magnifyImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/091_Imagick_linearStretchImage_basic.phpt0000644000000000000000000000130614145213430022606 0ustar rootroot--TEST-- Test Imagick, linearStretchImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $pixels = $imagick->getImageWidth() * $imagick->getImageHeight(); $imagick->linearStretchImage($blackThreshold * $pixels, $whiteThreshold * $pixels); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } linearStretchImage($blackThreshold, $whiteThreshold) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/092_Imagick_mergeImageLayers_basic.phpt0000644000000000000000000000153114145213430022257 0ustar rootroot--TEST-- Test Imagick, mergeImageLayers --SKIPIF-- --FILE-- newPseudoImage(640, 480, $imageName); $imagick->addImage($nextImage); } $imagick->resetIterator(); $imagick->setImageFormat('png'); $result = $imagick->mergeImageLayers($layerMethodType); $bytes = $result->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } mergeImageLayers($layerMethodType); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/093_Imagick_modulateImage_basic.phpt0000644000000000000000000000112514145213430021612 0ustar rootroot--TEST-- Test Imagick, modulateImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->modulateImage($brightness, $saturation, $hue); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } modulateImage($hue, $brightness, $saturation) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/094_Imagick_motionBlurImage_basic.phpt0000644000000000000000000000120114145213430022126 0ustar rootroot--TEST-- Test Imagick, motionBlurImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->motionBlurImage($radius, $sigma, $angle, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } motionBlurImage($radius, $sigma, $angle, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/095_Imagick_normalizeImage_basic.phpt0000644000000000000000000000132014145213430021777 0ustar rootroot--TEST-- Test Imagick, normalizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $original = clone $imagick; $original->cropimage($original->getImageWidth() / 2, $original->getImageHeight(), 0, 0); $imagick->normalizeImage($channel); $imagick->compositeimage($original, \Imagick::COMPOSITE_ATOP, 0, 0); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } normalizeImage($channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/096_Imagick_negateImage_basic.phpt0000644000000000000000000000105614145213430021251 0ustar rootroot--TEST-- Test Imagick, negateImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->negateImage($grayOnly, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } negateImage($grayOnly, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/097_Imagick_newPseudoImage_basic.phpt0000644000000000000000000000074214145213430021761 0ustar rootroot--TEST-- Test Imagick, newPseudoImage --SKIPIF-- --FILE-- newPseudoImage(300, 300, $canvasType); $imagick->setImageFormat("png"); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } newPseudoImage($canvasType) ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/098_Imagick_orderedPosterizeImage_basic.phpt0000644000000000000000000000137614145213430023346 0ustar rootroot--TEST-- Test Imagick, orderedPosterizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->orderedPosterizeImage($orderedPosterizeType); $imagick->setImageFormat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } orderedPosterizeImage($orderedPosterizeType) ; echo "Ok"; ?> --EXPECTF-- Deprecated: %s Imagick::orderedPosterizeImage() is deprecated in %S Ok imagick-3.6.0/tests/099_Imagick_oilPaintImage_basic.phpt0000644000000000000000000000075314145213430021573 0ustar rootroot--TEST-- Test Imagick, oilPaintImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->oilPaintImage($radius); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } oilPaintImage($radius) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/100_Imagick_posterizeImage_basic.phpt0000644000000000000000000000111514145213430022010 0ustar rootroot--TEST-- Test Imagick, posterizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->posterizeImage($numberLevels, $posterizeType); $imagick->setImageFormat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } posterizeImage($posterizeType, $numberLevels) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/101_Imagick_quantizeImage_basic.phpt0000644000000000000000000000124114145213430021625 0ustar rootroot--TEST-- Test Imagick, quantizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->quantizeImage($numberColors, $colorSpace, $treeDepth, $dither, false); $imagick->setImageFormat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } quantizeImage($numberColors, $colorSpace, $treeDepth, $dither) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/102_Imagick_radialBlurImage_basic.phpt0000644000000000000000000000141314145213430022050 0ustar rootroot--TEST-- Test Imagick, radialBlurImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->radialBlurImage(3); $imagick->radialBlurImage(5); $imagick->radialBlurImage(7); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } radialBlurImage() ; echo "Ok"; ?> --EXPECTF-- Deprecated: %s Imagick::radialBlurImage() is deprecated in %s Deprecated: %s Imagick::radialBlurImage() is deprecated in %s Deprecated: %s Imagick::radialBlurImage() is deprecated in %s Ok imagick-3.6.0/tests/103_Imagick_readImageBlob_basic.phpt0000644000000000000000000000210214145213430021476 0ustar rootroot--TEST-- Test Imagick, readImageBlob --SKIPIF-- --FILE-- readImageBlob($imageBlob); $bytes = $imageBlob; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } readImageBlob() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/104_Imagick_randomThresholdImage_basic.phpt0000644000000000000000000000137314145213430023133 0ustar rootroot--TEST-- Test Imagick, randomThresholdImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->randomThresholdimage( $lowThreshold * \Imagick::getQuantum(), $highThreshold * \Imagick::getQuantum(), $channel ); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } randomThresholdimage($lowThreshold, $highThreshold, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/105_Imagick_raiseImage_basic.phpt0000644000000000000000000000115614145213430021101 0ustar rootroot--TEST-- Test Imagick, raiseImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); //x and y do nothing? $imagick->raiseImage($width, $height, $x, $y, $raise); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } raiseImage($width, $height, $x, $y, $raise) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/106_Imagick_reduceNoiseImage_basic.phpt0000644000000000000000000000110514145213430022236 0ustar rootroot--TEST-- Test Imagick, reduceNoiseImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); @$imagick->reduceNoiseImage($reduceNoise); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } reduceNoiseImage($reduceNoise) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/107_Imagick_recolorImage_basic.phpt0000644000000000000000000000113314145213430021440 0ustar rootroot--TEST-- Test Imagick, recolorImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $remapColor = array( 1, 0, 0, 0, 0, 1, 0, 1, 0, ); @$imagick->recolorImage($remapColor); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } recolorImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/108_Imagick_resampleImage_basic.phpt0000644000000000000000000000075714145213430021617 0ustar rootroot--TEST-- Test Imagick, resampleImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->resampleImage(200, 200, \Imagick::FILTER_LANCZOS, 1); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } resampleImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/109_Imagick_rollImage_basic.phpt0000644000000000000000000000077714145213430020762 0ustar rootroot--TEST-- Test Imagick, rollImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->rollimage($rollX, $rollY); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } rollImage($rollX, $rollY) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/110_Imagick_resizeImage_basic.phpt0000644000000000000000000000246014145213430021272 0ustar rootroot--TEST-- Test Imagick, resizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->resizeImage($width, $height, $filterType, $blur, $bestFit); $cropWidth = $imagick->getImageWidth(); $cropHeight = $imagick->getImageHeight(); if ($cropZoom) { $newWidth = $cropWidth / 2; $newHeight = $cropHeight / 2; $imagick->cropimage( $newWidth, $newHeight, (int)(($cropWidth - $newWidth) / 2), (int)(($cropHeight - $newHeight) / 2) ); $imagick->scaleimage( $imagick->getImageWidth() * 4, $imagick->getImageHeight() * 4 ); } $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } foreach ($bestFitSettings as $bestFit) { resizeImage($width, $height, $filterType, $blur, $bestFit, $cropZoom); } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/111_Imagick_rotateImage_basic.phpt0000644000000000000000000000102714145213430021266 0ustar rootroot--TEST-- Test Imagick, rotateImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->rotateimage($color, $angle); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } rotateImage($angle, $color) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/112_Imagick_roundCorners_basic.phpt0000644000000000000000000000170214145213430021511 0ustar rootroot--TEST-- Test Imagick, roundCorners --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setBackgroundColor('red'); $imagick->setbackgroundcolor('pink'); $x_rounding = 40; $y_rounding = 40; $stroke_width = 5; $displace = 0; $size_correction = 0; $imagick->roundCornersImage( $x_rounding, $y_rounding, $stroke_width, $displace, $size_correction ); $bytes = $imagick->getImageBlob(); $imagick->setImageFormat('png'); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} // $imagick->writeImage(__DIR__ . "/112_round_corner.png"); } roundCorners() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/113_Imagick_rotationalBlurImage_basic.phpt0000644000000000000000000000111214145213430022766 0ustar rootroot--TEST-- Test Imagick, rotationalBlurImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->rotationalBlurImage(3); $imagick->rotationalBlurImage(5); $imagick->rotationalBlurImage(7); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } rotationalBlurImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/114_Imagick_scaleImage_basic.phpt0000644000000000000000000000171214145213430021063 0ustar rootroot--TEST-- Test Imagick, scaleImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->scaleImage($width, $height, $bestFit); $imageWidth = $imagick->getImageWidth(); $imageHeight = $imagick->getImageHeight(); $error = false; if ($imageWidth != $expectedWidth) { echo "Width $imageWidth does not match expected.\n"; $error = true; } if ($imageHeight != $expectedHeight) { echo "Height $imageHeight does not match expected.\n"; $error = true; } if ($error) { echo "test was ".var_export($test, true)."\n"; }; } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/115_Imagick_selectiveBlurImage_basic.phpt0000644000000000000000000000123414145213430022604 0ustar rootroot--TEST-- Test Imagick, selectiveBlurImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->selectiveBlurImage($radius, $sigma, $threshold, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } selectiveBlurImage($radius, $sigma, $threshold, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/116_Imagick_separateImageChannel_basic.phpt0000644000000000000000000000104214145213430023067 0ustar rootroot--TEST-- Test Imagick, separateImageChannel --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->separateimagechannel($channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } separateImageChannel($channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/117_Imagick_segmentImage_basic.phpt0000644000000000000000000000122314145213430021436 0ustar rootroot--TEST-- Test Imagick, segmentImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->segmentImage($colorSpace, $clusterThreshold, $smoothThreshold); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } segmentImage($colorSpace, $clusterThreshold, $smoothThreshold) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/118_Imagick_setImageArtifact_basic.phpt0000644000000000000000000000140014145213430022243 0ustar rootroot--TEST-- Test Imagick, setImageArtifact --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $src2 = new \Imagick(); $src2->newPseudoImage(480, 640, "magick:WIZARD"); $src2->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT); $src2->setImageArtifact('compose:args', "1,0,-0.5,0.5"); $src1->compositeImage($src2, Imagick::COMPOSITE_MATHEMATICS, 0, 0); $src1->setImageFormat('png'); $bytes = $src1->getImagesBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setImageArtifact() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/119_Imagick_sepiaToneImage_basic.phpt0000644000000000000000000000075414145213430021735 0ustar rootroot--TEST-- Test Imagick, sepiaToneImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->sepiaToneImage($sepia); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } sepiaToneImage($sepia) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/120_Imagick_setCompressionQuality_basic.phpt0000644000000000000000000000160214145213430023412 0ustar rootroot--TEST-- Test Imagick, setCompressionQuality --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick = new \Imagick(); $imagick->setCompressionQuality($quality); $imagick->newPseudoImage( $backgroundImagick->getImageWidth(), $backgroundImagick->getImageHeight(), 'canvas:white' ); $imagick->compositeImage( $backgroundImagick, \Imagick::COMPOSITE_ATOP, 0, 0 ); $imagick->setFormat("jpg"); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setCompressionQuality($quality) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/121_Imagick_setImageBias_basic.phpt0000644000000000000000000000154714145213430021372 0ustar rootroot--TEST-- Test Imagick, setImageBias --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $xKernel = array( -0.70, 0, 0.70, -0.70, 0, 0.70, -0.70, 0, 0.70 ); $imagick->setImageBias($bias * \Imagick::getQuantum()); $imagick->convolveImage($xKernel, \Imagick::CHANNEL_ALL); $imagick->setImageFormat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setImageBias($bias) ; echo "Ok"; ?> --EXPECTF-- Deprecated: %s Imagick::setImageBias() is deprecated in %s Ok imagick-3.6.0/tests/122_Imagick_setImageCompressionQuality_basic.phpt0000644000000000000000000000104614145213430024361 0ustar rootroot--TEST-- Test Imagick, setImageCompressionQuality --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); //$imagick->setImageCompressionQuality($quality); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setImageCompressionQuality($quality) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/123_Imagick_setImageClipMask_basic.phpt0000644000000000000000000000213214145213430022210 0ustar rootroot--TEST-- Test Imagick, setImageClipMask --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $width = $imagick->getImageWidth(); $height = $imagick->getImageHeight(); $clipMask = new \Imagick(); $clipMask->newPseudoImage( $width, $height, "canvas:transparent" ); $draw = new \ImagickDraw(); $draw->setFillColor('white'); $draw->circle( $width / 2, $height / 2, ($width / 2) + ($width / 4), $height / 2 ); $clipMask->drawImage($draw); $imagick->setImageClipMask($clipMask); $imagick->negateImage(false); $imagick->setFormat("png"); $bytes = $imagick->getImagesBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setImageClipMask() ; echo "Ok"; ?> --EXPECTF-- Deprecated: %s Imagick::setImageClipMask() is deprecated in %s Ok imagick-3.6.0/tests/125_Imagick_setImageOrientation_basic.phpt0000644000000000000000000000114314145213430023003 0ustar rootroot--TEST-- Test Imagick, setImageOrientation --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setImageOrientation($orientationType); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setImageOrientation($orientationType) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/126_Imagick_getImageChannelStats_basic.phpt0000644000000000000000000000045114145213430023065 0ustar rootroot--TEST-- Test Imagick, getImageChannelStatistics --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $identifyInfo = $imagick->getImageChannelStatistics(); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/127_Imagick_progressMonitor_basic.phpt0000644000000000000000000000217414145213430022254 0ustar rootroot--TEST-- Test Imagick, progressMonitor --SKIPIF-- --FILE-- 20) { $status = "Processing cancelled"; return false; } $nowTime = time(); $debug .= "$x: nowTime $nowTime - startTime $startTime".PHP_EOL; $x++; if ($nowTime - $startTime > 5) { $status = "Processing cancelled"; return false; } return true; }; $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $imagick->setProgressMonitor($callback); try { $imagick->charcoalImage($radius, $sigma); $bytes = $imagick->getImageBlob(); echo "Progress monitor failed to interrupt.".PHP_EOL; echo $debug; } catch(\Exception $e) { echo $status.PHP_EOL; } ?> --EXPECTF-- Processing cancelledimagick-3.6.0/tests/130_Imagick_setOption_case1.phpt0000644000000000000000000000113214145213430020722 0ustar rootroot--TEST-- Test Imagick, setOption --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setImageFormat('jpg'); $imagick->setOption('jpeg:extent', $extent); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } renderJPG($extent) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/131_Imagick_setOption_case2.phpt0000644000000000000000000000100314145213430020721 0ustar rootroot--TEST-- Test Imagick, setOption --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setImageFormat('png'); $imagick->setOption('png:format', $format); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } renderPNG($format) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/132_Imagick_setOption_case3.phpt0000644000000000000000000000105414145213430020731 0ustar rootroot--TEST-- Test Imagick, setOption --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setImageFormat('png'); $imagick->setOption('png:bit-depth', '16'); $imagick->setOption('png:color-type', 6); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } renderCustomBitDepthPNG() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/133_Imagick_setSamplingFactors_basic.phpt0000644000000000000000000000150614145213430022643 0ustar rootroot--TEST-- Test Imagick, setSamplingFactors --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setImageFormat('jpg'); $imagick->setSamplingFactors(array('2x2', '1x1', '1x1')); $compressed = $imagick->getImageBlob(); $reopen = new \Imagick(); $reopen->readImageBlob($compressed); $reopen->resizeImage( $reopen->getImageWidth() * 4, $reopen->getImageHeight() * 4, \Imagick::FILTER_POINT, 1 ); $bytes = $reopen->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setSamplingFactors() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/134_Imagick_shadowImage_basic.phpt0000644000000000000000000000071714145213430021267 0ustar rootroot--TEST-- Test Imagick, shadowImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->shadowImage(0.4, 10, 50, 5); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } shadowImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/135_Imagick_sharpenImage_basic.phpt0000644000000000000000000000111614145213430021435 0ustar rootroot--TEST-- Test Imagick, sharpenImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->sharpenimage($radius, $sigma, $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } sharpenImage($radius, $sigma, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/136_Imagick_shadeImage_basic.phpt0000644000000000000000000000071114145213430021062 0ustar rootroot--TEST-- Test Imagick, shadeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->shadeImage(true, 45, 20); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } shadeImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/137_Imagick_shearImage_basic.phpt0000644000000000000000000000107714145213430021107 0ustar rootroot--TEST-- Test Imagick, shearImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->shearimage($color, $shearX, $shearY); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } shearImage($color, $shearX, $shearY) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/138_Imagick_shaveImage_basic.phpt0000644000000000000000000000070414145213430021110 0ustar rootroot--TEST-- Test Imagick, shaveImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->shaveImage(100, 50); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } shaveImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/139_Imagick_sigmoidalContrastImage_basic.phpt0000644000000000000000000000142214145213430023467 0ustar rootroot--TEST-- Test Imagick, sigmoidalContrastImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); //Need some stereo image to work with. $imagick->sigmoidalcontrastimage( $sharpening, //sharpen $midpoint, $sigmoidalContrast * \Imagick::getQuantum() ); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } sigmoidalContrastImage($sharpening, $midpoint, $sigmoidalContrast) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/141_Imagick_sketchImage_basic.phpt0000644000000000000000000000105414145213430021254 0ustar rootroot--TEST-- Test Imagick, sketchImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->sketchimage($radius, $sigma, $angle); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } sketchImage($radius, $sigma, $angle) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/142_Imagick_solarizeImage_basic.phpt0000644000000000000000000000106214145213430021623 0ustar rootroot--TEST-- Test Imagick, solarizeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->solarizeImage($solarizeThreshold * \Imagick::getQuantum()); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } solarizeImage($solarizeThreshold) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/143_Imagick_spreadImage_basic.phpt0000644000000000000000000000074314145213430021257 0ustar rootroot--TEST-- Test Imagick, spreadImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->spreadImage($radius); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } spreadImage($radius) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/144_Imagick_spliceImage_basic.phpt0000644000000000000000000000113314145213430021253 0ustar rootroot--TEST-- Test Imagick, spliceImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->spliceImage($width, $height, $startX, $startY); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } spliceImage($startX, $startY, $width, $height) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/145_imagickkernel_coverage.phpt0000644000000000000000000001071314145213430020731 0ustar rootroot--TEST-- ImagickKernel::fromMatrix test --SKIPIF-- --FILE-- scale(1, \Imagick::NORMALIZE_KERNEL_VALUE); $kernel->addUnityKernel(0.50); $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $imagick->morphology( \Imagick::MORPHOLOGY_CONVOLVE, 1, $kernel ); $tests = array(); $tests[] = array( "Cannot create kernel, matrix is empty.", array() ); $tests[] = array( "Values must be matrix, with the same number of columns in each row.", array(0, 1, 1) ); //Should fail, matrix needs to have same number columns in each row $tests[] = array( "Values must be matrix, with the same number of columns in each row.", array( array(1, 0, 1), array(1, 0, 1), array(1, 0), ) ); //Should fail, value instead of second row $tests[] = array( "Values must be matrix, with the same number of columns in each row.", array( array(0, 1), 1 ) ); //Should fail, value instead of second row $tests[] = array( "Only numbers or false are valid values in a kernel matrix.", array( array(0, 1), array(0, new StdClass), ) ); $tests[] = array( "For kernels with even numbered rows or columns, the origin position must be specified.", array( array(1, 0), ), ); foreach ($tests as $test) { list($expectedMessage, $testValue) = $test; try { $kernel = ImagickKernel::fromMatrix($testValue); echo "Failed to throw exception".PHP_EOL; } catch(ImagickKernelException $e) { if ($e->getMessage() != $expectedMessage) { echo "Unexpected message ".$e->getMessage()." for test:".PHP_EOL; var_dump($test); } } } try { $kernel = ImagickKernel::fromBuiltin(\Imagick::KERNEL_DIAMOND, "CestNestPasUneKernel"); //echo "builtIn OK".PHP_EOL; } catch(Exception $e) { echo "Unexpected exception: ".$e->getMessage().PHP_EOL; } //Test adding unity kernel works. $matrix1 = array( array(1, 1, 1), array(0, 0, 0), array(-1, -1, -1), ); $kernel = ImagickKernel::fromMatrix($matrix1); $kernel->addUnityKernel(0.5); $matrix = $kernel->getMatrix(); if ($matrix[1][1] != 0.5) { echo "center point should be 0.5 but is actually ".$matrix[1][1].PHP_EOL; var_dump($matrix); } //echo "Adding unity kernel ok".PHP_EOL; // Test adding kernel works and you can get the values back $matrix1 = array( array(1, 1), array(0, 0), ); $matrix2 = array( array(0, 0), array(1, 1), ); $kernel1 = ImagickKernel::fromMatrix($matrix1, array(0, 0)); $kernel2 = ImagickKernel::fromMatrix($matrix2, array(0, 0)); $kernel1->addKernel($kernel2); $kernelList = $kernel1->separate(); if (count($kernelList) != 2) { echo "Incorrect number of matrixes returned."; } else { if ($kernelList[0]->getMatrix() != $matrix1) { echo "Matrix 1 does not match".PHP_EOL; var_dump($kernelList[0]); } if ($kernelList[1]->getMatrix() != $matrix2) { echo "Matrix 2 does not match".PHP_EOL; var_dump($kernelList[1]); } } //Test Scaling $matrixIn = array( array(-1, 0, -1), array( 0, 8, 0), array(-1, 0, -1), ); $kernel = ImagickKernel::fromMatrix($matrixIn); $kernel->scale(1, \Imagick::NORMALIZE_KERNEL_VALUE); $matrixOut = $kernel->getMatrix(); if ($matrixOut[1][1] != 2) { echo "Matrix was not normalised correctly."; var_dump($matrixOut); } //Test single line kernel works $matrixIn = array( array(1, 0), ); $kernel = ImagickKernel::fromMatrix($matrixIn, array(1, 0)); if ($kernel->getMatrix() != $matrixIn) { echo "Values do not match for 'Test single line kernel works'".PHP_EOL; } //Test even sized kernel works $matrixIn = array( array(-1, 0), array( 0, 1) ); $kernel = ImagickKernel::fromMatrix($matrixIn, array(0, 1)); if ($kernel->getMatrix() != $matrixIn) { echo "Values do not match for 'Test even sized kernel works'".PHP_EOL; } //Test 'wrong' order matrix is converted correctly. $matrix = array( array(0.0, 1.0), array(0.5, false) ); $outOfOrderMatrix = array(); $outOfOrderMatrix[1][1] = $matrix[1][1]; $outOfOrderMatrix[1][0] = $matrix[1][0]; $outOfOrderMatrix[0][1] = $matrix[0][1]; $outOfOrderMatrix[0][0] = $matrix[0][0]; $kernel = ImagickKernel::fromMatrix($outOfOrderMatrix, array(0, 0)); $kernelMatrix = $kernel->getMatrix(); if ($kernelMatrix !== $matrix) { echo "Kernel generated from 'out of order' matrix is incorrect.".PHP_EOL; var_dump($matrix); echo "vs".PHP_EOL; var_dump($kernelMatrix); } echo "Complete".PHP_EOL; ?> --EXPECTF-- Complete imagick-3.6.0/tests/149_Imagick_sparseColorImage.phpt0000644000000000000000000000772014145213430021144 0ustar rootroot--TEST-- Test Imagick, sparseColorImage --SKIPIF-- --FILE-- newImage($width, $height, "rgba(255, 255, 255, 1)"); $imagick->setImageFormat("png"); $barycentricPoints = array(); foreach ($colorPoints as $colorPoint) { if ($absolute == true) { $barycentricPoints[] = $colorPoint[0]; $barycentricPoints[] = $colorPoint[1]; } else { $barycentricPoints[] = $colorPoint[0] * $width; $barycentricPoints[] = $colorPoint[1] * $height; } if (is_string($colorPoint[2])) { $imagickPixel = new \ImagickPixel($colorPoint[2]); } else if ($colorPoint[2] instanceof \ImagickPixel) { $imagickPixel = $colorPoint[2]; } else{ $errorMessage = sprintf( "Value %s is neither a string nor an ImagickPixel class. Cannot use as a color.", $colorPoint[2] ); throw new \InvalidArgumentException( $errorMessage ); } $red = $imagickPixel->getColorValue(\Imagick::COLOR_RED); $green = $imagickPixel->getColorValue(\Imagick::COLOR_GREEN); $blue = $imagickPixel->getColorValue(\Imagick::COLOR_BLUE); $alpha = $imagickPixel->getColorValue(\Imagick::COLOR_ALPHA); $barycentricPoints[] = $red; $barycentricPoints[] = $green; $barycentricPoints[] = $blue; $barycentricPoints[] = $alpha; } $imagick->sparseColorImage($sparseMethod, $barycentricPoints); return $imagick; } function renderImageBarycentric() { $points = array( array(0, 0, 'skyblue'), array(-1, 1, 'skyblue'), array(1, 1, 'black'), ); $imagick = createGradientImage(600, 200, $points, \Imagick::SPARSECOLORMETHOD_BARYCENTRIC); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok".PHP_EOL; } function renderImageVoronoi() { $points = array( array(0.30, 0.10, 'red'), array(0.10, 0.80, 'blue'), array(0.70, 0.60, 'lime'), array(0.80, 0.20, 'yellow'), ); $imagick = createGradientImage(500, 500, $points, \Imagick::SPARSECOLORMETHOD_VORONOI); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok".PHP_EOL; } function renderImageShepards() { $points = array( array(0.30, 0.10, 'red'), array(0.10, 0.80, "RGBA(0, 255, 0, 0.5)"), array(0.70, 0.60, "RGBA(0, 255, 0, 1)"), array(0.80, 0.20, 'yellow'), ); $imagick = createGradientImage(600, 600, $points, \Imagick::SPARSECOLORMETHOD_SPEPARDS); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok".PHP_EOL; } function renderImageBilinear() { $points = array( array(0.30, 0.10, 'red'), array(0.10, 0.80, 'blue'), array(0.70, 0.60, 'lime'), array(0.80, 0.20, 'yellow'), ); $imagick = createGradientImage(500, 500, $points, \Imagick::SPARSECOLORMETHOD_BILINEAR); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok".PHP_EOL; } try { renderImageBilinear() ; } catch (\Exception $e) { echo "renderImageBilinear failed ".$e->getMessage().PHP_EOL; } try { renderImageShepards(); } catch (\Exception $e) { echo "renderImageShepards failed ".$e->getMessage().PHP_EOL; } try { renderImageVoronoi(); } catch (\Exception $e) { echo "renderImageVoronoi failed ".$e->getMessage().PHP_EOL; } try { renderImageBarycentric(); } catch (\Exception $e) { echo "renderImageBarycentric failed ".$e->getMessage().PHP_EOL; } ?> --EXPECTF-- Ok Ok Ok Okimagick-3.6.0/tests/150_Imagick_setregistry.phpt0000644000000000000000000000303014145213430020247 0ustar rootroot--TEST-- Test Imagick, setRegistry and getRegistry --SKIPIF-- --FILE-- getMessage() . "\n"; } } ?> --EXPECTF-- Temporary-path was empty at start. Temporary path was set correctly. Temporary path was listed correctly. This is fine. imagick-3.6.0/tests/151_Imagick_subImageMatch_basic.phpt0000644000000000000000000000312114145213430021537 0ustar rootroot--TEST-- Test Imagick, subImageMatch --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->adaptiveResizeImage(100, 100, true); //This makes the test fall over on some versions of ImageMagick //$imagick->setImageAlphaChannel(\Imagick::ALPHACHANNEL_DEACTIVATE); $imagick2 = clone $imagick; $imagick2->cropimage(25, 25, 50, 50); $imagick2->setImageFormat('png'); $imagick2->setImagePage(25, 25, 0, 0); $imagick2->vignetteimage(0.25, 0.75, 3, 3); $similarity = 'not set'; $bestMatch = 'not st'; $comparison = $imagick->subImageMatch($imagick2, $bestMatch, $similarity); $comparison->setImageFormat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} $version = Imagick::getVersion(); if ($version['versionNumber'] >= 0x700) { $expectedValue = 0.7642; } else { $expectedValue = 0.5585; } // This doesn't work reliably - the values are not comparable across versions // if (abs($expectedValue - $similarity) <= 0.005) { // echo "Similarity in range\n"; // } // else { // echo "Similarity is out of range.\n"; // var_dump($similarity); // } ksort($bestMatch); foreach ($bestMatch as $key => $value) { echo "$key : $value\n"; } } subImageMatch() ; echo "Ok"; ?> --EXPECTF-- height : 25 width : 25 x : 50 y : 50 Okimagick-3.6.0/tests/152_Imagick_swirlImage_basic.phpt0000644000000000000000000000073514145213430021142 0ustar rootroot--TEST-- Test Imagick, swirlImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->swirlImage($swirl); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } swirlImage($swirl) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/153_Imagick_statisticImage_basic.phpt0000644000000000000000000000130514145213430022004 0ustar rootroot--TEST-- Test Imagick, statisticImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->statisticImage( $statisticType, $w20, $h20, $channel ); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } statisticImage($statisticType, $w20, $h20, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/154_Imagick_textureImage_basic.phpt0000644000000000000000000000116414145213430021501 0ustar rootroot--TEST-- Test Imagick, textureImage --SKIPIF-- --FILE-- newImage(640, 480, new \ImagickPixel('pink')); $image->setImageFormat("jpg"); $texture = new \Imagick(); $texture->newPseudoImage(640, 480, "magick:logo"); $texture->scaleimage($image->getimagewidth() / 4, $image->getimageheight() / 4); $image = $image->textureImage($texture); $bytes = $image; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } textureImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/155_Imagick_thresholdImage_basic.phpt0000644000000000000000000000125114145213430021773 0ustar rootroot--TEST-- Test Imagick, thresholdImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->thresholdimage($threshold * \Imagick::getQuantum(), $channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } thresholdimage($threshold, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/156_Imagick_tintImage_basic.phpt0000644000000000000000000000123114145213430020754 0ustar rootroot--TEST-- Test Imagick, tintImage --SKIPIF-- --FILE-- newPseudoImage(400, 400, 'gradient:black-white'); $tint = new \ImagickPixel("rgb($r, $g, $b)"); $opacity = new \ImagickPixel("rgb(128, 128, 128, $a)"); $imagick->tintImage($tint, $opacity); $imagick->setImageFormat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } tintImage($r, $g, $b, $a) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/157_Imagick_thumbnailImage_basic.phpt0000644000000000000000000000102614145213430021764 0ustar rootroot--TEST-- Test Imagick, thumbnailImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setbackgroundcolor('rgb(64, 64, 64)'); $imagick->thumbnailImage(100, 100, true, true); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } thumbnailImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/158_Imagick_transposeImage_basic.phpt0000644000000000000000000000071514145213430022024 0ustar rootroot--TEST-- Test Imagick, transposeImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->transposeImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } transposeImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/159_Imagick_transformImage_basic.phpt0000644000000000000000000000114314145213430022016 0ustar rootroot--TEST-- Test Imagick, transformImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $newImage = $imagick->transformImage("400x600", "200x300"); $bytes = $newImage->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } transformimage() ; echo "Ok"; ?> --EXPECTF-- Deprecated: %s Imagick::transformImage() is deprecated in %s Ok imagick-3.6.0/tests/160_Imagick_transparentPaintImage_basic.phpt0000644000000000000000000000144214145213430023332 0ustar rootroot--TEST-- Test Imagick, transparentPaintImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); //Need to be in a format that supports transparency $imagick->setimageformat('png'); $imagick->transparentPaintImage( $color, $alpha, $fuzz * \Imagick::getQuantum(), false ); //Not required, but helps tidy up left over pixels $imagick->despeckleimage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } transparentPaintImage($color, $alpha, $fuzz) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/161_Imagick_transformImageColorspace_basic.phpt0000644000000000000000000000121614145213430024023 0ustar rootroot--TEST-- Test Imagick, transformImageColorspace --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->transformimagecolorspace($colorSpace); $imagick->separateImageChannel($channel); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } transformImageColorspace($colorSpace, $channel) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/162_Imagick_transverseImage_basic.phpt0000644000000000000000000000072114145213430022172 0ustar rootroot--TEST-- Test Imagick, transverseImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->transverseImage(); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } transverseImage() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/163_Imagick_uniqueImageColors_basic.phpt0000644000000000000000000000125214145213430022467 0ustar rootroot--TEST-- Test Imagick, uniqueImageColors --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); //Reduce the image to 256 colours nicely. $imagick->quantizeImage(256, \Imagick::COLORSPACE_YIQ, 0, false, false); $imagick->uniqueImageColors(); $imagick->scaleimage($imagick->getImageWidth(), $imagick->getImageHeight() * 20); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } uniqueImageColors() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/164_Imagick_trimImage_basic.phpt0000644000000000000000000000111514145213430020751 0ustar rootroot--TEST-- Test Imagick, trimImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->borderImage($color, 10, 10); $imagick->trimImage($fuzz * \Imagick::getQuantum()); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } trimImage($color, $fuzz) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/165_Imagick_unsharpMaskImage_basic.phpt0000644000000000000000000000127014145213430022275 0ustar rootroot--TEST-- Test Imagick, unsharpMaskImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->unsharpMaskImage($radius, $sigma, $amount, $unsharpThreshold); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } unsharpMaskImage($radius, $sigma, $amount, $unsharpThreshold) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/166_Imagick_waveImage_basic.phpt0000644000000000000000000000102014145213430020735 0ustar rootroot--TEST-- Test Imagick, waveImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->waveImage($amplitude, $length); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } waveImage($amplitude, $length) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/167_Imagick_vignetteImage_basic.phpt0000644000000000000000000000113714145213430021632 0ustar rootroot--TEST-- Test Imagick, vignetteImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->vignetteImage($blackPoint, $whitePoint, $x, $y); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } vignetteImage($blackPoint, $whitePoint, $x, $y) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/168_Imagick_whiteThresholdImage_basic.phpt0000644000000000000000000000105514145213430023002 0ustar rootroot--TEST-- Test Imagick, whiteThresholdImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); //TODO needs a control $imagick->whiteThresholdImage($color); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } whiteThresholdImage($color) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/169_ImagickPixel_construct_basic.phpt0000644000000000000000000000352214145213430022072 0ustar rootroot--TEST-- Test ImagickPixel, construct --SKIPIF-- --FILE-- setstrokewidth(1.0); $draw->setStrokeColor($black); $draw->setFillColor($color); $offsetX = ($count % $columns) * 50 + 5; $offsetY = intval($count / $columns) * 50 + 5; $draw->rectangle(0 + $offsetX, 0 + $offsetY, 40 + $offsetX, 40 + $offsetY); $count++; } $image = new \Imagick(); $image->newImage(350, 350, "blue"); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } construct() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/170_ImagickPixel_setColor_basic.phpt0000644000000000000000000000137114145213430021630 0ustar rootroot--TEST-- Test ImagickPixel, setColor --SKIPIF-- --FILE-- setColor('rgba(100%, 75%, 0%, 1.0)'); $draw->setstrokewidth(3.0); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->rectangle(200, 200, 300, 300); $image = new \Imagick(); $image->newImage(500, 500, "SteelBlue2"); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setColor() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/171_ImagickPixel_setColorValue_basic.phpt0000644000000000000000000000131714145213430022626 0ustar rootroot--TEST-- Test ImagickPixel, setColorValue --SKIPIF-- --FILE-- setcolorValue(\Imagick::COLOR_RED, 128); $draw->setstrokewidth(1.0); $draw->setStrokeColor($color); $draw->setFillColor($color); $draw->rectangle(200, 200, 300, 300); $image->newImage(500, 500, "SteelBlue2"); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setColorValue() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/172_ImagickPixel_setColorValueQuantum_basic.phpt0000644000000000000000000000151614145213430024203 0ustar rootroot--TEST-- Test ImagickPixel, setColorValueQuantum --SKIPIF-- --FILE-- getQuantumRange(); $draw = new \ImagickDraw(); $color = new \ImagickPixel('blue'); $color->setcolorValueQuantum(\Imagick::COLOR_RED, (int)(128 * $quantumRange['quantumRangeLong'] / 256)); $draw->setstrokewidth(1.0); $draw->setStrokeColor($color); $draw->setFillColor($color); $draw->rectangle(200, 200, 300, 300); $image->newImage(500, 500, "SteelBlue2"); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setColorValueQuantum() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/173_ImagickDraw_bezier_basic.phpt0000644000000000000000000000435314145213430021140 0ustar rootroot--TEST-- Test ImagickDraw, bezier --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $smoothPointsSet = array( array( array('x' => 10.0 * 5, 'y' => 10.0 * 5), array('x' => 30.0 * 5, 'y' => 90.0 * 5), array('x' => 25.0 * 5, 'y' => 10.0 * 5), array('x' => 50.0 * 5, 'y' => 50.0 * 5), ), array( array('x' => 50.0 * 5, 'y' => 50.0 * 5), array('x' => 75.0 * 5, 'y' => 90.0 * 5), array('x' => 70.0 * 5, 'y' => 10.0 * 5), array('x' => 90.0 * 5, 'y' => 40.0 * 5), ), ); foreach ($smoothPointsSet as $points) { $draw->bezier($points); } $disjointPoints = array( array( array('x' => 10 * 5, 'y' => 10 * 5), array('x' => 30 * 5, 'y' => 90 * 5), array('x' => 25 * 5, 'y' => 10 * 5), array('x' => 50 * 5, 'y' => 50 * 5), ), array( array('x' => 50 * 5, 'y' => 50 * 5), array('x' => 80 * 5, 'y' => 50 * 5), array('x' => 70 * 5, 'y' => 10 * 5), array('x' => 90 * 5, 'y' => 40 * 5), ) ); $draw->translate(0, 200); foreach ($disjointPoints as $points) { $draw->bezier($points); } //Create an image object which the draw commands can be rendered into $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); //Render the draw commands in the ImagickDraw object //into the image. $imagick->drawImage($draw); //Send the image to the browser $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } bezier($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/174_ImagickDraw_affine_basic.phpt0000644000000000000000000000435014145213430021106 0ustar rootroot--TEST-- Test ImagickDraw, affine --SKIPIF-- --FILE-- setStrokeWidth(1); $draw->setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $PI = 3.141592653589794; $angle = 60 * $PI / 360; //Scale the drawing co-ordinates. $affineScale = array("sx" => 1.75, "sy" => 1.75, "rx" => 0, "ry" => 0, "tx" => 0, "ty" => 0); //Shear the drawing co-ordinates. $affineShear = array("sx" => 1, "sy" => 1, "rx" => sin($angle), "ry" => -sin($angle), "tx" => 0, "ty" => 0); //Rotate the drawing co-ordinates. The shear affine matrix //produces incorrectly scaled drawings. $affineRotate = array("sx" => cos($angle), "sy" => cos($angle), "rx" => sin($angle), "ry" => -sin($angle), "tx" => 0, "ty" => 0,); //Translate (offset) the drawing $affineTranslate = array("sx" => 1, "sy" => 1, "rx" => 0, "ry" => 0, "tx" => 30, "ty" => 30); //The identiy affine matrix $affineIdentity = array("sx" => 1, "sy" => 1, "rx" => 0, "ry" => 0, "tx" => 0, "ty" => 0); $examples = array($affineScale, $affineShear, $affineRotate, $affineTranslate, $affineIdentity,); $count = 0; foreach ($examples as $example) { $draw->push(); $draw->translate(($count % 2) * 250, intval($count / 2) * 250); $draw->translate(100, 100); $draw->affine($example); $draw->rectangle(-50, -50, 50, 50); $draw->pop(); $count++; } //Create an image object which the draw commands can be rendered into $image = new \Imagick(); $image->newImage(500, 750, $backgroundColor); $image->setImageFormat("png"); //Render the draw commands in the ImagickDraw object //into the image. $image->drawImage($draw); //Send the image to the browser $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } affine($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/175_ImagickDraw_arc_basic.phpt0000644000000000000000000000241214145213430020421 0ustar rootroot--TEST-- Test ImagickDraw, arc --SKIPIF-- --FILE-- setStrokeWidth(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->arc($startX, $startY, $endX, $endY, $startAngle, $endAngle); //Create an image object which the draw commands can be rendered into $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); //Render the draw commands in the ImagickDraw object //into the image. $image->drawImage($draw); //Send the image to the browser $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } arc($strokeColor, $fillColor, $backgroundColor, $startX, $startY, $endX, $endY, $startAngle, $endAngle) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/176_ImagickDraw_ellipse_basic.phpt0000644000000000000000000000221514145213430021313 0ustar rootroot--TEST-- Test ImagickDraw, ellipse --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->ellipse(125, 70, 100, 50, 0, 360); $draw->ellipse(350, 70, 100, 50, 0, 315); $draw->push(); $draw->translate(125, 250); $draw->rotate(30); $draw->ellipse(0, 0, 100, 50, 0, 360); $draw->pop(); $draw->push(); $draw->translate(350, 250); $draw->rotate(30); $draw->ellipse(0, 0, 100, 50, 0, 315); $draw->pop(); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } ellipse($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/177_ImagickDraw_composite_basic.phpt0000644000000000000000000000330514145213430021662 0ustar rootroot--TEST-- Test ImagickDraw, composite --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setFillOpacity(1); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setStrokeWidth(2); $draw->setFontSize(140); $draw->rectangle(0, 0, 1000, 300); $draw->setFillColor('white'); $draw->setfillopacity(1); $draw->annotation(50, 180, "Lorem Ipsum!"); // $imagick = new \Imagick(realpath("../images/TestImage.jpg")); // $draw->composite(\Imagick::COMPOSITE_MULTIPLY, -500, -200, 2000, 600, $imagick); //$imagick->compositeImage($draw, 0, 0, 1000, 500); //$draw->composite(Imagick::COMPOSITE_COLORBURN, -500, -200, 2000, 600, $imagick); //Create an image object which the draw commands can be rendered into $imagick = new \Imagick(); $imagick->newImage(1000, 302, $backgroundColor); $imagick->setImageFormat("png"); //Render the draw commands in the ImagickDraw object //into the image. $imagick->drawImage($draw); //Send the image to the browser $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } composite($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/178_ImagickDraw_circle_basic.phpt0000644000000000000000000000220614145213430021121 0ustar rootroot--TEST-- Test ImagickDraw, circle --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->circle($originX, $originY, $endX, $endY); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } circle($strokeColor, $fillColor, $backgroundColor, $originX, $originY, $endX, $endY) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/179_ImagickDraw_line_basic.phpt0000644000000000000000000000154014145213430020610 0ustar rootroot--TEST-- Test ImagickDraw, line --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->line(125, 70, 100, 50); $draw->line(350, 170, 100, 150); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } line($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/180_ImagickDraw_matte_basic.phpt0000644000000000000000000000201414145213430020760 0ustar rootroot--TEST-- Test ImagickDraw, matte --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->matte(120, 120, $paintType); $draw->rectangle(100, 100, 300, 200); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } matte($strokeColor, $fillColor, $backgroundColor, $paintType) ; echo "Ok"; ?> --EXPECTF-- Deprecated: %s ImagickDraw::matte() is deprecated in %s Ok imagick-3.6.0/tests/181_ImagickDraw_pathStart_basic.phpt0000644000000000000000000000276614145213430021637 0ustar rootroot--TEST-- Test ImagickDraw, pathStart --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->pathStart(); $draw->pathMoveToAbsolute(50, 50); $draw->pathLineToAbsolute(100, 50); $draw->pathLineToRelative(0, 50); $draw->pathLineToHorizontalRelative(-50); $draw->pathFinish(); $draw->pathStart(); $draw->pathMoveToAbsolute(50, 50); $draw->pathMoveToRelative(300, 0); $draw->pathLineToRelative(50, 0); $draw->pathLineToVerticalRelative(50); $draw->pathLineToHorizontalAbsolute(350); $draw->pathclose(); $draw->pathFinish(); $draw->pathStart(); $draw->pathMoveToAbsolute(50, 300); $draw->pathCurveToAbsolute(50, 300, 100, 200, 300, 300); $draw->pathLineToVerticalAbsolute(350); $draw->pathFinish(); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } pathStart($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/182_ImagickDraw_pathCurveToQuadraticBezierAbsolute_basic.phpt0000644000000000000000000000357614145213430026630 0ustar rootroot--TEST-- Test ImagickDraw, pathCurveToQuadraticBezierAbsolute --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->pathStart(); $draw->pathMoveToAbsolute(50,250); // This specifies a quadratic bezier curve with the current position as the start // point, the control point is the first two params, and the end point is the last two params. $draw->pathCurveToQuadraticBezierAbsolute( 150,50, 250,250 ); // This specifies a quadratic bezier curve with the current position as the start // point, the control point is mirrored from the previous curves control point // and the end point is defined by the x, y values. $draw->pathCurveToQuadraticBezierSmoothAbsolute( 450,250 ); // This specifies a quadratic bezier curve with the current position as the start // point, the control point is mirrored from the previous curves control point // and the end point is defined relative from the current position by the x, y values. $draw->pathCurveToQuadraticBezierSmoothRelative( 200,-100 ); $draw->pathFinish(); $imagick = new \Imagick(); $imagick->newImage(700, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } pathCurveToQuadraticBezierAbsolute($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/183_ImagickDraw_pathCurveToQuadraticBezierAbsolute_basic.phpt0000644000000000000000000000357614145213430026631 0ustar rootroot--TEST-- Test ImagickDraw, pathCurveToQuadraticBezierAbsolute --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->pathStart(); $draw->pathMoveToAbsolute(50,250); // This specifies a quadratic bezier curve with the current position as the start // point, the control point is the first two params, and the end point is the last two params. $draw->pathCurveToQuadraticBezierAbsolute( 150,50, 250,250 ); // This specifies a quadratic bezier curve with the current position as the start // point, the control point is mirrored from the previous curves control point // and the end point is defined by the x, y values. $draw->pathCurveToQuadraticBezierSmoothAbsolute( 450,250 ); // This specifies a quadratic bezier curve with the current position as the start // point, the control point is mirrored from the previous curves control point // and the end point is defined relative from the current position by the x, y values. $draw->pathCurveToQuadraticBezierSmoothRelative( 200,-100 ); $draw->pathFinish(); $imagick = new \Imagick(); $imagick->newImage(700, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } pathCurveToQuadraticBezierAbsolute($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/184_ImagickDraw_polyline_basic.phpt0000644000000000000000000000201314145213430021504 0ustar rootroot--TEST-- Test ImagickDraw, polyline --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(5); $points = array( array('x' => 40 * 5, 'y' => 10 * 5), array('x' => 20 * 5, 'y' => 20 * 5), array('x' => 70 * 5, 'y' => 50 * 5), array('x' => 60 * 5, 'y' => 15 * 5) ); $draw->polyline($points); $image = new \Imagick(); $image->newImage(500, 300, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } polyline($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/185_ImagickDraw_point_basic.phpt0000644000000000000000000000137014145213430021010 0ustar rootroot--TEST-- Test ImagickDraw, point --SKIPIF-- --FILE-- setFillColor($fillColor); for ($x = 0; $x < 10000; $x++) { $draw->point(rand(0, 500), rand(0, 500)); } $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } point($fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/186_ImagickDraw_polygon_basic.phpt0000644000000000000000000000201114145213430021340 0ustar rootroot--TEST-- Test ImagickDraw, polygon --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setStrokeWidth(4); $draw->setFillColor($fillColor); $points = array( array('x' => 40 * 5, 'y' => 10 * 5), array('x' => 20 * 5, 'y' => 20 * 5), array('x' => 70 * 5, 'y' => 50 * 5), array('x' => 60 * 5, 'y' => 15 * 5), ); $draw->polygon($points); $image = new \Imagick(); $image->newImage(500, 300, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } polygon($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/187_ImagickDraw_push_basic.phpt0000644000000000000000000000204514145213430020640 0ustar rootroot--TEST-- Test ImagickDraw, push --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillModifiedColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->push(); $draw->translate(50, 50); $draw->rectangle(200, 200, 300, 300); $draw->pop(); $draw->setFillColor($fillColor); $draw->rectangle(200, 200, 300, 300); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } push($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/188_ImagickDraw_pushPattern_basic.phpt0000644000000000000000000000275314145213430022205 0ustar rootroot--TEST-- Test ImagickDraw, pushPattern --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->pushPattern("MyFirstPattern", 0, 0, 50, 50); for ($x = 0; $x < 50; $x += 10) { for ($y = 0; $y < 50; $y += 5) { $positionX = $x + (($y / 5) % 5); $draw->rectangle($positionX, $y, $positionX + 5, $y + 5); } } $draw->popPattern(); $draw->setFillOpacity(0); $draw->rectangle(100, 100, 400, 400); $draw->setFillOpacity(1); $draw->setFillOpacity(1); $draw->push(); $draw->setFillPatternURL('#MyFirstPattern'); $draw->setFillColor('yellow'); $draw->rectangle(100, 100, 400, 400); $draw->pop(); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } pushPattern($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/189_ImagickDraw_setClipPath_basic.phpt0000644000000000000000000000231714145213430022105 0ustar rootroot--TEST-- Test ImagickDraw, setClipPath --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $clipPathName = 'testClipPath'; $draw->pushClipPath($clipPathName); $draw->rectangle(0, 0, 250, 250); $draw->popClipPath(); $draw->setClipPath($clipPathName); $draw->rectangle(100, 100, 400, 400); $storedPathName = $draw->getClipPath(); if (strcmp($storedPathName, $clipPathName) != 0) { echo "Error retrieving clipPath: $storedPathName != $clipPathName\n"; } $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setClipPath($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/190_ImagickDraw_popDefs_basic.phpt0000644000000000000000000000174314145213430021257 0ustar rootroot--TEST-- Test ImagickDraw, popDefs --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setstrokeOpacity(1); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->pushDefs(); $draw->setStrokeColor('white'); $draw->rectangle(50, 50, 200, 200); $draw->popDefs(); $draw->rectangle(300, 50, 450, 200); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } popDefs($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/191_ImagickDraw_push_basic.phpt0000644000000000000000000000204514145213430020633 0ustar rootroot--TEST-- Test ImagickDraw, push --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillModifiedColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->push(); $draw->translate(50, 50); $draw->rectangle(200, 200, 300, 300); $draw->pop(); $draw->setFillColor($fillColor); $draw->rectangle(200, 200, 300, 300); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } push($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/192_ImagickDraw_setClipPath_basic.phpt0000644000000000000000000000201614145213430022073 0ustar rootroot--TEST-- Test ImagickDraw, setClipPath --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $clipPathName = 'testClipPath'; $draw->pushClipPath($clipPathName); $draw->rectangle(0, 0, 250, 250); $draw->popClipPath(); $draw->setClipPath($clipPathName); $draw->rectangle(100, 100, 400, 400); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setClipPath($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/193_ImagickDraw_pushPattern_basic.phpt0000644000000000000000000000275314145213430022201 0ustar rootroot--TEST-- Test ImagickDraw, pushPattern --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->pushPattern("MyFirstPattern", 0, 0, 50, 50); for ($x = 0; $x < 50; $x += 10) { for ($y = 0; $y < 50; $y += 5) { $positionX = $x + (($y / 5) % 5); $draw->rectangle($positionX, $y, $positionX + 5, $y + 5); } } $draw->popPattern(); $draw->setFillOpacity(0); $draw->rectangle(100, 100, 400, 400); $draw->setFillOpacity(1); $draw->setFillOpacity(1); $draw->push(); $draw->setFillPatternURL('#MyFirstPattern'); $draw->setFillColor('yellow'); $draw->rectangle(100, 100, 400, 400); $draw->pop(); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } pushPattern($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/194_ImagickDraw_rectangle_basic.phpt0000644000000000000000000000166714145213430021634 0ustar rootroot--TEST-- Test ImagickDraw, rectangle --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $draw->rectangle(200, 200, 300, 300); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } rectangle($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/195_ImagickDraw_rotate_basic.phpt0000644000000000000000000000173114145213430021157 0ustar rootroot--TEST-- Test ImagickDraw, rotate --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setStrokeOpacity(1); $draw->setFillColor($fillColor); $draw->rectangle(200, 200, 300, 300); $draw->setFillColor($fillModifiedColor); $draw->rotate(15); $draw->rectangle(200, 200, 300, 300); $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } rotate($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/196_ImagickDraw_scale_basic.phpt0000644000000000000000000000173214145213430020752 0ustar rootroot--TEST-- Test ImagickDraw, scale --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setStrokeWidth(4); $draw->setFillColor($fillColor); $draw->rectangle(200, 200, 300, 300); $draw->setFillColor($fillModifiedColor); $draw->scale(1.4, 1.4); $draw->rectangle(200, 200, 300, 300); $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } scale($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/197_ImagickDraw_roundRectangle_basic.phpt0000644000000000000000000000207614145213430022642 0ustar rootroot--TEST-- Test ImagickDraw, roundRectangle --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $draw->roundRectangle($startX, $startY, $endX, $endY, $roundX, $roundY); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } roundRectangle($strokeColor, $fillColor, $backgroundColor, $startX, $startY, $endX, $endY, $roundX, $roundY) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/198_ImagickDraw_setClipPath_basic.phpt0000644000000000000000000000201614145213430022101 0ustar rootroot--TEST-- Test ImagickDraw, setClipPath --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $clipPathName = 'testClipPath'; $draw->pushClipPath($clipPathName); $draw->rectangle(0, 0, 250, 250); $draw->popClipPath(); $draw->setClipPath($clipPathName); $draw->rectangle(100, 100, 400, 400); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setClipPath($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/199_ImagickDraw_setClipRule_basic.phpt0000644000000000000000000000255314145213430022123 0ustar rootroot--TEST-- Test ImagickDraw, setClipRule --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); //\Imagick::FILLRULE_EVENODD //\Imagick::FILLRULE_NONZERO $clipPathName = 'testClipPath'; $draw->pushClipPath($clipPathName); $draw->setClipRule(\Imagick::FILLRULE_EVENODD); $draw->rectangle(0, 0, 300, 500); $draw->rectangle(200, 0, 500, 500); $draw->popClipPath(); $draw->setClipPath($clipPathName); $draw->rectangle(200, 200, 300, 300); $clipRule = $draw->getClipRule(); if ($clipRule != \Imagick::FILLRULE_EVENODD) { echo "Failed to get correct clipRule $clipRule != \Imagick::FILLRULE_EVENODD \n"; } $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setClipRule($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/200_ImagickDraw_setClipUnits_basic.phpt0000644000000000000000000000222214145213430022266 0ustar rootroot--TEST-- Test ImagickDraw, setClipUnits --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $clipPathName = 'testClipPath'; $draw->setClipUnits(\Imagick::RESOLUTION_PIXELSPERINCH); $draw->pushClipPath($clipPathName); $draw->rectangle(0, 0, 250, 250); $draw->popClipPath(); $draw->setClipPath($clipPathName); //RESOLUTION_PIXELSPERINCH //RESOLUTION_PIXELSPERCENTIMETER $draw->rectangle(200, 200, 300, 300); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setClipUnits($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/201_ImagickDraw_setFillAlpha_basic.phpt0000644000000000000000000000164514145213430022221 0ustar rootroot--TEST-- Test ImagickDraw, setFillAlpha --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $draw->rectangle(100, 200, 200, 300); @$draw->setFillAlpha(0.4); $draw->rectangle(300, 200, 400, 300); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFillAlpha($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/202_ImagickDraw_setFillColor_basic.phpt0000644000000000000000000000165214145213430022251 0ustar rootroot--TEST-- Test ImagickDraw, setFillColor --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeWidth(1.5); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->rectangle(50, 50, 150, 150); $draw->setFillColor("rgb(200, 32, 32)"); $draw->rectangle(200, 50, 300, 150); $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFillColor($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/203_ImagickDraw_setFillRule_basic.phpt0000644000000000000000000000326214145213430022102 0ustar rootroot--TEST-- Test ImagickDraw, setFillRule --SKIPIF-- --FILE-- setStrokeWidth(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $fillRules = array(\Imagick::FILLRULE_NONZERO, \Imagick::FILLRULE_EVENODD); $points = 11; $size = 150; $draw->translate(175, 160); for ($x = 0; $x < 2; $x++) { $draw->setFillRule($fillRules[$x]); $draw->pathStart(); for ($n = 0; $n < $points * 2; $n++) { if ($n >= $points) { $angle = fmod($n * 360 * 4 / $points, 360) * pi() / 180; } else { $angle = fmod($n * 360 * 3 / $points, 360) * pi() / 180; } $positionX = $size * sin($angle); $positionY = $size * cos($angle); if ($n == 0) { $draw->pathMoveToAbsolute($positionX, $positionY); } else { $draw->pathLineToAbsolute($positionX, $positionY); } } $draw->pathClose(); $draw->pathFinish(); $draw->translate(325, 0); } $image = new \Imagick(); $image->newImage(700, 320, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFillRule($fillColor, $strokeColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/204_ImagickDraw_setFillOpacity_basic.phpt0000644000000000000000000000165614145213430022611 0ustar rootroot--TEST-- Test ImagickDraw, setFillOpacity --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeOpacity(1); $draw->setStrokeWidth(2); $draw->rectangle(100, 200, 200, 300); $draw->setFillOpacity(0.4); $draw->rectangle(300, 200, 400, 300); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFillOpacity($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/206_ImagickDraw_setFontSize_basic.phpt0000644000000000000000000000214214145213430022124 0ustar rootroot--TEST-- Test ImagickDraw, setFontSize --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $sizes = array(24, 36, 48, 60, 72); foreach ($sizes as $size) { $draw->setFontSize($size); $draw->annotation(50, ($size * $size / 16), "Lorem Ipsum!"); } $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFontSize($fillColor, $strokeColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/207_ImagickDraw_setFontFamily_basic.phpt0000644000000000000000000000263414145213430022442 0ustar rootroot--TEST-- Test ImagickDraw, setFontFamily --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); //TODO - actually use setFontFamily $draw->setStrokeWidth(2); $draw->setFontSize(24); $draw->annotation(50, 50, "Lorem Ipsum!"); $draw->setFontSize(36); $draw->annotation(50, 100, "Lorem Ipsum!"); $draw->setFontSize(48); $draw->annotation(50, 150, "Lorem Ipsum!"); $draw->setFontSize(60); $draw->annotation(50, 200, "Lorem Ipsum!"); $draw->setFontSize(72); $draw->annotation(50, 250, "Lorem Ipsum!"); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFontFamily($fillColor, $strokeColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/208_ImagickDraw_setFontStretch_basic.phpt0000644000000000000000000000261614145213430022636 0ustar rootroot--TEST-- Test ImagickDraw, setFontStretch --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(36); $fontStretchTypes = array(\Imagick::STRETCH_ULTRACONDENSED, \Imagick::STRETCH_CONDENSED, \Imagick::STRETCH_SEMICONDENSED, \Imagick::STRETCH_SEMIEXPANDED, \Imagick::STRETCH_EXPANDED, \Imagick::STRETCH_EXTRAEXPANDED, \Imagick::STRETCH_ULTRAEXPANDED, \Imagick::STRETCH_ANY); $offset = 0; foreach ($fontStretchTypes as $fontStretch) { $draw->setFontStretch($fontStretch); $draw->annotation(50, 75 + $offset, "Lorem Ipsum!"); $offset += 50; } $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFontStretch($fillColor, $strokeColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/209_ImagickDraw_setFontWeight_basic.phpt0000644000000000000000000000235414145213430022451 0ustar rootroot--TEST-- Test ImagickDraw, setFontWeight --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setFontSize(36); $draw->setFontWeight(100); $draw->annotation(50, 50, "Lorem Ipsum!"); $draw->setFontWeight(200); $draw->annotation(50, 100, "Lorem Ipsum!"); $draw->setFontWeight(400); $draw->annotation(50, 150, "Lorem Ipsum!"); $draw->setFontWeight(800); $draw->annotation(50, 200, "Lorem Ipsum!"); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFontWeight($fillColor, $strokeColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/210_ImagickDraw_setFontStyle_basic.phpt0000644000000000000000000000231414145213430022306 0ustar rootroot--TEST-- Test ImagickDraw, setFontStyle --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setFontSize(36); $draw->setFontStyle(\Imagick::STYLE_NORMAL); $draw->annotation(50, 50, "Lorem Ipsum!"); $draw->setFontStyle(\Imagick::STYLE_ITALIC); $draw->annotation(50, 100, "Lorem Ipsum!"); $draw->setFontStyle(\Imagick::STYLE_OBLIQUE); $draw->annotation(50, 150, "Lorem Ipsum!"); $imagick = new \Imagick(); $imagick->newImage(350, 300, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setFontStyle($fillColor, $strokeColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/211_ImagickDraw_setStrokeAntialias_basic.phpt0000644000000000000000000000177414145213430023466 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeAntialias --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setStrokeAntialias(false); $draw->line(100, 100, 400, 105); $draw->line(100, 140, 400, 185); $draw->setStrokeAntialias(true); $draw->line(100, 110, 400, 115); $draw->line(100, 150, 400, 195); $image = new \Imagick(); $image->newImage(500, 250, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeAntialias($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/212_ImagickDraw_setGravity_basic.phpt0000644000000000000000000000270314145213430022010 0ustar rootroot--TEST-- Test ImagickDraw, setGravity --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setFontSize(24); $gravitySettings = array(\Imagick::GRAVITY_NORTHWEST => 'NorthWest', \Imagick::GRAVITY_NORTH => 'North', \Imagick::GRAVITY_NORTHEAST => 'NorthEast', \Imagick::GRAVITY_WEST => 'West', \Imagick::GRAVITY_CENTER => 'Centre', \Imagick::GRAVITY_SOUTHWEST => 'SouthWest', \Imagick::GRAVITY_SOUTH => 'South', \Imagick::GRAVITY_SOUTHEAST => 'SouthEast', \Imagick::GRAVITY_EAST => 'East'); foreach ($gravitySettings as $type => $description) { $draw->setGravity($type); $draw->annotation(50, 50, '"' . $description . '"'); } $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setGravity($fillColor, $strokeColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/213_ImagickDraw_setStrokeAlpha_basic.phpt0000644000000000000000000000171714145213430022605 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeAlpha --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(4); $draw->line(100, 100, 400, 145); $draw->rectangle(100, 200, 225, 350); $draw->setStrokeOpacity(0.1); $draw->line(100, 120, 400, 165); $draw->rectangle(275, 200, 400, 350); $image = new \Imagick(); $image->newImage(500, 400, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeAlpha($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/214_ImagickDraw_setStrokeDashOffset_basic.phpt0000644000000000000000000000236014145213430023602 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeDashOffset --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(4); $draw->setStrokeDashArray(array(20, 20)); $draw->setStrokeDashOffset(0); $draw->rectangle(100, 50, 225, 175); //Start the dash effect halfway through the solid portion $draw->setStrokeDashOffset(10); $draw->rectangle(275, 50, 400, 175); //Start the dash effect on the space portion $draw->setStrokeDashOffset(20); $draw->rectangle(100, 200, 225, 350); $draw->setStrokeDashOffset(5); $draw->rectangle(275, 200, 400, 350); $image = new \Imagick(); $image->newImage(500, 400, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeDashOffset($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/215_ImagickDraw_setStrokeColor_basic.phpt0000644000000000000000000000172214145213430022634 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeColor --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(5); $draw->line(100, 100, 400, 145); $draw->rectangle(100, 200, 225, 350); $draw->setStrokeOpacity(0.1); $draw->line(100, 120, 400, 165); $draw->rectangle(275, 200, 400, 350); $image = new \Imagick(); $image->newImage(500, 400, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeColor($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/216_ImagickDraw_setStrokeDashArray_basic.phpt0000644000000000000000000000245614145213430023442 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeDashArray --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(4); $draw->setStrokeDashArray(array(10, 10)); $draw->rectangle(100, 50, 225, 175); $draw->setStrokeDashArray(array(20, 5, 20, 5, 5, 5,)); $draw->rectangle(275, 50, 400, 175); $draw->setStrokeDashArray(array(20, 5, 20, 5, 5)); $draw->rectangle(100, 200, 225, 350); $draw->setStrokeDashArray(array(1, 1, 1, 1, 2, 2, 3, 3, 5, 5, 8, 8, 13, 13, 21, 21, 34, 34, 55, 55, 89, 89, 144, 144, 233, 233, 377, 377, 610, 610, 987, 987, 1597, 1597, 2584, 2584, 4181, 4181,)); $draw->rectangle(275, 200, 400, 350); $image = new \Imagick(); $image->newImage(500, 400, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeDashArray($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/217_ImagickDraw_setStrokeMiterLimit_basic.phpt0000644000000000000000000000264414145213430023643 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeMiterLimit --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setStrokeOpacity(0.6); $draw->setFillColor($fillColor); $draw->setStrokeWidth(10); $yOffset = 100; $draw->setStrokeLineJoin(\Imagick::LINEJOIN_MITER); for ($y = 0; $y < 3; $y++) { $draw->setStrokeMiterLimit(40 * $y); $points = array( array('x' => 22 * 3, 'y' => 15 * 4 + $y * $yOffset), array('x' => 20 * 3, 'y' => 20 * 4 + $y * $yOffset), array('x' => 70 * 5, 'y' => 45 * 4 + $y * $yOffset), ); $draw->polygon($points); } $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $image->setImageType(\Imagick::IMGTYPE_PALETTE); //TODO - this should either be everywhere or nowhere $image->setImageCompressionQuality(100); $image->stripImage(); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeMiterLimit($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/218_ImagickDraw_setStrokeLineCap_basic.phpt0000644000000000000000000000210114145213430023064 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeLineCap --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(25); $lineTypes = array(\Imagick::LINECAP_BUTT, \Imagick::LINECAP_ROUND, \Imagick::LINECAP_SQUARE,); $offset = 0; foreach ($lineTypes as $lineType) { $draw->setStrokeLineCap($lineType); $draw->line(50 + $offset, 50, 50 + $offset, 250); $offset += 50; } $imagick = new \Imagick(); $imagick->newImage(300, 300, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeLineCap($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/219_ImagickDraw_setStrokeLineJoin_basic.phpt0000644000000000000000000000256014145213430023272 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeLineJoin --SKIPIF-- --FILE-- setStrokeWidth(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(20); $offset = 220; $lineJoinStyle = array(\Imagick::LINEJOIN_MITER, \Imagick::LINEJOIN_ROUND, \Imagick::LINEJOIN_BEVEL,); for ($x = 0; $x < count($lineJoinStyle); $x++) { $draw->setStrokeLineJoin($lineJoinStyle[$x]); $points = array( array('x' => 40 * 5, 'y' => 10 * 5 + $x * $offset), array('x' => 20 * 5, 'y' => 20 * 5 + $x * $offset), array('x' => 70 * 5, 'y' => 50 * 5 + $x * $offset), array('x' => 40 * 5, 'y' => 10 * 5 + $x * $offset), ); $draw->polyline($points); } $image = new \Imagick(); $image->newImage(500, 700, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeLineJoin($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/220_ImagickDraw_setStrokeOpacity_basic.phpt0000644000000000000000000000220114145213430023153 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeOpacity --SKIPIF-- --FILE-- setStrokeWidth(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(10); $draw->setStrokeOpacity(1); $draw->line(100, 80, 400, 125); $draw->rectangle(25, 200, 150, 350); $draw->setStrokeOpacity(0.5); $draw->line(100, 100, 400, 145); $draw->rectangle(200, 200, 325, 350); $draw->setStrokeOpacity(0.2); $draw->line(100, 120, 400, 165); $draw->rectangle(375, 200, 500, 350); $image = new \Imagick(); $image->newImage(550, 400, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeOpacity($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/221_ImagickDraw_setStrokeWidth_basic.phpt0000644000000000000000000000171214145213430022631 0ustar rootroot--TEST-- Test ImagickDraw, setStrokeWidth --SKIPIF-- --FILE-- setStrokeWidth(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->line(100, 100, 400, 145); $draw->rectangle(100, 200, 225, 350); $draw->setStrokeWidth(5); $draw->line(100, 120, 400, 165); $draw->rectangle(275, 200, 400, 350); $image = new \Imagick(); $image->newImage(500, 400, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setStrokeWidth($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/222_ImagickDraw_setTextAlignment_basic.phpt0000644000000000000000000000240414145213430023145 0ustar rootroot--TEST-- Test ImagickDraw, setTextAlignment --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setFontSize(36); $draw->setTextAlignment(\Imagick::ALIGN_LEFT); $draw->annotation(250, 75, "Lorem Ipsum!"); $draw->setTextAlignment(\Imagick::ALIGN_CENTER); $draw->annotation(250, 150, "Lorem Ipsum!"); $draw->setTextAlignment(\Imagick::ALIGN_RIGHT); $draw->annotation(250, 225, "Lorem Ipsum!"); $draw->line(250, 0, 250, 500); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setTextAlignment($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/223_ImagickDraw_setTextAntialias_basic.phpt0000644000000000000000000000230314145213430023133 0ustar rootroot--TEST-- Test ImagickDraw, setTextAntialias --SKIPIF-- --FILE-- setStrokeColor('none'); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setFontSize(32); $draw->setTextAntialias(false); $draw->annotation(5, 30, "Lorem Ipsum!"); $draw->setTextAntialias(true); $draw->annotation(5, 65, "Lorem Ipsum!"); $imagick = new \Imagick(); $imagick->newImage(220, 80, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); //Scale the image so that people can see the aliasing. $imagick->scaleImage(220 * 6, 80 * 6); $imagick->cropImage(640, 480, 0, 0); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setTextAntialias($fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/224_ImagickDraw_setTextUnderColor_basic.phpt0000644000000000000000000000220614145213430023305 0ustar rootroot--TEST-- Test ImagickDraw, setTextUnderColor --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->annotation(50, 75, "Lorem Ipsum!"); $draw->setTextUnderColor($textUnderColor); $draw->annotation(50, 175, "Lorem Ipsum!"); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setTextUnderColor($strokeColor, $fillColor, $backgroundColor, $textUnderColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/225_ImagickDraw_setTextDecoration_basic.phpt0000644000000000000000000000211414145213431023320 0ustar rootroot--TEST-- Test ImagickDraw, setTextDecoration --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $draw->setTextDecoration($textDecoration); $draw->annotation(50, 75, "Lorem Ipsum!"); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setTextDecoration($strokeColor, $fillColor, $backgroundColor, $textDecoration) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/226_ImagickDraw_setViewBox_basic.phpt0000644000000000000000000000245614145213431021761 0ustar rootroot--TEST-- Test ImagickDraw, setViewBox --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); /* Sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on. */ $draw->circle(250, 250, 250, 0); $draw->setviewbox(0, 0, 200, 200); $draw->circle(125, 250, 250, 250); $draw->translate(250, 125); $draw->circle(0, 0, 125, 0); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setViewBox($strokeColor, $fillColor, $backgroundColor) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/227_ImagickDraw_skewY_basic.phpt0000644000000000000000000000222014145213431020752 0ustar rootroot--TEST-- Test ImagickDraw, skewY --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setStrokeWidth(2); $draw->setFillColor($fillColor); $draw->rectangle($startX, $startY, $endX, $endY); $draw->setFillColor($fillModifiedColor); $draw->skewY($skew); $draw->rectangle($startX, $startY, $endX, $endY); $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } skewY($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, $startX, $startY, $endX, $endY, $skew); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/228_ImagickDraw_skewX_basic.phpt0000644000000000000000000000222414145213431020756 0ustar rootroot--TEST-- Test ImagickDraw, skewX --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setStrokeWidth(2); $draw->setFillColor($fillColor); $draw->rectangle($startX, $startY, $endX, $endY); $draw->setFillColor($fillModifiedColor); $draw->skewX($skew); $draw->rectangle($startX, $startY, $endX, $endY); $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } skewX($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, $startX, $startY, $endX, $endY, $skew); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/229_Tutorial_fxAnalyzeImage_case1.phpt0000644000000000000000000000456614145213431022131 0ustar rootroot--TEST-- Test Tutorial, fxAnalyzeImage --SKIPIF-- --FILE-- getImageWidth(); $sampleHeight = 20; $graphHeight = 128; $border = 2; $imageIterator = new \ImagickPixelIterator($imagick); $reds = array(); foreach ($imageIterator as $pixels) { /* Loop trough pixel rows */ foreach ($pixels as $pixel) { /* Loop through the pixels in the row (columns) */ /** @var $pixel \ImagickPixel */ $color = $pixel->getColor(); $reds[] = $color['r']; } $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */ } $draw = new \ImagickDraw(); $strokeColor = new \ImagickPixel('red'); $fillColor = new \ImagickPixel('none'); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(1); $draw->setFontSize(72); $draw->setStrokeAntiAlias(true); $x = 0; $points = array(); foreach ($reds as $red) { $pos = $graphHeight - ($red * $graphHeight / 256); $points[] = array('x' => $x, 'y' => $pos); $x += 1; } $draw->polyline($points); $plot = new \Imagick(); $plot->newImage($graphWidth, $graphHeight, 'white'); $plot->drawImage($draw); $outputImage = new \Imagick(); $outputImage->newImage($graphWidth, $graphHeight + $sampleHeight, 'white'); $outputImage->compositeimage($plot, \Imagick::COMPOSITE_ATOP, 0, 0); $imagick->resizeimage($imagick->getImageWidth(), $sampleHeight, \Imagick::FILTER_LANCZOS, 1); $outputImage->compositeimage($imagick, \Imagick::COMPOSITE_ATOP, 0, $graphHeight); $outputImage->borderimage('black', $border, $border); $outputImage->setImageFormat("png"); $bytes = $outputImage; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } $arguments = array(5, 1, 0.5); $imagick = new \Imagick(); $imagick->newPseudoImage(200, 200, 'gradient:black-white'); $imagick->functionImage(\Imagick::FUNCTION_POLYNOMIAL, $arguments); $imagick->setimageformat('png'); fxAnalyzeImage($imagick); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/234_Tutorial_edgeExtend_basic.phpt0000644000000000000000000000300214145213431021342 0ustar rootroot--TEST-- Test Tutorial, edgeExtend --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setImageVirtualPixelMethod($virtualPixelType); $imagick->scaleimage(400, 300, true); $imagick->setbackgroundcolor('pink'); $desiredWidth = 600; $originalWidth = $imagick->getImageWidth(); //Make the image be the desired width. $imagick->sampleimage($desiredWidth, $imagick->getImageHeight()); //Now scale, rotate, translate (aka affine project) it //to be how you want $points = array(//The x scaling factor is 0.5 when the desired width is double //the source width ($originalWidth / $desiredWidth), 0, //Don't scale vertically 0, 1, //Offset the image so that it's in the centre ($desiredWidth - $originalWidth) / 2, 0); $imagick->distortImage(\Imagick::DISTORTION_AFFINEPROJECTION, $points, false); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} //Fyi it may be easier to think of the affine transform by //how it works for a rotation: //$affineRotate = array( // "sx" => cos($angle), // "sy" => cos($angle), // "rx" => sin($angle), // "ry" => -sin($angle), // "tx" => 0, // "ty" => 0, //); } edgeExtend($virtualPixelType) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/235_ImagickDraw_translate_basic.phpt0000644000000000000000000000233414145213431021652 0ustar rootroot--TEST-- Test ImagickDraw, translate --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->rectangle($startX, $startY, $endX, $endY); $draw->setFillColor($fillModifiedColor); $draw->translate($translateX, $translateY); $draw->rectangle($startX, $startY, $endX, $endY); $image = new \Imagick(); $image->newImage(500, 500, $backgroundColor); $image->setImageFormat("png"); $image->drawImage($draw); $bytes = $image->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } translate($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, $startX, $startY, $endX, $endY, $translateX, $translateY); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/236_Imagick_identify_basic.phpt0000644000000000000000000000123614145213431020653 0ustar rootroot--TEST-- Test Imagick, identifyImage --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->setFormat('png'); $data = $imagick->identifyimage(); if (array_key_exists('geometry', $data)) { $geometry = $data['geometry']; if (array_key_exists('width', $geometry) && array_key_exists('height', $geometry)) { printf( "Image geometry %dx%d", $geometry['width'], $geometry['height'] ); exit(0); } } echo "Failed get geometry from identifyimage:\n"; var_dump($data); ?> --EXPECTF-- Image geometry 640x480imagick-3.6.0/tests/237_Tutorial_deconstructGif_basic.phpt0000644000000000000000000000377114145213431022271 0ustar rootroot--TEST-- Test Tutorial, deconstructGif --SKIPIF-- --FILE-- setFormat("gif"); $circleRadius = 20; $imageFrames = 6; $imageSize = 200; $background = new \Imagick(); $background->newpseudoimage($imageSize, $imageSize, "canvas:gray"); $blackWhite = new \Imagick(); $blackWhite->newpseudoimage($imageSize, $imageSize, "gradient:black-white"); $backgroundPalette = clone $background; $backgroundPalette->quantizeImage(240, \Imagick::COLORSPACE_RGB, 8, false, false); $blackWhitePalette = clone $blackWhite; $blackWhitePalette->quantizeImage(16, \Imagick::COLORSPACE_RGB, 8, false, false); $backgroundPalette->addimage($blackWhitePalette); for($count=0 ; $count<$imageFrames ; $count++) { echo "Frame: ".$count."\n"; $drawing = new \ImagickDraw(); $drawing->setFillColor('white'); $drawing->setStrokeColor('rgba(64, 64, 64, 0.8)'); $strokeWidth = 4; $drawing->setStrokeWidth($strokeWidth); $distanceToMove = $imageSize + (($circleRadius + $strokeWidth) * 2); $offset = ($distanceToMove * $count / ($imageFrames -1)) - ($circleRadius + $strokeWidth); $drawing->translate($offset, ($imageSize / 2) + ($imageSize / 3 * cos(20 * $count / $imageFrames))); $drawing->circle(0, 0, $circleRadius, 0); $frame = clone $background; $frame->drawimage($drawing); $frame->clutimage($backgroundPalette); $frame->setImageDelay(10); $aniGif->addImage($frame); } if ($deconstruct == true) { $aniGif = $aniGif->deconstructImages(); } $bytes = $aniGif->getImagesBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } makeSimpleGif($deconstruct) ; echo "Ok"; ?> --EXPECTF-- Frame: 0 Frame: 1 Frame: 2 Frame: 3 Frame: 4 Frame: 5 Okimagick-3.6.0/tests/239_Tutorial_gradientReflection_basic.phpt0000644000000000000000000000251114145213431023107 0ustar rootroot--TEST-- Test Tutorial, gradientReflection --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $reflection = clone $im; $reflection->flipImage(); $reflection->cropImage($im->getImageWidth(), $im->getImageHeight() * 0.75, 0, 0); $gradient = new \Imagick(); $gradient->newPseudoImage( $reflection->getImageWidth(), $reflection->getImageHeight(), //Putting spaces in the rgba string is bad 'gradient:rgba(255,0,255,0.6)-rgba(255,255,0,0.99)' ); $reflection->compositeimage( $gradient, \Imagick::COMPOSITE_DSTOUT, 0, 0 ); $canvas = new \Imagick(); $canvas->newImage($im->getImageWidth(), $im->getImageHeight() * 1.75, new \ImagickPixel('rgba(255, 255, 255, 0)')); $canvas->compositeImage($im, \Imagick::COMPOSITE_BLEND, 0, 0); $canvas->setImageFormat('png'); $canvas->compositeImage($reflection, \Imagick::COMPOSITE_BLEND, 0, $im->getImageHeight()); $canvas->stripImage(); $canvas->setImageFormat('png'); header('Content-Type: image/png'); $bytes = $canvas; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } gradientReflection() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/240_Tutorial_imagickCompositeGen_basic.phpt0000644000000000000000000001027114145213431023212 0ustar rootroot--TEST-- Test Tutorial, imagickCompositeGen --SKIPIF-- --FILE-- newPseudoImage($height, $overlap, 'gradient:black-white'); $quantum = $imagick->getQuantum(); $imagick->sigmoidalContrastImage(true, $contrast, $midpoint * $quantum); return $imagick; } function mergeImages($outputSize, $overlap, $contrast = 10, $blendMidpoint = 0.5, $horizontal = true) { $images = array(); $newImageWidth = 0; $newImageHeight = 0; if ($horizontal == true) { $resizeWidth = 0; $resizeHeight = $outputSize; } else { $resizeWidth = $outputSize; $resizeHeight = 0; } $blendWidth = 0; $srcImages = array(1, 2, 3); foreach ($srcImages as $srcImage) { $nextImage = new \Imagick(); $nextImage->newPseudoImage(640, 480, "magick:logo"); $nextImage->resizeImage($resizeWidth, $resizeHeight, \Imagick::FILTER_LANCZOS, 0.5); if ($horizontal == true) { $newImageWidth += $nextImage->getImageWidth(); $blendWidth = $nextImage->getImageHeight(); } else { //$newImageWidth = $nextImage->getImageWidth(); $blendWidth = $nextImage->getImageWidth(); $newImageHeight += $nextImage->getImageHeight(); } $images[] = $nextImage; } if ($horizontal == true) { $newImageWidth -= $overlap * (count($srcImages) - 1); $newImageHeight = $outputSize; } else { $newImageWidth = $outputSize; $newImageHeight -= $overlap * (count($srcImages) - 1); } if ($blendWidth == 0) { throw new \Exception("Failed to read source images"); } $fadeLeftSide = generateBlendImage($blendWidth, $overlap, $contrast, $blendMidpoint); if ($horizontal == true) { //We are placing the images horizontally. $fadeLeftSide->rotateImage('black', -90); } //Fade out the left part - need to negate the mask to //make math correct $fadeRightSide = clone $fadeLeftSide; $fadeRightSide->negateimage(false); //Create a new canvas to render everything in to. $canvas = new \Imagick(); $canvas->newImage($newImageWidth, $newImageHeight, new \ImagickPixel('black')); $count = 0; $imagePositionX = 0; $imagePositionY = 0; /** @var $image \Imagick */ foreach ($images as $image) { $finalBlending = new \Imagick(); $finalBlending->newImage($image->getImageWidth(), $image->getImageHeight(), 'white'); if ($count != 0) { $finalBlending->compositeImage($fadeLeftSide, \Imagick::COMPOSITE_ATOP, 0, 0); } $offsetX = 0; $offsetY = 0; if ($horizontal == true) { $offsetX = $image->getImageWidth() - $overlap; } else { $offsetY = $image->getImageHeight() - $overlap; } if ($count != count($images) - 1) { $finalBlending->compositeImage($fadeRightSide, \Imagick::COMPOSITE_ATOP, $offsetX, $offsetY); } $image->compositeImage($finalBlending, \Imagick::COMPOSITE_COPYOPACITY, 0, 0); $canvas->compositeimage($image, \Imagick::COMPOSITE_BLEND, $imagePositionX, $imagePositionY); if ($horizontal == true) { $imagePositionX = $imagePositionX + $image->getImageWidth() - $overlap; } else { $imagePositionY = $imagePositionY + $image->getImageHeight() - $overlap; } $count++; } return $canvas; } function imagickCompositeGen($contrast = 10, $blendMidpoint = 0.5) { $size = 160; //Load the images $output = mergeImages( $size, 0.2 * $size, //overlap $contrast, $blendMidpoint, true); //$output = generateBlendImage(200, 200, 5, 0.5); $output->setImageFormat('png'); $bytes = $output->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } imagickCompositeGen($contrast = 10, $blendMidpoint = 0.5) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/241_Tutorial_psychedelicFont_basic.phpt0000644000000000000000000000224514145213431022417 0ustar rootroot--TEST-- Test Tutorial, psychedelicFont --SKIPIF-- --FILE-- setStrokeOpacity(1); $draw->setFillColor('black'); $draw->setfontsize(150); for ($strokeWidth = 25; $strokeWidth > 0; $strokeWidth--) { $hue = intval(170 + $strokeWidth * 360 / 25); $draw->setStrokeColor("hsl($hue, 255, 128)"); $draw->setStrokeWidth($strokeWidth * 3); $draw->annotation(60, 165, $name); } //Create an image object which the draw commands can be rendered into $imagick = new \Imagick(); $imagick->newImage(650, 230, "#eee"); $imagick->setImageFormat("png"); //Render the draw commands in the ImagickDraw object //into the image. $imagick->drawImage($draw); //Send the image to the browser $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } psychedelicFont() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/242_Tutorial_levelizeImage_basic.phpt0000644000000000000000000000177314145213431022064 0ustar rootroot--TEST-- Test Tutorial, levelizeImage --SKIPIF-- --FILE-- newPseudoimage(300, 300, 'gradient:black-white'); $maxQuantum = $imagick->getQuantum(); $imagick->evaluateimage(\Imagick::EVALUATE_POW, 1 / $gamma); //Adjust the scale from black to white to the new 'distance' between black and white $imagick->evaluateimage(\Imagick::EVALUATE_MULTIPLY, ($whitePoint - $blackPoint) / 100 ); //Add move the black point to it's new value $imagick->evaluateimage(\Imagick::EVALUATE_ADD, ($blackPoint / 100) * $maxQuantum); $imagick->setFormat("png"); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } levelizeImage($blackPoint, $gamma, $whitePoint) ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/243_Tutorial_svgExample_basic.phpt0000644000000000000000000000251614145213431021412 0ustar rootroot--TEST-- Test Tutorial, svgExample --SKIPIF-- --FILE-- END; $svg = ' '; $image = new \Imagick(); $image->readImageBlob($svg); $image->setImageFormat("jpg"); $bytes = $image; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } svgExample() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/244_Tutorial_psychedelicFontGif_basic.phpt0000644000000000000000000000364114145213431023051 0ustar rootroot--TEST-- Test Tutorial, psychedelicFontGif --SKIPIF-- --FILE-- setFormat("gif"); $maxFrames = 11; $scale = 0.25; for ($frame = 0; $frame < $maxFrames; $frame++) { $draw = new \ImagickDraw(); setFontForImagickDraw($draw); $draw->setStrokeOpacity(1); $draw->setfontsize(150 * $scale); for ($strokeWidth = 25; $strokeWidth > 0; $strokeWidth--) { $hue = intval(fmod(($frame * 360 / $maxFrames) + 170 + $strokeWidth * 360 / 25, 360)); $color = "hsl($hue, 255, 128)"; $draw->setStrokeColor($color); $draw->setFillColor($color); $draw->setStrokeWidth($strokeWidth * 3 * $scale); $draw->annotation((int)(60 * $scale), (int)(165 * $scale), $name); } $draw->setStrokeColor('none'); $draw->setFillColor('black'); $draw->setStrokeWidth(0); $draw->annotation(60 * $scale, 165 * $scale, $name); //Create an image object which the draw commands can be rendered into $imagick = new \Imagick(); $imagick->newImage((int)(650 * $scale), (int)(230 * $scale), "#eee"); $imagick->setImageFormat("png"); //Render the draw commands in the ImagickDraw object //into the image. $imagick->drawImage($draw); $imagick->setImageDelay(5); $aniGif->addImage($imagick); $imagick->destroy(); } $aniGif->setImageIterations(0); //loop forever $aniGif->deconstructImages(); $bytes = $aniGif->getImagesBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } psychedelicFontGif($name = 'Danack') ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/245_Tutorial_screenEmbed_basic.phpt0000644000000000000000000000212614145213431021512 0ustar rootroot--TEST-- Test Tutorial, screenEmbed --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $overlay = new \Imagick(); $overlay->newPseudoImage(640, 480, "magick:logo"); $overlay->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT); $width = $overlay->getImageWidth(); $height = $overlay->getImageHeight(); $offset = 332.9; $points = array( 0, 0, 364 - $offset, 51, $width, 0, 473.4 - $offset, 23, 0, $height, 433.5 - $offset, 182, $width, $height, 523 - $offset, 119.4 ); $overlay->modulateImage(97, 100, 0); $overlay->distortImage(\Imagick::DISTORTION_PERSPECTIVE, $points, true); $imagick->compositeImage($overlay, \Imagick::COMPOSITE_OVER, (int)(364.5 - $offset), 23); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } screenEmbed() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/246_antialias_image.phpt0000644000000000000000000000067614145213431017372 0ustar rootroot--TEST-- Test pseudo formats --SKIPIF-- --FILE-- newPseudoImage(10, 10, "magick:logo"); //On by default var_export($im->getAntiAlias()); echo PHP_EOL; //Turn off $im->setAntiAlias(false); var_export($im->getAntiAlias()); echo PHP_EOL; //Turn back on $im->setAntiAlias(true); var_export($im->getAntiAlias()); echo PHP_EOL; ?> --EXPECTF-- true false trueimagick-3.6.0/tests/247_ImagickPixelIterator_construct_basic.phpt0000644000000000000000000000173014145213431023601 0ustar rootroot--TEST-- Test ImagickPixelIterator, construct --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = new \ImagickPixelIterator($imagick); /* Loop through pixel rows */ foreach ($imageIterator as $pixels) { /* Loop through the pixels in the row (columns) */ foreach ($pixels as $column => $pixel) { /** @var $pixel \ImagickPixel */ if ($column % 2) { /* Paint every second pixel black*/ $pixel->setColor("rgba(0, 0, 0, 0)"); } } /* Sync the iterator, this is important to do on each iteration */ $imageIterator->syncIterator(); } $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } construct() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/248_ImagickPixelIterator_clear_basic.phpt0000644000000000000000000000177014145213431022650 0ustar rootroot--TEST-- Test ImagickPixelIterator, clear --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = $imagick->getPixelRegionIterator(100, 100, 250, 200); /* Loop trough pixel rows */ foreach ($imageIterator as $pixels) { /** @var $pixel \ImagickPixel */ /* Loop through the pixels in the row (columns) */ foreach ($pixels as $column => $pixel) { if ($column % 2) { /* Paint every second pixel black*/ $pixel->setColor("rgba(0, 0, 0, 0)"); } } /* Sync the iterator, this is important to do on each iteration */ $imageIterator->syncIterator(); } $imageIterator->clear(); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } clear() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/249_ImagickPixelIterator_getNextIteratorRow_basic.phpt0000644000000000000000000000212614145213431025377 0ustar rootroot--TEST-- Test ImagickPixelIterator, getNextIteratorRow --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = $imagick->getPixelIterator(); $count = 0; while ($pixels = $imageIterator->getNextIteratorRow()) { if (($count % 3) == 0) { /* Loop through the pixels in the row (columns) */ foreach ($pixels as $column => $pixel) { /** @var $pixel \ImagickPixel */ if ($column % 2) { /* Paint every second pixel black*/ $pixel->setColor("rgba(0, 0, 0, 0)"); } } /* Sync the iterator, this is important to do on each iteration */ $imageIterator->syncIterator(); } $count += 1; } $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } getNextIteratorRow() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/250_ImagickPixelIterator_resetIterator_basic.phpt0000644000000000000000000000320414145213431024401 0ustar rootroot--TEST-- Test ImagickPixelIterator, resetIterator --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = $imagick->getPixelIterator(); /* Loop trough pixel rows */ foreach ($imageIterator as $pixels) { /* Loop through the pixels in the row (columns) */ foreach ($pixels as $column => $pixel) { /** @var $pixel \ImagickPixel */ if ($column % 2) { /* Make every second pixel 25% red*/ $pixel->setColorValue(\Imagick::COLOR_RED, 64); } } /* Sync the iterator, this is important to do on each iteration */ $imageIterator->syncIterator(); } $imageIterator->resetiterator(); /* Loop trough pixel rows */ foreach ($imageIterator as $pixels) { /* Loop through the pixels in the row (columns) */ foreach ($pixels as $column => $pixel) { /** @var $pixel \ImagickPixel */ if ($column % 3) { $pixel->setColorValue(\Imagick::COLOR_BLUE, 64); /* Make every second pixel a little blue*/ //$pixel->setColor("rgba(0, 0, 128, 0)"); /* Paint every second pixel black*/ } } $imageIterator->syncIterator(); /* Sync the iterator, this is important to do on each iteration */ } $imageIterator->clear(); $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } resetIterator() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/251_ImagickPixelIterator_setIteratorRow_basic.phpt0000644000000000000000000000200114145213431024535 0ustar rootroot--TEST-- Test ImagickPixelIterator, setIteratorRow --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = $imagick->getPixelRegionIterator(200, 100, 200, 200); for ($x = 0; $x < 20; $x++) { $imageIterator->setIteratorRow($x * 5); $pixels = $imageIterator->getCurrentIteratorRow(); /* Loop through the pixels in the row (columns) */ foreach ($pixels as $pixel) { /** @var $pixel \ImagickPixel */ /* Paint every second pixel black*/ $pixel->setColor("rgba(0, 0, 0, 0)"); } /* Sync the iterator, this is important to do on each iteration */ $imageIterator->syncIterator(); } $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setIteratorRow() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/252_ImagickPixelIterator_construct_basic.phpt0000644000000000000000000000173014145213431023575 0ustar rootroot--TEST-- Test ImagickPixelIterator, construct --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imageIterator = new \ImagickPixelIterator($imagick); /* Loop through pixel rows */ foreach ($imageIterator as $pixels) { /* Loop through the pixels in the row (columns) */ foreach ($pixels as $column => $pixel) { /** @var $pixel \ImagickPixel */ if ($column % 2) { /* Paint every second pixel black*/ $pixel->setColor("rgba(0, 0, 0, 0)"); } } /* Sync the iterator, this is important to do on each iteration */ $imageIterator->syncIterator(); } $bytes = $imagick; if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } construct() ; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/064_cropThumbNailImage.phpt0000644000000000000000000000367314145213431017773 0ustar rootroot--TEST-- Test for round issues --SKIPIF-- --FILE-- newPseudoImage($imageWidth, $imageHeight, 'xc:white'); $imagick->cropThumbnailImage( $desired_width, $desired_height, $legacy ); $error = false; $thumbnailImageWidth = $imagick->getImageWidth(); $thumbnailImageHeight = $imagick->getImageHeight(); if ($thumbnailImageHeight != $desired_height) { echo "Incorrect height for desired_width $desired_width imageHeight $imageHeight".PHP_EOL; $error = true; } $expectedWidth = $desired_width; $expectedHeight = $desired_height; if ($legacy == true && $desired_width == 250 && $desired_height == 250) { // Thumbnail size of 249 x 250 does not matched desired size 250 x 250 for source image of 1128 x 1128 $expectedWidth = 249; } if ($thumbnailImageWidth != $expectedWidth) { echo "Incorrect width for desired_width $desired_width imageHeight $imageHeight".PHP_EOL; $error = true; } if ($thumbnailImageHeight != $expectedHeight) { echo "Incorrect width for desired_width $desired_width imageHeight $imageHeight".PHP_EOL; $error = true; } if ($error) { printf( "Thumbnail size of %d x %d does not matched expected size %d x %d for source image of %d x %d. Legacy is %d\n", $thumbnailImageWidth, $thumbnailImageHeight, $desired_width, $desired_height, $imageWidth, $imageHeight, $legacy ); } } } echo "Done" . PHP_EOL; ?> --EXPECTF-- Doneimagick-3.6.0/tests/253_getHdri.phpt0000644000000000000000000000062414145213431015640 0ustar rootroot--TEST-- Test ImagickPixelIterator, construct --SKIPIF-- --FILE-- --EXPECTF-- Okimagick-3.6.0/tests/254_getConfigureOptions.phpt0000644000000000000000000001044514145213431020252 0ustar rootroot--TEST-- Test Imagick::getConfigureOptions --SKIPIF-- --FILE-- // string(3) "gcc" // ["CFLAGS"]=> // string(186) "-I/usr/include/libxml2 -I/usr/include/libpng16 -I/usr/include/freetype2 -fopenmp -Wall -g -O2 -mtune=core2 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16" // ["CODER_PATH"]=> // string(56) "/usr/local/lib/ImageMagick-7.0.11/modules-Q16HDRI/coders" // ["CONFIGURE"]=> // string(155) "./configure '--with-quantum-depth=16' '--with-magick-plus-plus=no' '--without-perl' '--disable-static' '--disable-docs' '--with-jpeg=yes' '--with-png=yes'" // ["CONFIGURE_PATH"]=> // string(29) "/usr/local/etc/ImageMagick-7/" // ["COPYRIGHT"]=> // string(46) "Copyright (C) 1999-2021 ImageMagick Studio LLC" // ["CPPFLAGS"]=> // string(34) "-I/usr/local/include/ImageMagick-7" // ["CXX"]=> // string(3) "g++" // ["CXXFLAGS"]=> // string(9) " -pthread" // ["DEFS"]=> // string(15) "-DHAVE_CONFIG_H" // ["DELEGATES"]=> // string(33) "freetype jng jpeg png ps xml zlib" // ["DISTCHECK_CONFIG_FLAGS"]=> // string(217) " --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-umem=no --with-autotrace=no --with-fftw=no --with-gslib=no --with-fontpath= --with-jxl=no --with-rsvg=no --with-wmf=no --with-perl=no " // ["DOCUMENTATION_PATH"]=> // string(34) "/usr/local/share/doc/ImageMagick-7" // ["EXEC-PREFIX"]=> // string(10) "/usr/local" // ["EXECUTABLE_PATH"]=> // string(14) "/usr/local/bin" // ["FEATURES"]=> // string(22) "DPC HDRI Cipher OpenMP" // ["FILTER_PATH"]=> // string(57) "/usr/local/lib/ImageMagick-7.0.11/modules-Q16HDRI/filters" // ["GIT_REVISION"]=> // string(24) "18571:309fcfa1c:20210328" // ["HOST"]=> // string(19) "x86_64-pc-linux-gnu" // ["INCLUDE_PATH"]=> // string(32) "/usr/local/include/ImageMagick-7" // ["LDFLAGS"]=> // string(17) "-L/usr/local/lib " // ["LIB_VERSION"]=> // string(5) "0x70B" // ["LIB_VERSION_NUMBER"]=> // string(8) "7,0,11,6" // ["LIBRARY_PATH"]=> // string(33) "/usr/local/lib/ImageMagick-7.0.11" // ["LIBS"]=> // string(96) " -lfreetype -ljpeg -lpng16 -lxml2 -lz -lm -lpthread -lgomp" // ["MAGICK_TEMPORARY_PATH"]=> // string(4) "/tmp" // ["NAME"]=> // string(11) "ImageMagick" // ["PCFLAGS"]=> // string(65) "-fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16" // ["PREFIX"]=> // string(10) "/usr/local" // ["QuantumDepth"]=> // string(2) "16" // ["RELEASE_DATE"]=> // string(10) "2021-03-28" // ["SHARE_PATH"]=> // string(30) "/usr/local/share/ImageMagick-7" // ["SHAREARCH_PATH"]=> // string(48) "/usr/local/lib/ImageMagick-7.0.11/config-Q16HDRI" // ["TARGET_CPU"]=> // string(6) "x86_64" // ["TARGET_OS"]=> // string(9) "linux-gnu" // ["TARGET_VENDOR"]=> // string(2) "pc" // ["VERSION"]=> // string(6) "7.0.11" // ["WEBSITE"]=> // string(23) "https://imagemagick.org" //} // Examples of output on nixos //array(5) { // ["DELEGATES"]=> // string(102) "bzlib cairo djvu fontconfig freetype heic jng jp2 jpeg lcms lzma openexr png rsvg tiff webp x xml zlib" // ["FEATURES"]=> // string(28) "Cipher DPC HDRI OpenMP(4.5) " // ["MAGICK_TEMPORARY_PATH"]=> // string(4) "/tmp" // ["NAME"]=> // string(11) "ImageMagick" // ["QuantumDepth"]=> // string(3) "Q16" //} if (!(count($optionsStartingWithC) < count($allOptions))) { echo ""; var_dump($optionsStartingWithC); var_dump($allOptions); } foreach ($optionsStartingWithC as $key => $value) { $key = strtolower($key); if (stripos($key, "q") !== 0) { echo "key $key does not start with c".PHP_EOL; } } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/255_getFeatures.phpt0000644000000000000000000000047614145213431016537 0ustar rootroot--TEST-- Test Imagick::getfeatures --SKIPIF-- --FILE-- --EXPECTF-- Okimagick-3.6.0/tests/256_Imagick_exportImagePixels_basic.phpt0000644000000000000000000000323114145213431022510 0ustar rootroot--TEST-- Test Imagick, Imagick::exportImagePixels --SKIPIF-- --FILE-- newPseudoImage(256, 256, "gradient:black-white"); $pixelTypes = array( Imagick::PIXEL_CHAR => function($v) { return $v / 255; } , Imagick::PIXEL_DOUBLE => function($v) { return $v; } , Imagick::PIXEL_FLOAT => function($v) { return $v; } , Imagick::PIXEL_LONG => function($v) { return $v / 4294967295; }, Imagick::PIXEL_QUANTUM => function($v) { return $v / Imagick::getQuantum(); } , Imagick::PIXEL_SHORT => function($v) { return $v / 65535; } , // This is not supported as ints close to 64bits are weird in PHP // Imagick::PIXEL_LONGLONG => function($v) { return $v / (2 << 64 -1 ); } , ); $v = Imagick::getVersion(); if ($v['versionNumber'] < 0x700) { //This test will probably fail on 32bit platforms. If you see this please //submit a PR that fixes the problem. $pixelTypes[Imagick::PIXEL_INTEGER] = function($v) { return $v / 4294967295; }; } foreach ($pixelTypes as $pixelType => $scaleFn) { try { $pixels = $imagick->exportImagePixels(0, 0, 1, 256, "R", $pixelType); for ($i = 0; $i<10 ; $i++) { $expectedValue = $i / 255; $scaledActualValue = $scaleFn($pixels[$i]); if (abs($expectedValue - $scaledActualValue) > 0.0001) { echo "pixel type $pixelType has incorrect values. They should be 0/255, 1/255, 2/255... 255/255 or the scaled equivalent\n"; var_dump($pixels); break; } } } catch (\Exception $e) { echo "Exception caught for pixelType: $pixelType "; echo $e->getMessage(); } } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/257_Imagick_setImageChannelMask_basic.phpt0000644000000000000000000000161314145213431022705 0ustar rootroot--TEST-- Test Imagick, Imagick::exportImagePixels --SKIPIF-- --FILE-- newPseudoImage(256, 256, "gradient:black-white"); $initialMask = $imagick->setImageChannelMask(\Imagick::CHANNEL_RED); $imagick->brightnessContrastImage(-20, 20); $imagick->setImageFormat("png"); $imagick->writeImage(__DIR__ . "/maskTest.png"); $redMask = $imagick->setImageChannelMask(\Imagick::CHANNEL_DEFAULT); if ($initialMask != \Imagick::CHANNEL_DEFAULT) { echo "initialMask is not equal to \Imagick::CHANNEL_DEFAULT but instead is $initialMask\n"; } if ($redMask != \Imagick::CHANNEL_RED) { echo "redMask is not equal to \Imagick::CHANNEL_RED but instead is $redMask\n"; } echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/258_Imagick_evaluateImages_basic.phpt0000644000000000000000000000132014145213431021772 0ustar rootroot--TEST-- Test Imagick, Imagick::evaluateImages --SKIPIF-- --FILE-- newPseudoImage(256, 256, "gradient:black-white"); $imagick2 = new \Imagick(); $imagick2->newPseudoImage(256, 256, "gradient:red-white"); $imagick->addImage($imagick2); $imagick->setImageFormat('png'); $imagick->setIteratorIndex(0); $evaluated = $imagick->evaluateImages(\Imagick::EVALUATE_MEAN); $evaluated->setImageFormat('png'); // $evaluated->writeImage("./evaluateTest.png"); $data = $evaluated->getImageBlob(); if (strlen($data) < 50) { echo "Image data seems too short."; } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/259_Imagick_colorPoints_basic.phpt0000644000000000000000000000320714145213431021360 0ustar rootroot--TEST-- Test Imagick, Imagick::evaluateImages --SKIPIF-- --FILE-- 0.0000001) { echo "Unexpected value of $value for check $count\n"; } $count++; } $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $imagick->setImageFormat('png'); $v = Imagick::getVersion(); if ($v['versionNumber'] < 0x700) { $imagick->setImageRedPrimary(0.5, 0.5); $imagick->setImageGreenPrimary(0.5, 0.5); $imagick->setImageBluePrimary(0.5, 0.5); $imagick->setImageWhitePoint(0.5, 0.5); $color = $imagick->getImageRedPrimary(); im_check($color['x']);im_check($color['y']); $color = $imagick->getImageGreenPrimary(); im_check($color['x']);im_check($color['y']); $color = $imagick->getImageBluePrimary(); im_check($color['x']);im_check($color['y']); $color = $imagick->getImageWhitePoint(); im_check($color['x']);im_check($color['y']); } else { $imagick->setImageRedPrimary(0.5, 0.5, 0.5); $imagick->setImageGreenPrimary(0.5, 0.5, 0.5); $imagick->setImageBluePrimary(0.5, 0.5, 0.5); $imagick->setImageWhitePoint(0.5, 0.5, 0.5); $color = $imagick->getImageRedPrimary(); im_check($color['x']);im_check($color['y']);im_check($color['z']); $color = $imagick->getImageGreenPrimary(); im_check($color['x']);im_check($color['y']);im_check($color['z']); $color = $imagick->getImageBluePrimary(); im_check($color['x']);im_check($color['y']);im_check($color['z']); $color = $imagick->getImageWhitePoint(); im_check($color['x']);im_check($color['y']);im_check($color['z']); } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/260_localContrastImage.phpt0000644000000000000000000000045514145213431020025 0ustar rootroot--TEST-- Test localContrastImage --SKIPIF-- --FILE-- localContrastImage(2, 2); echo "Ok"; ?> --EXPECT-- Okimagick-3.6.0/tests/261_compositeImageGravity.phpt0000644000000000000000000000144614145213431020567 0ustar rootroot--TEST-- Test compositeImageGravity --SKIPIF-- = 0x660 && $v ['versionNumber'] < 0x670) // die ('skip seems to be broken in this version of ImageMagick'); ?> --FILE-- scaleImage( $im2->getImageWidth() / 2, $im2->getImageHeight() / 2 ); $im1->compositeImageGravity( $im2, \Imagick::COMPOSITE_ATOP, \Imagick::GRAVITY_NORTHEAST ); $im1->compositeImageGravity( $im2, \Imagick::COMPOSITE_ATOP, \Imagick::GRAVITY_SOUTH ); // $im1->setImageFormat('png'); // $im1->writeImage('compositeImageGravity.png'); echo "Ok"; ?> --EXPECT-- Okimagick-3.6.0/tests/262_autoOrient.phpt0000644000000000000000000000065314145213431016405 0ustar rootroot--TEST-- Test autoOrient --SKIPIF-- = 0x660 && $v ['versionNumber'] < 0x670) // die ('skip seems to be broken in this version of ImageMagick'); ?> --FILE-- autoOrient(); echo "Ok"; ?> --EXPECT-- Okimagick-3.6.0/tests/263_autoGammaImage.phpt0000644000000000000000000000051714145213431017132 0ustar rootroot--TEST-- Test autoGammaImage --SKIPIF-- --FILE-- autoGammaImage(); $im = new Imagick("magick:logo"); $im->autoGammaImage(\Imagick::CHANNEL_RED); echo "Ok"; ?> --EXPECT-- Okimagick-3.6.0/tests/264_ImagickDraw_getTextDirection_basic.phpt0000644000000000000000000000273314145213431023147 0ustar rootroot--TEST-- Test ImagickDraw, getTextDirection --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(56); $directions = array( \Imagick::DIRECTION_LEFT_TO_RIGHT, \Imagick::DIRECTION_RIGHT_TO_LEFT, \Imagick::DIRECTION_LEFT_TO_RIGHT, ); $i = 0; foreach ($directions as $directionToSet) { $draw->setTextDirection($directionToSet); $directionReturned = $draw->getTextDirection(); if ($directionReturned != $directionToSet) { echo "Direction error for $i \n"; } $position = 36; if ($directionToSet == \Imagick::DIRECTION_RIGHT_TO_LEFT) { $position = 500 - 36; } $draw->annotation($position, (72 * $i) + 64, "Lorem Ipsum!"); $i++; } $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} $imagick->writeImage(__DIR__ . '/directionTest.png'); echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/265_ImagickDraw_getOpacity_basic.phpt0000644000000000000000000000204214145213431021764 0ustar rootroot--TEST-- Test ImagickDraw, getOpacity --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $opacityToSet = 0.1; $draw->setOpacity($opacityToSet); $opacity = $draw->getOpacity(); $delta = abs($opacity - $opacityToSet); if ($delta > 0.0001) { echo "Failed to get correct opacity, it should be $opacityToSet but got $opacity, which is a delta of $delta\n"; } $draw->line(125, 70, 100, 50); $draw->line(350, 170, 100, 150); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/266_ImagickDraw_getFontResolution_basic.phpt0000644000000000000000000000347414145213431023361 0ustar rootroot--TEST-- Test ImagickDraw, getFontResolution --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $fontResolution = $draw->getFontResolution(); if (isset($fontResolution["x"]) == false || isset($fontResolution["y"]) == false) { echo "$fontResolution doesn't contain expected values:\n"; var_dump($fontResolution); } if ($fontResolution["x"] < 8 || $fontResolution["x"] > 100) { echo "Font resolution x outside expected range: ".$fontResolution["x"]."\n"; } if ($fontResolution["y"] < 8 || $fontResolution["y"] > 100) { echo "Font resolution y outside expected range: ".$fontResolution["y"]."\n"; } $resolutionToSet = 36; $draw->setFontResolution($resolutionToSet, $resolutionToSet); $fontResolution = $draw->getFontResolution(); if (abs($fontResolution["x"] - $resolutionToSet) > 0.0001) { echo "Font resolution x after set is not $resolutionToSet instead: ".$fontResolution["x"]."\n"; } if (abs($fontResolution["y"] - $resolutionToSet) > 0.0001) { echo "Font resolution y after set is not $resolutionToSet instead: ".$fontResolution["y"]."\n"; } $draw->line(125, 70, 100, 50); $draw->annotation(50, 32, "Lorem Ipsum!"); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/267_ImagickDraw_getBorderColor_basic.phpt0000644000000000000000000000220714145213431022575 0ustar rootroot--TEST-- Test ImagickDraw, getBorderColor --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $opacityToSet = 0.1; $borderColor = $draw->getBorderColor(); //var_dump($borderColor->getColor()); $draw->setBorderColor("red"); $borderColor = $draw->getBorderColor(); $borderColorElements = $borderColor->getColor(); if ($borderColorElements["r"] != 255 || $borderColorElements["g"] != 0 || $borderColorElements["b"] != 0) { echo "Wrong colors after set."; } $draw->line(125, 70, 100, 50); $draw->line(350, 170, 100, 150); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/268_ImagickDraw_getDensity_basic.phpt0000644000000000000000000000204314145213431021777 0ustar rootroot--TEST-- Test ImagickDraw, getDensity --SKIPIF-- --XFAIL-- Expected behaviour is not known :-p --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(72); $opacityToSet = 0.1; $densitySet = "200"; $draw->setDensity($densitySet); $densityGet = $draw->getDensity(); if (strcmp($densitySet, $densityGet) !== 0) { echo "Density retrieved [$densityGet] is not the value set [$densitySet]."; } $draw->line(125, 70, 100, 50); $draw->line(350, 170, 100, 150); $imagick = new \Imagick(); $imagick->newImage(500, 500, $backgroundColor); $imagick->setImageFormat("png"); $imagick->drawImage($draw); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/269_ImagickPixel_setColorFromPixel_basic.phpt0000644000000000000000000000104514145213431023466 0ustar rootroot--TEST-- Test ImagickPixel, setColor --SKIPIF-- --FILE-- setColorFromPixel($red); $expected = array( "r" => 255, "g" => 0, "b" => 0, "a" => 1 ); $actualColor = $backgroundColor->getColor(); if ($actualColor != $expected) { echo "Not as expected :\n"; var_dump($actualColor); } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/270_imagick_restoreErrorHandler.phpt0000644000000000000000000000107614145213431021732 0ustar rootroot--TEST-- Imagick don't borg the error handler --SKIPIF-- --FILE-- getMessage(); } ?> --EXPECTF-- Normal exception Normal warning is suppressed imagick-3.6.0/tests/271_imagick_constants.phpt0000644000000000000000000000050314145213431017746 0ustar rootroot--TEST-- Imagick::readImage test --SKIPIF-- --FILE-- getConstants(); $output = ''; foreach ($constants as $key => $value) { $output .= "$key: $value \n"; } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/272_imagick_identifyimagetype.phpt0000644000000000000000000000067514145213431021465 0ustar rootroot--TEST-- Test identifyImageType --SKIPIF-- --FILE-- newPseudoImage(100, 100, "magick:logo"); $type = $im->identifyImageType(); if ($type !== Imagick::IMGTYPE_PALETTE) { echo "Unexpected type value. Expecting: ".Imagick::IMGTYPE_PALETTE.", but got $type. \n"; } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/273_imagick_falsyimage.phpt0000644000000000000000000000046014145213431020057 0ustar rootroot--TEST-- Imagick::__construct false --SKIPIF-- --FILE-- getMessage()."\n"; } ?> --EXPECTF-- Constructor shouldn't be called with a boolean as the filenameimagick-3.6.0/tests/274_imagick_setImageAlpha.phpt0000644000000000000000000000355414145213431020452 0ustar rootroot--TEST-- Imagick::setImageAlpha --SKIPIF-- --FILE-- newPseudoImage(256, 256, 'xc:purple'); $imagick->setImageAlpha(0.5); $imagick->setImageFormat('png'); $imagick->writeImage(__DIR__ . "/setAlphaTest.png"); $pixelTypes = array( Imagick::PIXEL_CHAR => array(128, 0, 128, 128), Imagick::PIXEL_FLOAT => array(0.50196081399918, 0, 0.50196081399918, 0.5), Imagick::PIXEL_DOUBLE => array(0.50196078431373, 0, 0.50196078431373, 0.5), Imagick::PIXEL_SHORT => array(32896, 0, 32896, 32768), ); function getColorError($type, $expected, $actual) { if ($type == Imagick::PIXEL_CHAR || $type == Imagick::PIXEL_SHORT) { $string = "Expected: " . $actual . "\n"; $string .= "Actual : " . $actual . "\n"; return $string; } if ($type == Imagick::PIXEL_FLOAT) { return float_compare_32($expected, $actual); } if ($type == Imagick::PIXEL_DOUBLE) { return float_compare($expected, $actual); } echo "Unknown type: $type \n"; exit(-1); } foreach ($pixelTypes as $pixelType => $expectedValues) { $pixels = $imagick->exportImagePixels(0, 0, 1, 1, "RGBA", $pixelType); $channelNames = ['R', 'G', 'B', 'A']; // Loop over the colours for ($channel=0; $channel<4; $channel++) { $actual = $pixels[$channel]; $expected = $expectedValues[$channel]; if (abs($actual - $expected) > 0.0000001) { $channelName = $channelNames[$channel]; echo "Pixel values appear incorrect for pixelType $pixelType channel:$channelName\n"; echo getColorError($pixelType, $expected, $actual); break; } } } echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/275_ImagickPixel_unitializedObjects.phpt0000644000000000000000000000422514145213431022540 0ustar rootroot--TEST-- Testing ImagickPixel with unitialized pixel_wand --SKIPIF-- --FILE-- newInstanceWithoutConstructor(); $methods = $reflectionClass->getMethods(); $methodsAndParams = array( 'clear' => [], 'destroy' => [], 'getColor' => [], 'getColorAsString' => [], 'getColorCount' => [], 'getColorQuantum' => [], 'getColorValue' => [Imagick::COLOR_BLUE], 'getColorValueQuantum' => [Imagick::COLOR_RED], 'getHSL' => [], 'getIndex' => [], 'isPixelSimilar' => ['red', 0.1], 'isPixelSimilarQuantum' => ['red', 100], 'isSimilar' => ['red', 0.1], 'setColor' => ['red'], 'setcolorcount' => [4], 'setColorValue' => [Imagick::COLOR_BLUE, 0.5], 'setColorValueQuantum' => [Imagick::COLOR_BLUE, 1], 'setHSL' => [0.5, 0.5, 0.5], 'setIndex' => [5], 'setcolorfrompixel' => [$instance], ); $testedMethods = array(); foreach ($methodsAndParams as $methodName => $params) { if ($reflectionClass->hasMethod($methodName) == false) { continue; } try { call_user_func_array([$instance, $methodName], $params); echo "failed to throw an exception.\n"; } catch (ImagickPixelException $ipe) { if (strpos($ipe->getMessage(), "Can not process empty ImagickPixel object") === false) { echo "Incorrect message: " . $ipe->getMessage() . "\n"; } } $testedMethods[] = strtolower($methodName); } // pretend we tested these. $testedMethods[] = '__construct'; $testedMethods[] = 'clone'; foreach ($methods as $method) { $allMethods[] = strtolower($method->getName()); } // Have we tested all but __construct $missedMethods = array_diff($allMethods, $testedMethods); if (count($missedMethods) !== 0) { echo "We didn't test all of the ImagickPixel methods\n"; var_dump($missedMethods); } echo "Ok" ?> --EXPECTF-- Okimagick-3.6.0/tests/276_Imagick_artifacts.phpt0000644000000000000000000000117614145213431017666 0ustar rootroot--TEST-- Test Imagick::setImageArtifact and Imagick::getImageArtifact --SKIPIF-- --FILE-- setImageArtifact('compose:args', '1,0,-0.5,0.5')); var_dump($im->getImageArtifact('compose:args')); var_dump($im->deleteImageArtifact('compose:args')); ?> --EXPECT-- bool(true) string(12) "1,0,-0.5,0.5" bool(true)imagick-3.6.0/tests/277_Imagick_colorDecisionListImage.phpt0000644000000000000000000000136414145213431022301 0ustar rootroot--TEST-- Test Imagick::colorDecisionListImage --SKIPIF-- --FILE-- 0.9 1.2 0.5 0.4 -0.5 0.6 1.0 0.8 1.5 0.85 CCC; $im->colorDecisionListImage($ccc); echo "Ok" ?> --EXPECT-- Okimagick-3.6.0/tests/278_Imagick_optimaze_gif.phpt0000644000000000000000000000442514145213431020365 0ustar rootroot--TEST-- Test Imagick::optimizeimagelayers and Imagick::optimizeimagetransparency --SKIPIF-- --FILE-- setFormat("gif"); $circleRadius = 20; $imageFrames = 6; $imageSize = 200; $background = new \Imagick(); $background->newpseudoimage($imageSize, $imageSize, "canvas:gray"); $blackWhite = new \Imagick(); $blackWhite->newpseudoimage($imageSize, $imageSize, "gradient:black-white"); $backgroundPalette = clone $background; $backgroundPalette->quantizeImage(240, \Imagick::COLORSPACE_RGB, 8, false, false); $blackWhitePalette = clone $blackWhite; $blackWhitePalette->quantizeImage(16, \Imagick::COLORSPACE_RGB, 8, false, false); $backgroundPalette->addimage($blackWhitePalette); for($count=0 ; $count<$imageFrames ; $count++) { echo "Frame: ".$count."\n"; $drawing = new \ImagickDraw(); $drawing->setFillColor('white'); $drawing->setStrokeColor('rgba(64, 64, 64, 0.8)'); $strokeWidth = 4; $drawing->setStrokeWidth($strokeWidth); $distanceToMove = $imageSize + (($circleRadius + $strokeWidth) * 2); $offset = ($distanceToMove * $count / ($imageFrames -1)) - ($circleRadius + $strokeWidth); $drawing->translate($offset, ($imageSize / 2) + ($imageSize / 3 * cos(20 * $count / $imageFrames))); $drawing->circle(0, 0, $circleRadius, 0); $frame = clone $background; $frame->drawimage($drawing); $frame->clutimage($backgroundPalette); $frame->setImageDelay(10); $aniGif->addImage($frame); } $aniGif = $aniGif->deconstructImages(); $bytes = $aniGif->getImagesBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image."; } return $aniGif; } function optimizeGif($im) { $im = $im->coalesceImages(); $im->optimizeImageLayers(); $im->optimizeimagetransparency(); } $simpleGif = makeSimpleGif(); optimizeGif($simpleGif); echo "Ok" ?> --EXPECT-- Frame: 0 Frame: 1 Frame: 2 Frame: 3 Frame: 4 Frame: 5 Okimagick-3.6.0/tests/279_ImagickDraw_setTextInterlineSpacing.phpt0000644000000000000000000000401514145213431023341 0ustar rootroot--TEST-- Test ImagickDraw:: setTextInterlineSpacing --SKIPIF-- --FILE-- setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->setFontSize(56); $draw->setFontSize(16); $draw->setStrokeAntialias(true); $draw->setTextAntialias(true); $draw->setFillColor('#ff0000'); $draw->setTextInterlineSpacing($interlineSpacing); $imagick = new \Imagick(); $imagick->newImage(600, 600, "rgb(230, 230, 230)"); $imagick->setImageFormat('png'); $imagick->annotateImage($draw, 30, 40, 0, "Line 1\nLine 2\nLine 3"); $imagick->trimImage(0); $imagick->setImagePage($imagick->getimageWidth(), $imagick->getimageheight(), 0, 0); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { die("Failed to generate image."); } $imageHeights[$interlineSpacing] = $imagick->getImageHeight(); $imagick->writeImage(__DIR__ . "/interline_spacing_test_$interlineSpacing.png"); } $previousHeight = null; foreach ($imageHeights as $interlineSpacing => $imageHeight) { if ($previousHeight !== null) { $differenceFromPrevious = $imageHeight - $previousHeight; if ($differenceFromPrevious < 15) { echo "textInterlineSpacing of $interlineSpacing only resulted in extra height of $differenceFromPrevious\n"; } } $previousHeight = $imageHeight; } echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/280_imagickkernel_exception_invalid_origin.phpt0000644000000000000000000000444214145213431024214 0ustar rootroot--TEST-- ImagickKernel::fromMatrix exceptions --SKIPIF-- --FILE-- getMessage(); } } foreach ($invalidOrigins as $invalidOrigin) { try { $kernel = ImagickKernel::fromMatrix($kernelArray, $invalidOrigin); echo "Exception wasn't thrown for case: \n"; var_dump($invalidOrigin); } catch (\ImagickKernelException $e) { $message = $e->getMessage(); if (strpos($message, "origin_y for matrix is outside bounds of rows") === 0) { // this is fine. } else if (strpos($message, "origin_x for matrix is outside bounds of columns") === 0) { // this is fine. } else { echo "Unexpected message: " . $message . "\n"; } } } $flatKernelArray = array( array(1, 0, -2, 0, 1), ); try { $kernel = ImagickKernel::fromMatrix($flatKernelArray, [1, 4]); echo "Exception wasn't thrown for case: \n"; var_dump($invalidOrigin); } catch (\ImagickKernelException $e) { $message = $e->getMessage(); if (strpos($message, "origin_y for matrix is outside bounds of rows") === 0) { // this is fine. } else { echo "Unexpected message: " . $message . "\n"; } } $tallKernelArray = array( array(1), array(0), array(-2), array(0), array(1), ); try { $kernel = ImagickKernel::fromMatrix($tallKernelArray, [4, 1]); echo "Exception wasn't thrown for case: \n"; var_dump($invalidOrigin); } catch (\ImagickKernelException $e) { $message = $e->getMessage(); if (strpos($message, "origin_x for matrix is outside bounds of columns") === 0) { // this is fine. } else { echo "Unexpected message: " . $message . "\n"; } } echo "Complete".PHP_EOL; ?> --EXPECTF-- Complete imagick-3.6.0/tests/281_imagick_houghLineImage_basic.phpt0000644000000000000000000000134014145213431021761 0ustar rootroot--TEST-- Test Imagick, houghLineImage --SKIPIF-- --FILE-- readImage($path); $imagick->setbackgroundcolor('rgb(64, 64, 64)'); $imagick->houghLineImage(20,40, 40); $imagick->writeImage(__DIR__ . '/houghline_output_image.png'); } houghLineImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/281_ini_settings_default.phpt0000644000000000000000000000107014145213431020452 0ustar rootroot--TEST-- OpenMP segfault hacks --SKIPIF-- --FILE-- --EXPECTF-- Complete imagick-3.6.0/tests/282_ini_settings_set_falsy_string.phpt0000644000000000000000000000210414145213431022405 0ustar rootroot--TEST-- OpenMP segfault hacks --INI-- imagick.shutdown_sleep_count=Off imagick.set_single_thread=0 --SKIPIF-- --FILE-- --EXPECTF-- Complete imagick-3.6.0/tests/283_ini_settings_set_falsy_zero.phpt0000644000000000000000000000116714145213431022067 0ustar rootroot--TEST-- OpenMP segfault hacks --INI-- imagick.shutdown_sleep_count=0 imagick.set_single_thread=0 --SKIPIF-- --FILE-- --EXPECTF-- Complete imagick-3.6.0/tests/284_ini_settings_set_truthy_number.phpt0000644000000000000000000000120514145213431022613 0ustar rootroot--TEST-- OpenMP segfault hacks --INI-- imagick.shutdown_sleep_count=20 imagick.set_single_thread=1 --SKIPIF-- --FILE-- --EXPECTF-- Complete imagick-3.6.0/tests/285_ini_settings_set_truthy_string.phpt0000644000000000000000000000120414145213431022631 0ustar rootroot--TEST-- OpenMP segfault hacks --INI-- imagick.shutdown_sleep_count=On imagick.set_single_thread=On --SKIPIF-- --FILE-- --EXPECTF-- Complete imagick-3.6.0/tests/286_Imagick_setMask_basic.phpt0000644000000000000000000000324614145213431020457 0ustar rootroot--TEST-- Test Imagick, setImageMask basic --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $default_mask = $imagick->getImageMask(Imagick::PIXELMASK_READ); if ($default_mask !== null) { echo "Default mask is not null but\n"; var_dump($default_mask); } $mask = new Imagick(); $mask->newPseudoImage(480, 640, "gradient:black-white"); $mask->transposeImage(); $imagick->setImageMask($mask, Imagick::PIXELMASK_READ); $mask = $imagick->getImageMask(Imagick::PIXELMASK_READ); $mask->setImageFormat('png'); //$mask->writeImage(__DIR__ . "/i_am_a_mask.png"); //if ( !== Imagick::PIXELMASK_READ) { // echo "Failed to set/get Imagick::PIXELMASK_READ"; //}; $imagick->setImageMask($mask, Imagick::PIXELMASK_WRITE); //$imagick->blurImage(15, 4); //$imagick->writeImage(__DIR__ . "/mask_test.png"); //if ($imagick->getImageMask() !== Imagick::PIXELMASK_WRITE) { // echo "Failed to set/get Imagick::PIXELMASK_WRITE"; // }; // This can only be tested MagickLibVersion >= 0x708 // so should probably be in a test by itself, once it's figured out // what it does. // $imagick->setImageMask($mask, Imagick::PIXELMASK_COMPOSITE); //if ($imagick->getImageMask() !== Imagick::PIXELMASK_COMPOSITE) { // echo "Failed to set/get Imagick::PIXELMASK_COMPOSITE"; //}; $imagick->setImageMask($mask, -1); // $unknown_result = $imagick->getImageMask(Imagick::PIXELMASK_READ); // todo echo "not sure what -1 should be: $unknown_result \n"; echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/287_Imagick_GetImageChannelRange_basic.phpt0000644000000000000000000000315014145213431022773 0ustar rootroot--TEST-- Test Imagick, GetImageChannelRange basic --SKIPIF-- --XFAIL-- Tests are not stable across ImageMagick versions. --FILE-- newPseudoImage(640, 480, "gradient:rgb(0,32,32)-rgb(128,255,255)"); $redChannelRange = $imagick->getImageChannelRange(\Imagick::CHANNEL_RED); $greenChannelRange = $imagick->getImageChannelRange(\Imagick::CHANNEL_GREEN); $expectedRedMinima = (Imagick::getQuantum() * 0.0) / 255; $expectedRedMaxima = (Imagick::getQuantum() * 128.0) / 255; $expectedGreenMinima = (Imagick::getQuantum() * 32.0) / 255; $expectedGreenMaxima = (Imagick::getQuantum() * 255.0) / 255; // Floating point math. This is absolutely going to blow up // on some platforms. But as finding out which would be interesting // will leave it like this for now. if ($expectedRedMinima !== $redChannelRange['minima']) { printf( "Unexpected red minima. Was expecting %s but have %s\n", $expectedRedMinima, $redChannelRange['minima'] ); } if ($expectedRedMaxima !== $redChannelRange['maxima']) { printf( "Unexpected red maxima. Was expecting %s but have %s\n", $expectedRedMinima, $redChannelRange['maxima'] ); } if ($expectedGreenMinima !== $greenChannelRange['minima']) { printf( "Unexpected green minima. Was expecting %s but have %s\n", $expectedGreenMinima, $greenChannelRange['minima'] ); } if ($expectedGreenMaxima !== $greenChannelRange['maxima']) { printf( "Unexpected green maxima. Was expecting %s but have %s\n", $expectedGreenMaxima, $greenChannelRange['maxima'] ); } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/288_imagick_prevent_zero_size_images.phpt0000644000000000000000000000150014145213431023041 0ustar rootroot--TEST-- Prevent zero dimension images and check exception --SKIPIF-- --FILE-- newPseudoImage(0, 100, "magick:logo"); $im->newPseudoImage(100, 0, "magick:logo"); ini_set("imagick.allow_zero_dimension_images", 1); $im->newPseudoImage(0, 100, "magick:logo"); echo "Well done, you have a zero dimension image. Now what?\n"; echo "Ok"; ?> --EXPECTF-- Deprecated: Creating images with zero columns is deprecated. If you think you need to do this, please open an issue at https://phpimagick.com/issues in %s on line %d Deprecated: Creating images with zero rows is deprecated. If you think you need to do this, please open an issue at https://phpimagick.com/issues in %s on line %d Well done, you have a zero dimension image. Now what? Okimagick-3.6.0/tests/289_Imagick_setImageMask_basic.phpt0000644000000000000000000000341014145213431021416 0ustar rootroot--TEST-- Test Imagick, medianFilterImage --SKIPIF-- --FILE-- newPseudoImage( $canvas->getImageWidth(), $canvas->getImageHeight(), 'xc:black' ); $drawing = new ImagickDraw(); $drawing->setBorderColor('black'); $drawing->setFillColor('black'); $drawing->rectangle(0, 0, $mask->getImageWidth(), $mask->getImageHeight()); $drawing->setBorderColor('white'); $drawing->setFillColor('white'); $drawing->circle( $mask->getImageWidth() / 2, $mask->getImageHeight() / 2, 2 * $mask->getImageWidth() / 3, $mask->getImageHeight() / 2 ); $mask->drawImage($drawing); //$mask->writeImage(__DIR__ . "/test_mask.png"); // This would probably be more useful for users // but shows the issue with PIXELMASK_COMPOSITE // $mask->blurImage(10, 2); $mask_types = array( \Imagick::PIXELMASK_READ => "PIXELMASK_READ", \Imagick::PIXELMASK_WRITE => "PIXELMASK_WRITE", \Imagick::PIXELMASK_COMPOSITE => "PIXELMASK_COMPOSITE", ); $channel_types = array( \Imagick::CHANNEL_ALL => "CHANNEL_ALL", \Imagick::CHANNEL_RED => "CHANNEL_RED", \Imagick::CHANNEL_ALPHA => "CHANNEL_ALPHA", \Imagick::CHANNEL_RGBA => "CHANNEL_RGBA", \Imagick::CHANNEL_BLACK => "CHANNEL_BLACK", \Imagick::CHANNEL_DEFAULT => "CHANNEL_DEFAULT", ); foreach ($channel_types as $channel_type => $channel_name) { foreach ($mask_types as $type => $type_name) { $output = clone $canvas; $output->setImageMask($mask, $type); $output->blurImage(15, 4, $channel_type); // $output->writeImage(__DIR__ . "/test_canvas" . $type_name . "_" . $channel_name . ".png"); } } echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/290_imagick_profileimage.phpt0000644000000000000000000000040614145213431020400 0ustar rootroot--TEST-- Imagick::profileImage test --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:logo"); $imagick->profileImage('*', null); echo "Ok"; ?> --EXPECTF-- Okimagick-3.6.0/tests/291_reflection.phpt0000644000000000000000000000176414145213431016414 0ustar rootroot--TEST-- Test that reflection can get default values --SKIPIF-- --FILE-- getMethods() as $reflectionMethod) { $parameters = $reflectionMethod->getParameters(); foreach ($parameters as $parameter) { if ($parameter->isDefaultValueAvailable() !== true) { continue; } try { $value = $parameter->getDefaultValue(); } catch (ReflectionException $re) { $method_name = $reflectionMethod->getName(); echo "Exception for $class::$method_name : " . $re->getMessage() . "\n"; } } } } echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/292_index_iterator.phpt0000644000000000000000000000240214145213431017271 0ustar rootroot--TEST-- Test iterating over images works --SKIPIF-- --FILE-- newPseudoImage(300, 300, $canvasType); $canvas->addImage($imagick); } $canvas->setImageFormat("png"); foreach ($canvas as $canvasSubImage) { echo $canvas->getIteratorIndex() . "\n"; echo $canvas->getImageIndex() . "\n"; } for ($i=0; $i<3; $i+=1) { $canvas->setImageIndex($i); echo $canvas->getIteratorIndex() . "\n"; } for ($i=0; $i<3; $i+=1) { $canvas->setIteratorIndex($i); echo $canvas->getImageIndex() . "\n"; } $canvas->setImageIndex(-1); if ($canvas->getImageIndex() !== 2) { echo "Setting image index to -1 did something unexpected. Or at least is a BC break.\n"; } else { echo "still " . $canvas->getImageIndex() . " as hasn't changed\n"; } try { $canvas->setImageIndex(3); } catch (ImagickException $ie) { echo "Exception: ". $ie->getMessage() . "\n"; } echo "Ok"; ?> --EXPECTF-- 0 0 1 1 2 2 0 1 2 0 1 2 still 2 as hasn't changed Exception: Unable to set image index Ok imagick-3.6.0/tests/294_Imagick_cannyEdgeImage.phpt0000644000000000000000000000115114145213431020537 0ustar rootroot--TEST-- Test Imagick, cannyEdgeImage --SKIPIF-- --FILE-- readImage($path); $imagick->cannyEdgeImage(10, 4, 0.1, 0.5); // $imagick->writeImage(__DIR__ . '/cannyEdgeImage_output_image.png'); $imagick->getImageBlob(); } cannyEdgeImage() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/295_Imagick_setSeed.phpt0000644000000000000000000000114614145213431017300 0ustar rootroot--TEST-- Test Imagick, setSeed --SKIPIF-- --FILE-- newPseudoImage(256, 256, "plasma:tomato-steelblue"); // $imagick->writeImage(__DIR__ . '/cannyEdgeImage_output_image.png'); // $imagick->getImageBlob(); Imagick::setSeed(50); $imagick = new \Imagick(); $imagick->newPseudoImage(256, 256, "plasma:tomato-steelblue"); // TODO - compare images. } setSeed() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/296_Imagick_waveletDenoiseImage.phpt0000644000000000000000000000106514145213431021626 0ustar rootroot--TEST-- Test Imagick, waveletDenoiseImage --SKIPIF-- --FILE-- waveletDenoiseImage(5, 5); $imagick->writeImage(__DIR__ . '/waveletDenoiseImage_output_image.png'); // $imagick->getImageBlob(); } waveletDenoiseImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/297_Imagick_meanShiftImage.phpt0000644000000000000000000000104014145213431020560 0ustar rootroot--TEST-- Test Imagick, meanShiftImage --SKIPIF-- --FILE-- meanShiftImage( 10, 10, 5 ); $imagick->writeImage(__DIR__ . '/meanShiftImage_output_image.png'); // $imagick->getImageBlob(); } meanShiftImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/298_Imagick_kmeansImage.phpt0000644000000000000000000000101414145213431020122 0ustar rootroot--TEST-- Test Imagick, kmeansImage --SKIPIF-- --FILE-- kmeansImage( 128, 10, 5 ); $imagick->writeImage(__DIR__ . '/kmeansImage_output_image.png'); // $imagick->getImageBlob(); } kmeansImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/299_Imagick_rangeThresholdImage.phpt0000644000000000000000000000111514145213431021620 0ustar rootroot--TEST-- Test Imagick, rangeThresholdImage --SKIPIF-- --FILE-- rangeThresholdImage( 32, 64, 192, 228 ); $imagick->writeImage(__DIR__ . '/rangeThresholdImage_output_image.png'); // $imagick->getImageBlob(); } rangeThresholdImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/300_Imagick_autoThresholdImage.phpt0000644000000000000000000000110514145213431021452 0ustar rootroot--TEST-- Test Imagick, autoThresholdImage --SKIPIF-- --FILE-- autoThresholdImage(Imagick::AUTO_THRESHOLD_OTSU); $imagick->writeImage(__DIR__ . '/autoThresholdImage_output_image.png'); // $imagick->getImageBlob(); } autoThresholdImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/301_Imagick_bilateralBlurImage.phpt0000644000000000000000000000110014145213431021405 0ustar rootroot--TEST-- Test Imagick, bilateralBlurImage --SKIPIF-- --FILE-- bilateralBlurImage( 5, 1, 2, 2 ); $imagick->writeImage(__DIR__ . '/bilateralBlurImage_output_image.png'); // $imagick->getImageBlob(); } bilateralBlurImage() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/302_Imagick_claheImage.phpt0000644000000000000000000000070214145213431017705 0ustar rootroot--TEST-- Test Imagick, claheImage --SKIPIF-- --FILE-- claheImage( 10, 10, 8, 2 ); // $imagick->writeImage(__DIR__ . '/claheImage_output_image.png'); $imagick->getImageBlob(); } claheImage() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/303_Imagick_averageImages.phpt0000644000000000000000000000142714145213431020434 0ustar rootroot--TEST-- Test Imagick, averageImages --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:LOGO"); $imagick2 = new \Imagick(); $imagick2->newPseudoImage(640, 480, "gradient:black-white"); $imagick->addImage($imagick2); $imagick->setIteratorIndex(0); $result_imagick = $imagick->averageImages(); $result_imagick->setImageFormat('png'); $result_imagick->writeImage(__DIR__ . '/averageImages_output_image.png'); $result_imagick->getImageBlob(); } averageImages() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/304_Imagick_is_imagemagick_borked.phpt0000644000000000000000000000340414145213431022151 0ustar rootroot--TEST-- Test whether ImageMagick is producing valid images. --SKIPIF-- --FILE-- newPseudoImage(640, 480, "magick:LOGO"); $transparency = new Imagick(); $transparency->newPseudoImage(640, 480, "xc:rgba(0,0,0,0)"); $draw = new \ImagickDraw(); $draw->setFillColor('white'); $draw->setStrokeColor('white'); $draw->circle( 320, 240, 500, 240 ); $transparency->drawImage($draw); $transparency->blurImage(50, 15); $transparency->writeImage(__DIR__ . "/304_output_trans.png"); $checkerboard = new Imagick(); $checkerboard->newPseudoImage(640, 480, "pattern:checkerboard"); $checkerboard->setImageFormat('png'); $output = clone $checkerboard; $canvas = clone $imagick; $canvas->compositeImage($transparency, \Imagick::COMPOSITE_COPYOPACITY, 0, 0); $output->compositeImage($canvas, \Imagick::COMPOSITE_ATOP, 0, 0); $output->writeImage(__DIR__ . "/304_output_before_softlight.png"); $output = clone $checkerboard; $gradient = new Imagick(); $gradient->newPseudoImage(640, 480, 'gradient:#979797-#373737'); $canvas->compositeImage($gradient, Imagick::COMPOSITE_SOFTLIGHT, 0, 0); $output->compositeImage($canvas, \Imagick::COMPOSITE_ATOP, 0, 0); // TODO - we need to store a known good output and compare // the result image against that. // $output->writeImage(__DIR__ . "/304_output_with_softlight.png"); } testOpacity() ; echo "Ok"; ?> --CLEAN-- --EXPECTF-- Ok imagick-3.6.0/tests/305_Imagick_complexImages.phpt0000644000000000000000000000121714145213431020470 0ustar rootroot--TEST-- Test Imagick, complexImages --SKIPIF-- --FILE-- newPseudoImage($imagick->getImageWidth(), $imagick->getImageHeight(), "gradient:black-white"); $imagick->addImage($multiply); $imagick->complexImages(Imagick::COMPLEX_OPERATOR_MULTIPLY); // $imagick->writeImage(__DIR__ . '/complexImages_output_image.png'); $imagick->getImageBlob(); } complexImages() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/306_Imagick_interpolativeResizeImage.phpt0000644000000000000000000000103714145213431022706 0ustar rootroot--TEST-- Test Imagick, interpolativeResizeImage --SKIPIF-- --FILE-- interpolativeResizeImage( 320, 200, Imagick::INTERPOLATE_CATROM ); // $imagick->writeImage(__DIR__ . '/claheImage_output_image.png'); $imagick->getImageBlob(); } interpolativeResizeImage() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/307_Imagick_levelImageColors.phpt0000644000000000000000000000100414145213431021123 0ustar rootroot--TEST-- Test Imagick, levelImageColors --SKIPIF-- --FILE-- levelImageColors( "rgb(10, 10, 10)", "rgb(240, 240, 240)", false ); // $imagick->writeImage(__DIR__ . '/levelImageColors_output_image.png'); $imagick->getImageBlob(); } levelImageColors() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/308_Imagick_levelizeImage.phpt0000644000000000000000000000070714145213431020463 0ustar rootroot--TEST-- Test Imagick, levelizeImage --SKIPIF-- --FILE-- levelizeImage(0.1, 2.0, 0.95); // $imagick->writeImage(__DIR__ . '/claheImage_output_image.png'); $imagick->getImageBlob(); } levelizeImage(); echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/309_Imagick_orderedDitherImage.phpt0000644000000000000000000000073314145213431021430 0ustar rootroot--TEST-- Test Imagick, orderedDitherImage --SKIPIF-- --FILE-- orderedDitherImage("o3x3,6"); // $imagick->writeImage(__DIR__ . '/claheImage_output_image.png'); $imagick->getImageBlob(); } orderedDitherImage() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/310_Imagick_whiteBalanceImage.phpt0000644000000000000000000000060714145213431021222 0ustar rootroot--TEST-- Test Imagick, whiteBalanceImage --SKIPIF-- --FILE-- whiteBalanceImage(); $imagick->getImageBlob(); } whiteBalanceImage() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/311_Imagick_channelFxImage.phpt0000644000000000000000000000175714145213431020552 0ustar rootroot--TEST-- Test Imagick, channelFxImage --SKIPIF-- --FILE-- exchange two channels (e.g. red<=>blue) // => transfer a channel to another (e.g. red=>green) // , separate channel operations (e.g. red, green) // | read channels from next input image (e.g. red | green) // ; write channels to next output image (e.g. red; green; blue) function whiteBalanceImage() { $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg'); $result = $imagick->channelFxImage("red<=>blue"); // $result->writeImage(__DIR__ . '/complexImages_output_image.png'); $result->getImageBlob(); } whiteBalanceImage() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/312_Imagick_colorThresholdImage.phpt0000644000000000000000000000103514145213431021625 0ustar rootroot--TEST-- Test Imagick, colorThresholdImage --SKIPIF-- --FILE-- colorThresholdImage( "rgb(10, 10, 10)", "rgb(240, 240, 240)" ); // $imagick->writeImage(__DIR__ . '/colorThresholdImage_output_image.png'); $imagick->getImageBlob(); } colorThresholdImage() ; echo "Ok"; ?> --EXPECTF-- Ok imagick-3.6.0/tests/bug20636.phpt0000644000000000000000000000132014145213431015031 0ustar rootroot--TEST-- Test PECL bug #20636 --SKIPIF-- --FILE-- newImage(0, 0, '#dddddd', 'png' ); try { $image->roundCorners(5, 5); echo "fail\n"; } catch (ImagickException $e) { echo "success\n"; } ?> --EXPECTF-- success imagick-3.6.0/tests/bug21229.phpt0000644000000000000000000000126214145213431015035 0ustar rootroot--TEST-- Test PECL bug #21229 --SKIPIF-- --FILE-- test = $value; return $this; } public function getTestValue() { return $this->test; } } $test = new ImagickTest("magick:logo"); $test->setTestValue("test value"); echo "Value: " , $test->getTestValue() , PHP_EOL; var_dump($test->width, $test->height); echo "OK" , PHP_EOL; ?> --EXPECTF-- Value: test value int(112233) int(%d) OKimagick-3.6.0/tests/bug59378.phpt0000644000000000000000000000213614145213431015056 0ustar rootroot--TEST-- Test PHP bug #59378 writing to php://memory is incomplete --SKIPIF-- --FILE-- newPseudoImage(640, 480, "LOGO:"); $imagick->setFormat("png"); $fp = fopen("php://memory", 'r+'); $imagick->writeImageFile($fp); rewind($fp); $memoryBlob = stream_get_contents($fp); fclose($fp); //This test depends on getImageBlob working correctly. $imageBlob = $imagick->getImageBlob(); //Read the images from the data blobs. $imageReopened = new Imagick(); $imageReopened->readImageBlob($imageBlob); $memoryReopened = new Imagick(); $memoryReopened->readImageBlob($memoryBlob); //Compare to see if they are identical. $result = $imageReopened->compareImages($memoryReopened, \Imagick::METRIC_MEANABSOLUTEERROR); if ($result[1] == 0) { echo "Reopened images are identical."; } else { echo "Error, reopened images have changed."; var_dump($result); } ?> --EXPECTF-- Reopened images are identical. imagick-3.6.0/tests/bug59378_windows.phpt0000644000000000000000000000220614145213431016626 0ustar rootroot--TEST-- Test PHP bug #59378 writing to php://temp is incomplete --SKIPIF-- --FILE-- newPseudoImage(640, 480, "LOGO:"); $imagick->setFormat("png"); // Although the bug was about php://memory, that isn'--TEST-- // available to use as a filehandle on Windows, so may as well // just test php://temp instead. $fp = fopen("php://temp", 'r+'); $imagick->writeImageFile($fp); rewind($fp); $memoryBlob = stream_get_contents($fp); fclose($fp); //This test depends on getImageBlob working correctly. $imageBlob = $imagick->getImageBlob(); //Read the images from the data blobs. $imageReopened = new Imagick(); $imageReopened->readImageBlob($imageBlob); $memoryReopened = new Imagick(); $memoryReopened->readImageBlob($memoryBlob); //Compare to see if they are identical. $result = $imageReopened->compareImages($memoryReopened, \Imagick::METRIC_MEANABSOLUTEERROR); if ($result[1] == 0) { echo "Reopened images are identical."; } else { echo "Error, reopened images have changed."; var_dump($result); } ?> --EXPECTF-- Reopened images are identical. imagick-3.6.0/tests/bug64015.phpt0000644000000000000000000000100414145213431015027 0ustar rootroot--TEST-- Test PHP bug #64015 --SKIPIF-- --FILE-- getImageLength()); // Both should return filesize in bytes. var_dump($im->getImageLength()); var_dump($im->getImageSize()); // All cases below now return 0; $cloned_im = clone $im; var_dump($im->getImageLength()); var_dump($im->getImageSize()); echo "OK" , PHP_EOL; ?> --EXPECTF-- int(2523) int(2523) int(2523) int(2523) int(2523) OKimagick-3.6.0/tests/bug_66098.phpt0000644000000000000000000000033714145213431015213 0ustar rootroot--TEST-- Bug #66098 Check that there is no segfault from zval_addref_p --SKIPIF-- foobar; echo "OK"; ?> --EXPECT-- OKimagick-3.6.0/tests/bug_71742.phpt0000644000000000000000000000176114145213431015205 0ustar rootroot--TEST-- Bug #71742 polyline touched by array_walk --SKIPIF-- --FILE-- 2 * $index, 'y' => pow($index, 2) ); } $callback = function (&$coordinate) { $coordinate['y'] = 200 - $coordinate['y'] / 50; }; array_walk($coordinates, $callback); $imagick = new Imagick(); $imagick->newImage(200, 200, "white"); $draw = new ImagickDraw (); $draw->setFillColor("none"); $draw->setStrokeColor("black"); //Fatal error in PHP 7, but not in PHP <= 5.6 $draw->polyline($coordinates); $draw->translate(0, -20); ////Works in PHP 7 $draw->polyline (array_values($coordinates)); $imagick->drawImage($draw); //$imagick->writeImage(getcwd()."/test.png"); $imagick->setImageFormat('png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image."; } //$imagick->writeImage("./bugTest.png"); echo "Ok"; ?> --EXPECT-- Okimagick-3.6.0/tests/bug_72226.phpt0000644000000000000000000000104414145213431015175 0ustar rootroot--TEST-- Allow Imagick exceptions to be extended. --SKIPIF-- --FILE-- --EXPECTF-- imagick-3.6.0/tests/bug_73840.phpt0000644000000000000000000000200514145213431015176 0ustar rootroot--TEST-- ImagickPixel iterator --SKIPIF-- --XFAIL-- This needs a significant amount of work to fix. The issue is the iterator object is going out of scope and being freed, but the row object still has a reference to that pixel iterator, internally in ImageMagick. We need to stop the pixeliterator being freed while the row is still active. --FILE-- newImage(1, 1, 'black'); // //// This works fine //$it = $im->getPixelIterator(); //$row = $it->getCurrentIteratorRow(); //$rgb = $row[0]->getColor(); // //$expected = array ( // "r" => 0, // "g" => 0, // "b" => 0, // "a" => 1, //); // //if ($rgb !== $expected) { // echo "values are incorrect:\n"; // var_dump($rgb); //} // //// This crashes with SIGABRT //$row = $im->getPixelIterator()->getCurrentIteratorRow(); //$rgb = $row[0]->getColor(); // //if ($rgb !== $expected) { // echo "values are incorrect:\n"; // var_dump($rgb); //} echo "Not ok"; ?> --EXPECTF-- Not okimagick-3.6.0/tests/bug81235.phpt0000644000000000000000000000043214145213431015036 0ustar rootroot--TEST-- Bug #81235 (Imagick::newPseudoImage gives open_basedir restriction error) --SKIPIF-- --FILE-- newPseudoImage(10, 10, "canvas:white"); ?> --EXPECT-- imagick-3.6.0/tests/functions.inc0000644000000000000000000000577114145213431015477 0ustar rootroot= 0) { return true; } return false; } /** * On some systems, where the standard fonts aren't available, trying * to draw any text fails as the ImageMagick default font is null. * * This function just find a 'sensible' font to use, either from the * preferred list, or just the first one from queryFonts(). That 'probably' * is the right thing to do, as it makes the tests more stable. */ function findDefaultFont() { $knownFonts = [ 'Courier', 'Helvetica', 'Times-Roman', 'Liberation-Mono', 'Utopia', ]; $fontList = \Imagick::queryFonts(); foreach ($knownFonts as $knownFont) { if (in_array($knownFont, $fontList, true) === true) { return $knownFont; } } if (count($fontList) !== 0) { return $fontList[0]; } throw new \Exception("No fonts available on system, apparently."); } // Find and set a font for the Imagick object function setFontForImagick(\Imagick $imagick) { $font = findDefaultFont(); $imagick->setFont($font); } // Find and set a font for the ImagickDraw object function setFontForImagickDraw(\ImagickDraw $imagickDraw) { $font = findDefaultFont(); $imagickDraw->setFont($font); } imagick-3.6.0/tests/github_174.phpt0000644000000000000000000000044214145213431015534 0ustar rootroot--TEST-- Imagick::resizeImage prevent 0 width/height images --SKIPIF-- --FILE-- newPseudoImage(1, 1000, "xc:red"); $i->resizeImage(0, 250, 0, 1); echo $i->getImageWidth(); // should be 1 ?> --EXPECTF-- 1 imagick-3.6.0/tests/houghline_input_image.png0000644000000000000000000000311014145213431020026 0ustar rootroot‰PNG  IHDRô,e±úgAMA± üa cHRMz&€„ú€èu0ê`:˜pœºQ<PLTEáááÊÊÊ^^^KKK———ÈÈÈßßß 8cyÖwÔZŸ -O†î…ì­­­PPPÞÞÞ¿¿¿~~~}ßÓÓÓK…¢¢¢rÊ„ë 0Ua¬ßßß 6a}ÞÒÒÒ[[[V™…츸¸nÂÿÿÿ³)#âbKGD*S¾Ôž9IDATxÚí×nGEQ9DZåœ-ç°ÿ šß6)J šÐ¡ªæœ4º€Ü'O8±×^ãÍ·Þ~gö3çêäÿqø³¸9¹ÃŸÅK'wøúî=¹ÃWvëäï¾÷þ:|y/œ|¹øÈák»{òÅák{èä_Öã'wø‚ÖœÜáKYr‡/bëÉ>½}'wøÄŽœÜáS:~r‡O¦ÕÉ>¶'wøzœÜáCëwr‡ª÷É>œ1'wø@FžÜáCr‡ŸlÖÉ~š¹'ìðÏþšª"œü¡Ã?ý95Å9ù½‡ÿdöÿíäwÿéì*'æÉoy×g³ÿ¨˜È'¿øüò²/fÿR)ÑO~åËË㾚ýQu$8ù²|}yÞ7³¿ªŠ'_–oE[3IN¾,߉¶FÒœüÊ÷¢­…L'_–DÛq¹N.ÚÈvòE´•ðä¢í˜”'mG$=¹hÛ/íÉѶSæ“‹¶]rŸ\´íýä‹hÛªÀÉEÛ6%N.Ú¶(rrѶ^™“/¢m¥J'm«Ô:¹h[åÇR'_DÛÏ~º¾úϿ̾W¢m_»>ûï̾X¢m?¯7þ¯¿gŸì8ѶR©mkÚxѶ^™m”ÙxѶE‘mÛ”ØxѶQ…m›ØxѶ]úm;dßxѶKòmû¤ÞxѶSæm»åÝxÑv@ÚmdÝxÑvHÎm¥ÜxÑvPÆm‡åÛxÑÖ@¶m-dÛxÑÖD®mdÚxÑÖJ¦mÍäÙxÑÖP–m-%ÙxÑÖVŽmeØxÑÖZ‚míÅßxÑÖAôm=ßxÑÖGèm½DÞxÑÖKàmý„ÝxÑÖSÔm=ÝxÑÖWÈm½ÜxÑÖ]Àmý…ÛxÑ6B°mCÛxÑ6F¨m£ÚxÑ6Lœm…ÙxÑ6RmCÅØxÑ6Xˆm£ØxÑ6ÜümÌÞxÑ6ÅämSÌÝxÑ6ÉÌmÓLÜxÑ6ͼmÍÚxÑ6ÕœmsÍÙxÑ6ÙŒmÓßxÑ6ßømŒÞxÑÂØm1 ÝxÑÅÈmaŒÛxÑǰm‘ŒÚxÑʘm± ÙxÑÍ€mñôßxÑO÷muÞxÑSßm1uÝxÑUÇmquÛxÑX·m‘uÚxÑ[—mÁuÙxÑ]‡mñ5ßxÑ–@ëm)4ÞxÑ–CÓmI´ÜxÑ–FÃmy4ÛxÑ–H«m©´ÙxÑ–L“mÉ´ØxÑ–Îñm ÞxÑ–ÐÑm)ÛxÑ–Ô‘mYÙxÑ–Öþm‰íÝxÑ–ÙÞm©íÛxÑ–ÜžmÙíØxÑ–ßömlÝxÑVÁÆm5lÛxÑVÄ–mUlØxÑVÇêm•¬ÝxÑVÉÊmµ¬ÚxÑVÍšmÕ¬ØxÑVÏ+7^´UôŠm%½bãE[Mn¼h«ê‘me=²ñ¢­®7^´UöÀÆ‹¶ÒîßxÑVܽ/Úª»gãE[yw7^´ÀmgðÒÆ‹¶SxqãEÛIÜÞxÑv·6^´Æ­mçñ|ãEÛ‰Ül¼h;‘ç/ÚNäfãŸÎ~ ]o¼h;“ÿ7^´Ë¿/ÚÎæjãEÛé\müì'Sü¼§µzõIEND®B`‚imagick-3.6.0/tests/Biter_500.jpg0000644000000000000000000014102714145213431015122 0ustar rootrootÿØÿàJFIF,,ÿí‚Photoshop 3.08BIMIZ%G? 094042+1000>20110723720110723< 094042+10008BIM%yb6㣙—Þ|sž©Æÿâ XICC_PROFILE HLinomntrRGB XYZ Î 1acspMSFTIEC sRGBöÖÓ-HP cprtP3desc„lwtptðbkptrXYZgXYZ,bXYZ@dmndTpdmddĈvuedL†viewÔ$lumiømeas $tech0 rTRC< gTRC< bTRC< textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ óQÌXYZ XYZ o¢8õXYZ b™·…ÚXYZ $ „¶ÏdescIEC http://www.iec.chIEC http://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space - sRGB.IEC 61966-2.1 Default RGB colour space - sRGBdesc,Reference Viewing Condition in IEC61966-2.1,Reference Viewing Condition in IEC61966-2.1view¤þ_.ÏíÌ \žXYZ L VPWçmeassig CRT curv #(-27;@EJOTY^chmrw|†‹•šŸ¤©®²·¼ÁÆËÐÕÛàåëðöû %+28>ELRY`gnu|ƒ‹’š¡©±¹ÁÉÑÙáéòú &/8AKT]gqz„Ž˜¢¬¶ÁËÕàëõ !-8COZfr~Š–¢®ºÇÓàìù -;HUcq~Œš¨¶ÄÓáðþ +:IXgw†–¦µÅÕåö'7HYj{Œ¯ÀÑãõ+=Oat†™¬¿Òåø 2FZn‚–ª¾Òçû  % : O d y ¤ º Ï å û  ' = T j ˜ ® Å Ü ó " 9 Q i € ˜ ° È á ù  * C \ u Ž § À Ù ó & @ Z t Ž © Ã Þ ø.Id›¶Òî %A^z–³Ïì &Ca~›¹×õ1OmŒªÉè&Ed„£Ãã#Ccƒ¤Åå'Ij‹­Îð4Vx›½à&Il²ÖúAe‰®Ò÷@eНÕú Ek‘·Ý*QwžÅì;cвÚ*R{£ÌõGp™Ãì@j”¾é>i”¿ê  A l ˜ Ä ð!!H!u!¡!Î!û"'"U"‚"¯"Ý# #8#f#”#Â#ð$$M$|$«$Ú% %8%h%—%Ç%÷&'&W&‡&·&è''I'z'«'Ü( (?(q(¢(Ô))8)k))Ð**5*h*›*Ï++6+i++Ñ,,9,n,¢,×- -A-v-«-á..L.‚.·.î/$/Z/‘/Ç/þ050l0¤0Û11J1‚1º1ò2*2c2›2Ô3 3F33¸3ñ4+4e4ž4Ø55M5‡5Â5ý676r6®6é7$7`7œ7×88P8Œ8È99B99¼9ù:6:t:²:ï;-;k;ª;è<' >`> >à?!?a?¢?â@#@d@¦@çA)AjA¬AîB0BrBµB÷C:C}CÀDDGDŠDÎEEUEšEÞF"FgF«FðG5G{GÀHHKH‘H×IIcI©IðJ7J}JÄK KSKšKâL*LrLºMMJM“MÜN%NnN·OOIO“OÝP'PqP»QQPQ›QæR1R|RÇSS_SªSöTBTTÛU(UuUÂVV\V©V÷WDW’WàX/X}XËYYiY¸ZZVZ¦Zõ[E[•[å\5\†\Ö]']x]É^^l^½__a_³``W`ª`üaOa¢aõbIbœbðcCc—cëd@d”dée=e’eçf=f’fèg=g“géh?h–hìiCišiñjHjŸj÷kOk§kÿlWl¯mm`m¹nnknÄooxoÑp+p†pàq:q•qðrKr¦ss]s¸ttptÌu(u…uáv>v›vøwVw³xxnxÌy*y‰yçzFz¥{{c{Â|!||á}A}¡~~b~Â#„å€G€¨ kÍ‚0‚’‚ôƒWƒº„„€„ã…G…«††r†×‡;‡ŸˆˆiˆÎ‰3‰™‰þŠdŠÊ‹0‹–‹üŒcŒÊ1˜ÿŽfŽÎ6žnÖ‘?‘¨’’z’ã“M“¶” ”Š”ô•_•É–4–Ÿ— —u—à˜L˜¸™$™™üšhšÕ›B›¯œœ‰œ÷dÒž@ž®ŸŸ‹Ÿú i Ø¡G¡¶¢&¢–££v£æ¤V¤Ç¥8¥©¦¦‹¦ý§n§à¨R¨Ä©7©©ªª««u«é¬\¬Ð­D­¸®-®¡¯¯‹°°u°ê±`±Ö²K²Â³8³®´%´œµµŠ¶¶y¶ð·h·à¸Y¸Ñ¹J¹Âº;ºµ».»§¼!¼›½½¾ ¾„¾ÿ¿z¿õÀpÀìÁgÁãÂ_ÂÛÃXÃÔÄQÄÎÅKÅÈÆFÆÃÇAÇ¿È=ȼÉ:ɹÊ8Ê·Ë6˶Ì5̵Í5͵Î6ζÏ7ϸÐ9кÑ<ѾÒ?ÒÁÓDÓÆÔIÔËÕNÕÑÖUÖØ×\×àØdØèÙlÙñÚvÚûÛ€ÜÜŠÝÝ–ÞÞ¢ß)߯à6à½áDáÌâSâÛãcãëäsäü儿 æ–çç©è2è¼éFéÐê[êåëpëûì†ííœî(î´ï@ïÌðXðåñrñÿòŒóó§ô4ôÂõPõÞömöû÷Šøø¨ù8ùÇúWúçûwüü˜ý)ýºþKþÜÿmÿÿÿáÞExifMM* z €Ž–(1*ž2ȇiÜCanonCanon EOS 5D,,Adobe Photoshop Lightroom 3.5 (Macintosh)2012:07:25 23:40:21‚š&‚.ˆ"ˆ'02306J’ ^’f’ n’v’’ ’ ~  ô ¢†¢Ž¢¤¤¤¤¤1 –¤2 ¤4Àú2011:07:23 09:40:422011:07:23 09:40:421ŠÿÿÿÿAE“Q,930602934FEF24-70mm f/2.8L USMÿá/http://ns.adobe.com/xap/1.0/ 2011-07-23T09:40:42+10:00 930602934 EF24-70mm f/2.8L USM 230 1.1.1 12 0/1 ÿÛC      ÿÛC  ÿÀô"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ÔŸSÏSÉô¨—RùºÖk#Ÿ˜S?¶H®6δ®vû˜`×C¤]å†Myö­ãæ½tú&®¬Ã I;–ÒG¢è÷9šØŠn9®SEÔææ·`½x&˜$hI/Ë×­R»“#šV¸ÝÞ«ÌÛ³S&m;Qn+œÕ¹&º;Õ-œ×?«G´×<ލŽºpWâ‘”zïuÑœæ¸O®Uó\õÚ;žYâèøjóO§ÎkÔ<^¼¶kÍjêîáÊžµÏkPpÕ„Ž˜œ&¾Ÿz¸O.Cæ½Ägup~%‹¸®z‡e'©å~.Lîë^iâD;›5ê~.‹ϯ­yŸ‰ãö}kÊÄÞœÈÈÍHž¹£oÌqKJâ=qÀf¤CÅ5=G526‰*r8©£§¯J…=øüêd…d÷7W&Œò*xêº7(ç8ëÕ¼]߯2ñL_;dW‘ˆ=Ü/Cqóâ•P“ÅI$cy¥ ŸÂ¸Z1«õ§ÎM8/)Uy©lÕDtcÖ¥ÔÄJx½«6Í¢ƒ'S‘Ži?JrñR]‰³Ö¤LþudŸ¥Jƒ¸ ,}:ÔñzjhÛÖ¡ê"dÁëOTHÙ§†Í Ü‘z ÓºT{³Ï§“PØì#`SqJ[Ži±EÁ+ˆÃ=)§Ò‚ÿRjÃè—ßbbÒäÛ7I|²Pþ5QR–ÈS”ck²¡êj&äÒ¯èÖ‘Í«[.°^+Y%ò€}kïφ_ðKOøÿÀöú†—©\NuØî?vHà«GÖ½\»*­™s{+iÜòs,Þ†YËío¯cóÒÞÖ[É6Z£Èøè£'d>Óœç÷¯¶ükÿÁñOÀÅ¿åoØé3ÕtÖŒ ¤‹<²c† sŽõÌþÑß±Þ{m¡xïáÁÛ¢ëL‚þ 0!ô|vÉàZìžA‰§ä½åÓºî™Å$ÂT’Q~ëëÙöhùc@ðÆ¡â],4 Yno$äD£æ5ÐxÏà‹< Gªø“G¹‡OrA›i+g£ÿv¾‘Ó¿f]_á7Ž´xQÉ·eDG$wSêé_{Cmá_Œ þÏ©ØÛ=¶£†æ eŒŠõ²Þ†.i5>¼'1â¹ag RŠpëÜüGÆpp:š2I¯Ó­Sþ ÿà­;ÄsimaÚ_DЫ¨HàgØô5ñŒ?d½_Á?µO êâ_ôV²Îå:¡Ï®85åãøwƒŒe~k»iÐõòþ$Ãcܣ𴯯Sȳ‘ÖŒ|Üšú÷àì+¦|Cø)â{mZ‹­ì´läÝÈN@ö#ñ¾}ð¯Á{Ýd¸¹‚Q$r´L¡O 2ê+NAŠÂÆ”¤¯Î®­ÓÔêÃg¸\S¨£/Û×ÐáÔzÒðpM}ñCö½ð7À[oÅ$Ëx$u³Œ|‡½|ìÿ#üâÆåÕòé¨WVm\êÁæ39QwIØ^½)Ï¥çä×!ÒÆž=*7<*Fûµ¦šÔ‚'&£cïO~iŒ*Èhk9éIõ¦Ÿ~i¥³ÓÖ†R»×4ån8¨²3NW= ‰Ç4å>µ ÉÇ$ÓÕ²jdR,)ÀçµH¯Î9ªÁªhNãÍg"Ñn6ëSÆsïU£)²Å•8¥#H³ò kž×"ùNk«¿‹Žq\î·ÊÕŒÑÑMž}â(øW¨úÛ¿ø‹u£„·ÓËEujÛàVù[Ü)î;b¾ã.Ê–´jT¿,—OÕ3àqùÞ'2Nœ-e¯™æ_ÿàŸ¾¸Ó¾ÙàéDar×øÜzíéV¾x‹Zý™í›KÔ.M߆]sgÞlèÈÝãïíÍzv™ñCJøµ¤Ý¦*XêöͲîÜ­»ûÛz©÷é^#ñŠk”Ž ê᢮l®âanHËC(<)#8ìONµô²ØÑŸ·ÃèüºžDs ¸ˆ{îëÏ¡õ¾™ñi¼3â›5;˜|­f%û<Á·G3¬;‚;Ö/ÄÏi3 'O†=2y³¦IÂFÍ×þÉ Žõàß µaâÏ„røcǺŒêºbâI´pË M*ï–Ä€²á{5p1Õoþ|BºÒ^èyMn&vhgå‘GÖ¹QûTÞéF]>§kw xdwGr¡rÑ8þöÒõíÏ\_‹?ì~'øCÁ~3ðì9%.|Å–9Êh\Ž…dØAõ¢zjpÒZ;~æ\ªÊRP–ÝÏ_ñ_ƈ¥ðžŸ«I0vÂŽHÎ?ç> ø—DñΩkyr#BÄœütÍ|Û¨üD>&ø3 Úd³@7Íäa³öR]ˆluP³‘ÐÖ—ñ&y¼!§Z鬯g–;(ć <àg†÷l ÿ¶+›NU*(òë$šó:0éÓ5öv=ÓJøŸiàŽ'SÓçºÊ,6ÓB§0=´±²Àt`Àô¯Lo…~Ôµ¨øi"‡íÌ&‘8ÀlÈžkãoø¼}©x’o2X¯^Íl!ã,Xw9që]wÁÏ:Å̶° ™›MdóÌjÎ P Þç(ÎN98¯c‡_UÃWî¿¯Ôæ„§N­X¦}ûJ|3Õ¾0øxh¾ÌJZoxåm¡¶§@kãïÙ[öC´×~6k6_¬I¶¶¶"t•˜‚>¼_B|ý¨£ñ^¹ªÝ™Õ½©ØIàpóÍCàߊ6xþ=“3K4ãb¼àþ$W—Ë(âªÒÄIlv`³jØ:5hÃKŸþÚ¿³Ô_³ÏÇ ÝÃq\0Añ±‚–ÉeÐ`WŽ;zÿúëôCþ 'â½'Æú¶…á_ˆî|K«Àd¸‘3ã™ìO'èµäŸ`‡Ÿ³}Þ£f¦ïĶʷsJÏòÇê tÎ3_œð¥hÕu¨+A§+meÙzô>ß'âŠS¡x‡ï&£~þoÓcä–“Ö¢wÏZ–X^4Gt`’ £@aíëP·ñiê}˜ÒriŽ=jCïLaëëM0µÈ›ŠgçRIÇZa?çš.¸ÐØ4üÓ✼PÙVœÏ51Öžj[¸Xž6⦋‘ÍAÅXFÈ⥖‹Ó*õëUã“Jy—Ò²‘¬tDáýM_Í¢¤»Ÿ]'ÞúÖ•Šc¬ôáëFÄûWéãoÈÞÒ—WO¤&1šæt®H®£IÁ hêtdÈ®–É>Qšç4qÐ é¬GÈ3T¶¥€”ÉWŠ™GÉzT´\LËõœ×5­§ÊÕÔ^”×9­®U¾•ŒŽšgâ5Àlלø©qº½+ÄkÙ¯:ñZðÕÇQhz44g–ø°íŽõæž*\3û×§ø±~fþ•æ~+_™«ÆÄ£è0‹©Æ\s-0t©.ÇïŽiŠ3^cÜö£­.1J«Öœ?ãCE¥`QúSÀÅ(\Šv1Ö¤¤ì"ŽM;n(”p;R4»µ*œŠ…zTŠÜñE‚×&N• û¢¡WÅ=_ŠØ—#<Òc'Ò÷h'Š«þð=ÿ.š- ?6Eþæ½?ödø5§øÏâ3øâ42Z\Iò¢H6ä÷Å_ý‘>k÷¾7³Ô|#–$p'G,ƒ¸±¯Ðùÿg¿ j˧ëZ•”vÚ­¶×äWÅqÇ-½(êÚéºgÌæYŒ¢åI=:áÿØûàgˆãÕ~ê±K °f†árèGnÕîú_‚o¦ÓÕî ¶[¶MÏ‘†>ªiÿ>!Ù¦“%¥³Ëݼgc)áÿƾ|‡öÓ»ðƯ.­Ãç¤m„%öKìTô#Ú¾ïÃg‹Äaåý­E®utÝœdº4×Sã3%,Kö´çyGÏUê{CøòÿÁ öº¼B8î_5q³Ô} p_u X4ÛoX@÷Znàníã“æŒ¥Ät®xþØú6µ~‘|[µ’ÁßäRFÂÒö?wÁUpNø­ï|8¼ðJÛë µ #Ä^Õcßs£j_¾¶ž&&ÞLäqÏãÒ¿i£B¢¡b¶òõ< Ô”'Í-Àx§á®«â}?|ÔÄ2XåŒ1·‘ªÙ¨4{ºL uŽAžáºW‹ê5‰šà›F¾1Œ¦¶º¶id¶™[¤Š¼ºn^Há÷?Qø&EE»ø,Ú¦dϤ^7›lätO4Ê:„~qÓ‘ÅxÇí1e ë?¡ÕuKÏ êKäê¶Ñ+3¹] L€…,pË÷[…l¦ž+(Cš†ß"¨bc9òÍ™Ãßük¿²tųˆZ —qóiÇ8. ÿ®·=7¯*>ðà…îOÆ}SÆ>Äpi1íF:n£;F'´ºt–\ŒåJ‘» â†Çþ/øVðu”³ý¶?hÒ/›ý”Eä·ÿl©ùÓpá×'x5Ìü4ø‡yð¦é¯¾JÚÿk]iÌþeޤ½JÆ)΀Ê7¹My᪪UV¿æ»¯O•ö3 °ö”ž¿Öž_3Ò%“þ¨e¾ð¢ÝZèW^ZÍj–ЮŒy„±\‘·Û§žø£Åw^7ZU‚ÜÅe}uý¤¶KÂÿÒ¢¶ôó6¼I#žmâ-RÓâGƒæÖ~I›˜äûF™>ö¯I5o™¡É!¢9h‰8$WŠüZ’ûâ?‹»;5¹ƒX³`𤄬°Ï ÅæË£ üG >õkœQto*qóVÙ÷Kô0ËíUÚ~þ éŸ ~"˜üK/öºÀún­o%…ê2à µ&H™1×ÌGsþöáÜ ÀÔìf¶‡[Ño%Üb’ ›V?êHI³ÎA+õOa^yâ¿cWž¸1ËsoÉpÅ G(=+¯'ª²†èMOã?ßëe»ÓÀ_ð¼»§ŒçæïeÇ]¢C¿Â²zž\&%NP«-]7—UóßÖç]jNŠÚJßðOK7ˆSÿÂÐŽ×Y+ÿ»+˜å™NÐfO/’;w×&–ßiji#ñV»¤Ïs _èR2à ¬#û\.ó8 €H<¹â¼Çâoˆî‡PÒÚÚA]¡AM΄q•,K§h5õ9­F•L_Uè_ ø¡á}JßÅR¯Øu4 4hrR> ξ3ð¼ ¥x?^¾Ôo¢Óæ¸hí¢ško0Ì0ò™&yåg©Ïj‡á·í/ÃßÚÅâ[£6£pÒÏ$9ÎÈÔLû Ï µôYäa/dídô~ŠÇ™…rW’é¯Ìúų÷„ÏÃí[Ä^'µ nD–še· äq’@õ×Å7K‡ù(Åzu¯¨î~4·Å¿ éZ<!†ÛË^F%Ý|Wš~Ô_Wáöö÷‘Ý&©#« òØ Œ{u¯ÌxÇ/§:pÄaà•¯{vÑ#ô.̦§*‰¶Ý­~úÜò´ÆëÍ<žôǯÎ9зøïŠfx9§½©õŰ!™Ãb”("—7q‰ßšrriúÓ”cïRT㦌óíP ÏãR©éžµ,¥«%VÇZ~ìž D¾ôõéžjmrî:Šiö¢•йõôo—­;ÇÒ° ¹úõ­k ÷b¿E?:m(çÖº)øZä4©þe®£I—p4ž‡a¢É’+¨ÓÎcÈhRò2q]V'î…R4”ñÅ2clj'×|Ò{šÄ¥yÊšçõ•Ê7½tCrœÖ°¿)Íc#¦Sƒñä7Ò¼ïÅKßJô&Cb¼÷Å ÃW]F‰åž,LîÍyŸ‹ïâ½GÅŠ2ù¯1ñXË6+ÇÄžþ᯾Y³L#¡§ê'ýj4|òžç·¡*ò;S€â˜½875%%aëÒQ†"ŸŽæŠN:Rô¤nôÇÒ‚ÐàN*E9ëQªäSÕp{P]É#<Ô£Ž•cŽjTË9¨{Žäªwtä×ið“àΩñK\ŽÛBe$czü¦¹-*ÌÏt‚Ep¹äã¥}çû øKÂ÷þža¤˜9WÉü«ãxÓ‰ à%ˆIߥ•íêyØìS£¡»=ƒö-øGyðßGŽÏÅúLQLª•!ýë¸ý¦~(ËðÏCIb¶†k&!ç =ë¤ÕÞ™¢ˆ´éÞ5ùY‡Q_~Üß¼I¬éÒÙMePžýêüƒ±˜ž-ÎéÚšœT”¥mn¾hùÊ´UHÊîÍõÐÓø›ãMNâÖ=_ÂÀ_FxD;‰_lWYüdÓ|]âYWÄz4"R<¹x¾W…‡Ì‡ß¬_ÙËâôÞ›ìÚ–µ=ŒNÁ.bó=ŽyÅzÆ­ÿÄq[Ϫx~Ò[©—šÆ(ã#¡SÊŸc‘_è®Q“ÐÃàà°qq‡òogä|'8Wp­fÿ™iuæs¾1ñ Š^ü;¿½K —3é²yw*¾Æ2®=ÔƒLøwûaè ’ÁÞ =#QÌ’èÒ‡ŠÏÎ=M¡lýšRsû²Dlz9Ï—|Lø=㈭i·SÚHyTG*.:’¹þÎiºwŒô­ÎÑtýOZМc,k5¡Ôºü¤qÒªrÄaê8Æ›_'ù¥Kg;üÑõV›àÝ'ã!mOá7‰.´½rÔ;Iksó{2Åcãs(ÆäSÎ)ÍqÿôÝNm zhuk8Îî!—ý½Ø'ýÆükÏþé:ªAý«§ØjdÊû‡”Ï2H½vämVP~úyÁ‘[Ÿ~*êú—}­X´¶s¦Ë¿.Ý™fm¿1Ì.îØã'Ü×Òåx¥ mÏK­tÐñqxkM(ëÛ¹ÇhŸ®<®ÝZj0L,ݶܪE'”›²ÙXf zn8À'k⇬[Z[ï†÷-½Úù·úlã Güõ…‡Ý<ò˜!‡@­Ééo?j-2ÖÊÖÏâQ–âÁ£ öxnìÔ€¬¬«#.*ÙÀëÅex‹áv™â[Xµß…z‚yjn`…ˆÜëÏ Êñ“œ_z蕬Óå§8ÉEÞËuéåù‘í)'$ã¹úùxâD7·±h^=¯j€Ø\™1÷àâ Ù<â"“þ _|ZŽo.›} rÆÆC{mJ bñt*±uV8ò¿x®[ËYßV„YrÉ ’Ç˺2¿4m“ØqYî4ë¨õE7"ÉÕËJ<§rŸ|6UVÈ<ƒkЯI¨Ç ˆÒKX½Ó]¿½:ë1MOÚAh÷ÿ5ýÀôOŠ~Òí¼_ªXøsíÐÛGs¤3`ÈËþ¸DRv³4müC#¨çÊgÔµKKËÍ=æ¼µ½°’7¸Nú(Ûgïq÷f…]<#|óåŒnEñ!b[k¿5.o-a"3aµ#±[Âtß";-BêY.¢UQ$?+&ð<Ý’ÆãûÍÇcÏÌr:1‚ÅáehËt¾ËÓOO=­å¿e \œTj+Ûúþ¾íöóÝr éž…ï"Óuˆ"¶šÚà6ñöˆäVP¿z96m%z«zŽzkISÅÞ*Ò/¬NŸo6“e¯iÑ>@“—Žh¾R@1ʬ8'µYøðËHðÿ‡üK ;ÛºÝÞ\Ca#¬Ö¤­Å°Vê¤#°Œ8ãÅx7ÇQhšo´¯ˆW×—^Óo5{¤LˆíCD“BW³ò¥ç‚$ù{ã\5iR–Z:?r_$ÓOÉê×vµè*±ççŒÚ¯øáÝJ?‰þð”ZzÍöí6èAs wÇ òîvÿ¶`6º§­-ß‹ øCÅcMgŠéešxce* y2D~™Ä~Œ aþÍ2Éa­xÆÎîT¹‹L”´m ÂÈ¿eºŒð0?‰ªSê:•ö³ªø¡¯‡H;çfØn®.eŽaP99ó@–99Ç‹[ ýŸJ5¡¯3”W¤n“û•ÙÑ,DÜ;$þû™½ã_ŠW+ðSÃSj¸W×&‡M¯!Ÿ=ÄQ©ÿW àJÇQ¶üºšJæäµËùPܾ[ +g"À!PqÆy&µ>-¬þ+Òü=c`"M?M¸Y§BGÉÛ½º"ãîî!FO`kwþÑåÓ¬'¹RßJDû5„*R'‘ŠÅn®Üã /'æ=ÏŽ-ÔÌéa¨E]Å}íÛ_MqËIGêMìßäCáÿ‹:Äí4Khfbhn&O$Ä6˜Ô'ð¯p½{šúGâ‡%ø³¢ZÏ­êimo§Ú¼À•ó&¸“„~˜¯—îõK'ñÔÚÏŠf¼úmËTا“çÉyq[Û1b^K‡ó“増b2¤ýCûjWÞ$ñÆ©âßU®‰ˆ-ŽŸ¥iV*\ *-¼mÉ Šö³r8L¢®6XUw…ݼíú_VwÐÇÃV)+KKù_õ±ó“õö¦²àqÖ¶|o§C¤xÇU¶°IR/%H–V " s´1Ç\VC®G'øX:s”GcözröR]UÈOŒ`qÍ+O4ƒùT3D†‘žè4½sŠ\v®;=GzP1J8çúP99¥p庞®iƒÅ*J›"@çõ$ÓsÍ8žjcùÇ­˜?äQR_)ôüZ€u­;R†My¬~&f“­lišûÈFM~~+}OTÒu%$s]^‹¨)Ç5åZ¨ÍŽy®Û÷e¶ò}¨,ôÍõI\WY¦N89®ó+í]¶ŒùAšcØÚò9§ž´È¦+‘KsH²¥ÂŒV°¿)ö­û…ÎqXšÊå[½g3¦œˆWïf¼÷Å+÷ó^âDÆîµçž*\î®*‡§Dòϯ/^aâϼ޵ê^0ãwÒ¼¿Å«÷¾•äbïàú¤s=B*mUvÌNj¸o­yrG¸‘(l r¶ïZŒ”»½iĪù<ÔêØëOWÈ©°Ù)n(^O•Ig§KxÃËR èt/‡ó_º™cé\˜Œe2½IXÎuáOâfP™îÁ5£cáÛ‹æ½GÃTV¹Rôšé£øm“à½;õò¸®3ÂS—%7vsVÇrGly^ðÅî±ç–úW]¡üLÈOá]u¤6’ áxí]›…95âb8‹ˆø6>3âYÆê,µðSàŽ™y®Âº•¼rnlmjû3áÂ-ÀE-•”Q±ä(¼‹ölðGö¥ÊÜÜmõëèÛ»±Ó•eA×=+ð.>Ïêfu S”¹ti=>eåq˜º•^kœ÷ÅMnäh3 m:¡ÚØàýkáßx³Ä¾9»ƒ_¼¶WÜv#Œ$ŸB{×Ñ¿´·Å]CÁÖR6‹0-È*q_xïö…Õ&¼”ÝÙÅ*–Þ›X{ƒ_³ýðXŒ&+ˆÄÁ:OE¦©ùùvÜô3ìµÁ*©Ú^º?ø&w¾øŸÍ¸ºŠÔL¨>x|ÃÝ{åcý§5¿‡ÞoÍ÷–¦bòÆòå‡eÏÜDZ¬¡ñŸÄ¾*ñ[Yøÿ웲Z+»Œ)ÿtÖ‰>ê$Yõ¯ˆÚ¦Ÿ ÈD†K Ì}×${þ磃Ÿ"«—Å´÷¾Þºþ§ç’Ÿ½É‹jënç_á?Ú‹_ñר¡ñåþƒ¦Ìþ\–wŠ·dîÃéÉ®¿JøÇyði×Âßê'í92ÎÖ»í'$òpSé_1øØ|:ðö§f캧ŠbI6É·m¬@ô1䊗Vý¢føy¬ÃeàÛ›BtTkd¹[„‡'ž\Ðý+hÎ.g‹’SZ]6Þ¿…ºhþD:r’J‚|¯£V_çsôà?íµ¡øËL¸³¿ÓÍž¥nÁntõ¶7:mØ'™¢ÙóB{’Ç|ñQü|øyi¬è÷Þ'ð¶«lÖCþ&Ð@îl@òƸ2DyÄÄ6;‘ƒ^û9|@Ð>)oóµÍ½ÀŽßQÓ¶-í±eÏ–Pczqœ7'§#ïzÅ{k6†oÉt/4(ö.¡10É, 6´/qЫ `IÃp¬‡R¦´æš}šÙþ?ðç+ºnÑkËúþ‘â(ø©¬aÝxsã÷‡"ñM­² jÖöGû^vý¯Ot>j¨Ú<ØLú€5åºo…ôoÏ4ßn,b²Ôÿ°é÷R[£0<¼v’nDaÎL$Іè>–ñ”ºĨFñ&©¦ÉáéÍе+èÌ#LŽºÞBCZõà±Úô¯œþ0è—ÿübÚWÅíûFÚcƒÜnÚŠ@x¯¡àÈ8ea×h 6kYSP…Òækf÷^Wè¾ò9Wm“Ý-ŸŸ¯ÜŽ\½½µÔå¾µ&âûØöäGÏúÂ<çHèp„Wiâ‹êwS]]yš¥¾#œçrÌœ…»IÝÉVÎsœóÆŸµ!á¹5Ÿ†×·^+Ðv²Oi4žV¯§•’Ž&+Žc‘KòHr0+ÃtýSO¼ñ¼ž‹xU1Ý¡òfŠeouèÊÃåp:ä0ÁZõ°¸Ê¸zÃT‚µÓW³ÑèÜ%ÖÎÎݯ{"•(Ôƒœe·õgýz\è§ð£xVÓg‡Œði¡ŽŸ)2$Dä…ÇÍŒ¡#O°º¶4{Åzc¶š²êQ¿™%”±©q,k2'¡™@e!X ‰õ-Rì±:8•J€Ïg!ÈFëòëî+‚ñ¦4ív/(ýîݼØÂá'Ã^›ÚHqž´¸ƒ*§—Qxœ+µ7¤—Evµ^WÝi¾0ÂÖugÉ7ïwïýwûîŽÛQø¹7ÿŒÑoD¶¶>Ué1¹’‘ã ²!þ%ùñ»¦ë[úoŠóâ7Œõo%µÝÆ­¡µ¶”nŽáü̼G×+RPEyå¹·ñ¯…—LñÇg­iq€›NAŒ©"cøhV_\ æ¼#â ¼#ªjÒ_oŠ}%ú 'æÚÀ6u Ž}Ï¥|œ§‰Ê¨ÁM^ŒåÍu‹I¦µÙ¥øßÌõ=œ1/O‰+5ßU¯¡ô7Áïi¶Ë7„LÖ¶þ‹kiË6↘:e²Å€­žO5ƒgo¨xâÚoØ1‚hMަ÷·'1F ÞZ1'“³c¶?©Èå¼ u-Oâu¼l é67r # –ÂxÅ[О}_é¿ðÜ]êÉ¢‰$ŽmsPH&-ÆÔÚÓHçhR[ŽÕêFQÄäµ9Ò÷$×kÝj£ääÚëdÎU \y^éyõëòFþ¿âÍ+þÜzƒ5)5 6(ê{æ*ÂèC¼+½•²¾¸'¦+²Ó5ûáu•Ä\A†B'Ú²^Ç$cmm´}ç—‘3±Ú2™O WØ__[Ö¼]­j:õÄ ¦˜!Yôéeœ’>Çþd)ž|ƾ?ðÿÅCÃwì­!Iõ9 ¤jËä™TuŒò¸AÅ{ÿìóñO^> Ótï†C,zu´‚ÞwMè ¬L²†ÆÓž€ûz ¹Stp®¿ÉWÐÁËš¬\Uÿàœw¼?wáï\GªÙÉferñ«Å—?{9ÉÏ_ư˜qÖ·¼yu-߉fû]Ô7Ž€)x‰dºƒß©õ¬6äq_ÏÕ^j›¼nís÷|<¨ÃÚZöW±ZM¹©g9¡c=€õ®FÎÎQ›sGSÒ¤13Kåà~®;ãòþTçš—ËQ°•!Ëaxæž©ÎivŠpÖ“cµÅ Kô  pCß5&‰õ¢,wTÝÊÏF·¸Ì¿Jèti÷c¹8'ÌãžõÒh“gúBGâ7;¿IÊäþußøiò¼çÃÒrµè“în4ËLôOõ®çD?(®ÃÂ×w¡¶T{Õ!›¶â§ÆG ¿ U‚2)4hŠÓ®A¬m]p+nuÀ9¬}]~SYLé†ç âEá¿Jó¿/ÊÛ«Òèï_ ÄLºFì+òϯæ”ÚªìŸÞ|îk˜Ó•ä™ÕÃãXt a±úU=CÆÇSb°«ë\š“ÜÍœœU…ֲᱚ飕ӡ?i-YòŒò´âáÍ¡ØÚ7œù$]gƒ4Á«jÐÅ»«ÜלøwS{Ù‚ =q_L~Ï ¡ÕÌsÈUøeö¯#Š8ž6Mny8Z3Ì+(GS×~xnO éq¶Æ†EOñGãuï‚ti–K6¸iù‡jêîôÿøG´E{°f‰ðòJùköŒøçcmu4³Olíýâü§ó¯Éø',ÄçÙœ«Î.\Ïmzù JPÂR5+XòŠ?cñ_‹˜X_Ç„üöòõü3\/ì,¾"@m4­fn›ïÀè'ØÓï<¥üFÖÞâîq ÛŒÅ4X>õ­à„FÓÅOñT ö³óÚÝJ¸Y}·{×úGáß .œ£xÊ×IíóýàæxùT‡$$´ÛMþZýç¢~ÁÖ¾>ðéŽÓR¹ÓüB]šÒbùIy)õö¯Ÿ¾;üøðÏ]…uM.ç]…âwY";¾Tûãõ^â¾ÒÑõ ÿ6³á =®Ç0ºÓ?y·÷ñœ€рǾk3Å”ü$×tÿ©ƒÄz<Æþ4–?ÞFXm‘ú†úÌ}ŒéòR÷"ïªëoÔù§V§´æŸ¼ÿÌøJÒeücZ‚ãX·k|‹+s¶(¾ëLN8ÔõÃ>¸’h¬ÒcLÓm-$Ô£.²F¥@ê9v*§§Zú/ö²ðç‡ÓJð†Ö`÷»N–Œ!’{w]à+tʰïž3ë^=ãYü,ýŸ®üS®[Çt`·†ÚÂÊPWΞåâ¶Êm)P«Nà[8s_ÄØ©eÓT(AJnI%æÕîÞöI}ý¸á\¦ŽpêÖÇUtðô ç9%vÒ’ŠŒc·4¥$•ôJò{Gƒ´WÀº¦µà­TêSb)ŒÓ m/,$*_Y¶ï.eeŽè’”àŸ«õ=Yø§ Ùk~yìµV··¶›™OVã¹\œ¯;ÈEqŸ¶—íwðßÇz —ƒ> Zè“xBÊïQ•lÊ/Ø%Ç=ªß.mÕ ü„´x—"·ìwã«ÿøKS±ñ5ñÄ>¸ÇÙäq \ÀÊÙV8cÉ\ƒò“Í}â[œðUž»é¢ºÞ××ñ{Xù|Ö•-18Tý›nÜÖæµövÒûkdµé±Áþ °ƒJ»Ñ¼yi} Ýj«$öš­‚ÊÖÒ6e–!˜¶dÊUH$‘Îj¯‹~-išŸÂßm£ÑííQmlµ ÒûG»laVH³ä@)’~S’Eiü@ø¹sðƒÆ‘Þj6©cquöèLa™ìä 3•P2ßÞ*¹ eüzÕü'ñ "Õ%Œ‘²rG,ä¿t;ßø¿ûWƺnŸ ]Æÿ:9#nõ”}`÷€ë]ćzƉ4 £jšeýµœ…`ÓõupÊ=#¸Ë6Üvæ¸_‰¾*»Ô<%†»5½‰Š\5‰½[¸bãïÀÿxTaÇ8â¹³?öj§(rëåïéòºoùM°ñuf¤š•ô}¿?Áúœþ…âä°‹ì–×M¼cýÝeŸ•Ç¡8ëÒ“YTñ>•·Zh‹+`e9Ü{÷®vêš6”óé1ÍnÈ}¾FNÙ²Ž=Æ P[«ŸÏíå ’ÌÍö0UíøÁÝpëëŠú g8aaCBñ¶·½¹_š½ì¼’óÞÙÖ¦G*2Öÿ‰f{Ë­#Ä"y ½¡YTMÁ{rÀúà²ò1އ¨¨!ñj‘\j©²{ëKY!UÏúûv NAþããð4x³Àé¯éɪxJã{m2¬JÛ£™;ùg¨>ÇéXž‘ï.t‰tö ¢ôØÜzªÍ€¥è+âsÅ_ ˆX)&¨MÞ.üÛ¤“‹ÓáÝ'­´nÍ– Ƥ}«wœtkoêûvùžý¥k kð7ÄV[ë[¹-¦G Ç÷H«Ïb6¨ü+ðlj£ñ'Å}H9˜[(ºXŒ@ au´HÙ£?ߨ²*ÞB{S<%¢ß|9¶n¾™]2K÷³A»c!Ç|†È®jËZ‹Á+mžúêâHíqÿ.èÈKÈ=ä =†Ozôsi²‹~êZM>ëWç«ÓÕ#š”¢ñåÖ÷·ÏOÉ_ï=SÄZþ¹ãO -žž‘é/©ÞD«W>Q‚Ú-ÃÉ ;ò¡‡Nñåµ&Ð~Gi¥øBݼA¬ÚÄ'y+ ížâa~ËnØ g.ù$5`êÞ.šÛD°Ò4Uóîmm¢³‰¤m¥æ+™CÎFYØŸrkòél-$ÓVW•l·s*ùrߺ““÷c!œXåŽk›ØG V¬oQE6Þ‰=Ú^wû–úhë›Ú¾Xméÿ_ðW©|2³‡ÄÞ%[×ãUÔܱžâwm[åaC ^WTc• ´mëúû X'Äß;U†´U´{(.î.TºÎê1k…U#h\ N+ó»à«\h³F5‹Á™CC¼ÿj¿˜ãR8à•¾Ýø)âË/†º4/cyo¡s $‘çÜáoŸ¨Xø%Shã‚Üšó)â=¼'*ŠÎZ¿%ÿÌÞ¥.YÁGÑ[«<‡ÅšžñN§¦Ý˜LºuäÖŽabÑ–ÙISÜqY¥3šµ¨\ëÙ®$%šy^R}K1cüê"¼ó_„Õ’”äãµÙû­(ÓŠžöW!òÿpÔ}iLxéX³R&_N)6sÅJÉIåóRƈÈçŠn:b¥+Ïz@Ÿ­ACqÍ*J~ÎsOŒf‹ PGÖž€:R‚Ö¡³D'–GOçE;výtR.ÇS Ÿ¾5ÒhSc…i¢Í$£p>ÕÖøwÃÌÛw ý6Ìü!É\é¼;&íµèžÉ Þ¹Oxi¯AðƘ®‹ÅÜë|8¤…®óABg½r~³Á^=ë¶Ñ`àU"®kÛ”b¬‘M‚.MåÒ‘¬J·ƒYªü†·&\­dê‘å c#¦ áõìÿ oä—ÊkŒ`ϵ~QĘz˜˜sÓèy™63ÚâªîuPü:7d•Øg‘í\‡‹t¦Ñï`’äàf½bo[XiÄ30àõÈkŸ^—í—@Nåé_¯ˆÃUö˜­!Ðú¬ÇKK’‚¼º™ú€¤»´Vß™\d t¬½ÂW|ÿ¾$<`‚*{¿‰Ïák³Üùci#µE©xõ5-9„d3KÉlb¾“ ;Ñ©Z»Õü+Ë¡ñãÁÑJ‰oêjø.x­õ(Rá±È¯µ~ÛÛÁ¡Ã-» |uð+K·ñˆn›‘ŠûSÀv1èÚÕWÀm|ið£Pðß‹Ú/4ôÝîáB¼N¼½¬Ê{•ÏpsÔW¤£*ðöS÷e¿“±Ïsö‹TxÏí¹ðÞïHø…¡Ýi2—ðÞ©h·nOü{®Âÿ ò?ÚŸáý÷Œ~ߨx: »©tk›O´&7içµ[F²¸eŒÅ¡/Žá'Šú§ö„]â/ÂË ¨¬í%¶cc HBÚMÿ-!nxÏ Õäß õøJt­4Û”Ævœ[G{ä]j±(8»°ˆWcfµÎâð ¶×ø~2ÁWÃWŽ+ )EórîÜZ×—¾É¯-µ?FàñðÓÄ‹ðS㻡2C\²ºás´âûã>Äb»üKÒ¼Eg¤Ç®jZÍÍÞˆÍ4zUý°Óౘ 4ÒÇ寻°s½Álޏ>?âÏ\ËñòþÖH¦¸½%xå $`v©‹q+ª.ÒFpտ䙕\F1c=“ŒR·¼­­×G½’}Žž%Èhpþ\²ùâiÕ¯*œß»—2ŒdÚþi8´¿»sÔGÇ S‡Éºó¢t2ÂŒ¥“)cÜz’‡!³Èò*ý÷Å;•ðói6º]®½áÀÊך|©‹­>6É3D§+2 òzóÒ¾|ºñ|úx{{Çμ6ä#žŠ;#¨é]‡ñ´«í5–6|¬°‘ÿ<åuˆÇL‘_«áx–W$å¯ÑßNÝ´gæ5²ëkýÀþ»ÄjöÅ×ì6ž!ðÑ@ñùjEͨìNHà0ç5Ãø»áݧĭx£á¨³ñ¨òîlîÓËÔ4÷ÆYwp[ýÖÁÁàö­Ë¯j!Ó_ j°]ÅpåäÓïaû%ݧ=Wo 'åjÒ±¾Ò,´¹VÄ%d’Üm—§+~a× ÀײªÓÍ/J¶´ÞªïgÓ•¦Õ¼¤ŸÈå”g†´©üIÿWZkæ­óÿ1Æ[žqÓ¥gÆS«ÉN¬_+ß¾ÚGÕõ³ÙzÛL=9+ÔM_ú×ü®miÒÞxvæÖÏÁËig$Îg–îåÌê¼nžRpzœ)ö8¯¤gay†5-Ræú ­„_ÙÖÑÆÌÆ9q—vwÊ0‰_Ó­u:†ðWå5ÐÛxW÷z×A¥xsh\×ê–?KR†‹¡lÆÙøI#oš^„2+¨Ñ´¸À¨fÑV-èzqR8®»H´ÂŽüV~“§c é4Û=ª8 »Eo…§ù8«±ÛqCÁÇJLÒ&UÄX²uHð‡5¿uZÆÕå8¬&tÀâÔ»d ’qÍ|ýûRøåΡ-´n Jvƒšü¯]療ÂÑø"~Àòÿì,šXÊ¿G‰ø¯YmCVšRdzM°º/À°õ=G|¤GëúÔº ÷Ÿtú{×ÛRÀsAFÖHþ~ÅÕs”ªK©õ7ìqáßµ^ý©•˜g ûWغ-“Éyd.C_8~Ä·‘iÂ+œnÀçõ]ŒÑ[Æ1ë_Í>#â=¾néC}è~“ÂÔ,_}O ý«uY °[)%ò„œ3Ò¾~Ð> Ë¥ëky¢ëñ;\˽‡_zõOÚçYö ð[\]=kåïê7ºZ²yÒsÑ”ô÷¯ïŸ¸Ù ‰§ûÖ¾%¿¡çf>ÓYò=<Ïdñ_ÂVêõLºÌV÷¬¿,Lß¹˜*òÿ[x‹àoˆb¿²V¶bNö@úŽ„{W qã_Gd[Éîáˆð²1%~•Ñ|;×WÇ%áñn¹u§ÆŸ}&ˆÜDGºõ¯Ø ãRKê÷Róg˜â⟴ØÝð·íd<+â¨um.Â+©¾[ÈaPl¯W¾ô= ö­æðï‚~<ë-?…¯¡ð¶»xìâÝåÝgwžHª‘Ó*xî*…×ìÝà++_í[rÞ‘—°¼h‘3Ý¢|í5Ÿã¯ø6í›G×\ÁëQ ‹`;¹å÷°¯£ÃR¯R<µâšõÛü2r§zRiƒ¼¤xGNÖ´«›«Ëë½Î‰¬žÖúþ°G»‰_CpkåïÚád¶:Ü÷ð¶«¢øji„ÖqM(ž;Bp@I ûªÜ§;”qœÓº‡¦éþ‡5Iu F.ôûËq{k2‘œ)/öÜ=«•±øƒáxïïômNãUðBÌÁhczRʽ1½2{aK•ÓÆSÔgºþ/£]ßdk‡ÅÊœœÞ±{ÿÃ.¿#åS5§ŠõxÒçRÕ¼¬E$|(F?Ö!`äûò;óÅt/†-µ›„º¶½Hs”ÒÜÇåý˜)#Á8UÉ¡¯eñ7‡ouߥĺ§Ã«ë;©‚gòÖdÏÂ&b®pGojà|y¡Lµìx2 Tw¾²1%ǘòK}e„nS˶`3ZðNe§ /›cl„ÅÄËæË'ãÊ\ ž;×& ÄÓoÚJÛüüü–ºt7©§/…_cÇm¼B––ÇLk¹'’-Ë“$j­Ô«²Ž=sŠî4¯iúv“æ}¡MÓ»eC"N7êm4 eûAÐ.žïP˜$”À©QÕ@9)ø’IãWãè%ƒQÒ¶ˆ"ù$·FýâãÈìLW×akO-‚”å}ôíç¿Þy•!C²FŒ¼gc‘rn´ëx§”êê»ÝsÁ·Ð׫kKwim¤4ÌåfK•Oß:mdî3§Z؃’øÃWݪªAméU²\¹-ËökÓ ðÖ™?ƒžOùË{p¹‡i@»qœöÀàWÌfÌó¯ÙµÊ•¶Gm<*ÃÅ9-O1Ôþø¯â.êèzE”E¾¹½pŸßhÀ8Î9Ås~)ø}{àûñoâbQ{b¸µG+ü@ônx­ùáøæwá»Ëm2úãì]¼Ñ$˜'),3ƒÔÅz7Š|?}¤ü€|O¹–}zh̸‘,â'å\ãj¹þè'ýkȧˆUê½ù—]ÿ¯ÌÞtÝ8%¥ŸEý?ò>}Ð-eÕ5DºÕä[ìÈϘGFFU}NyöÅ[ÕašÉî&¶gÔ¦hÖYeÀRHfv' sÔŠéu]6#¥»se)*°ZjŸêºþ&8¼+¨—,ŸŸõ·àlø'á-…ÖÊóR¸šêæ?Þ†{“ò.AŒœs^¯ñÅ—~ Ñ´½‡òI¹Ÿä)å³ *{Ïf¼ÿUÔ.¥…bŽöie‘üžS™ÁU=¶ãž„r8«Ñ©¨‘Œ„ n<æ¾[гéföqø:|ºŸg™ZÃÞ«Ü`Ž•9©±ÓéF8¯‡æ>æÄ{1ïFßÖžžN)Bžõ-”‘ŽšWTäSdÔsWdÎ{Óva¹ÍM'SHçŠ|ÀGåãÞ“hŠqšŒŠ›ŽÂ¦3óÅ=‡5(üi-–©¢‚¼÷¢˜ùѼ,ûµ©cáí¸Ê×Nt¥S÷EI ^Õú¡øR2ìt_/¨­Í3LFFsN†1Z)Ȭ٬QrÆÐ)VÝ”@b³­¥kYŽ”Z|½)’ÇÅXE⣕iH¸™·iòŸjÅÕå5½v>SXš˜È5Œ™Ñqž ‹9ÇJóßÊ–ñ¹ÆMz‹îÂÝÞn€t¯ ø¡ñ. -XHá¤$…QÖ¼¬f!RDâq« œOÄ™²Ž×'9Îx¯‹´95)åŠW¢k,÷Ýk³¨Ï8'¥y?ÅÏö6vR-„ˆ‘ŒŒç«ÌUeWcåëfµ12²gâ[¨tŒ¢BQT|â kB‡æRã9¯(ñÅ›¯êM›€™ÀÛÉ5ë?²ïÃ;¿j‘O¨) °##¥kˆ«K‡•JîÇ«–Pž.J1ÕŸ}~ÊúZ¦ pÄpG»Ÿÿ³gü%:4†D,ÊpvZŸ±÷ÂÒ­!w•ðãwõׄmgÓ‚¹ÝÇq_ÌÜKÅJŽ?–’oSôüPñ}D¬~ü ýš¯|â39¶ŽT ʃó-}{á_xl`Úvò®³Kø}§@~åÉûÀb½ßöö:6ÄQ‚1Ò¼|û‹•*—ÄÑéäù<2ér¯„øƒöƒ×n¼Ïi¦/ßȯ’~-x*û^‚k»­ã9o­~”|Oøkã i¦¼Œ0Šù÷ö«øQoá/MöD U{ ùžâZXis¥ïÉîz9î[[5¥(7û´¶?9.cû-Û¤¿yI5¿ð·Â÷.ñaî>üý¿g}_Ãv+;Bʬëí^“¨ëð‰;z"(×'$×ÍŸ¿o¢­…å´WaAQ·ùÕÿ¿/ø~¶·rÂÑ[ýžiBÜP) Üõo¯™áÿƒÚŽ‹s'ˆ®m|7i6Õ¸ždݹ²Å‚['€qŒúŠw‰|mâ{Ï FÊÓiÐÝ.¶‡ìê™êÌ>ÿ™B4ÒntvOëWz“àÏs$…m¬rA?òÕ¿Ùz湪F…LM“÷Òÿ|—›ÕüàêB“ihß«ÿ€Om©i·Ôuï³jóxr̬]ÝH¡³"ã,ÇyÚ¼÷Í[ñ¼,<4÷’[ÚD׃ËÓ¡½B^œ ȱ•-Ÿ¼ß1öí›%òüPÖmì|xSMÒm[ËŠ`(‘bvèO©`2j]t=mSÇdêz½ôe¡Gb€ûONGzš•9ÓŒÔ~|ZZý]÷z´¢¿‹åŒÚ¾ýºùyz³&÷S٢髗g¥Ú_2,x ¿Þ‘ÏN;ò(`½×üJÿÚÓÌ^GÄpÅù$þ,®[i#%¸©æ½gAñÌ?á,›Z¶†+Ä·ó‹J»ZÝ|Ý‹å¯Eàm°æ¹x?Îñn­¨Ï)’8î¬c¦$}wŸ^+ó®:Îá—å´ñîݾö¾–Çèð¼ø—7X­³~š=þ{U·Ã/êÖ0C¢Y]y['–âx.J9 ¤y|ò2MRÓþkvzP6VŽ–3~öÚMéÝÔô?Jôß êÖº}Í»Å_++€ Îzb½ûៈ4‹Ýl¯‡]-òù’Ç4 bßþà>£9Šüw,ã*²|µßý#÷Î"ð^–’©‡O­íø'ÉѼLÐÈ/­|Gwiæ쩇;z–8Ê®;õ¨õ?†¾.ø³á ¶ðö‰“áÍ’LŽdew=|¿¼ìØ?1¯ÓÞFÖ–·ú~™áé.¤V´yv¦[œŒr ?P+ÇúwÚ4ûÝ& µ²Ô,ä_64Œ›Çhçœ×Óá³Å¼T¯ßwó±ù]^¯9òaci/æÛÏK#ò·TøK.ƒaå]Þ˜n®HQB`ôÇ\Ö>à‹­F1§kÏo;yŽbiÔ.?ƒpÆ=s^ßâÿ…ð&¿vº¹3ý‰™mñ•ÀÎAÅqóø]o|:öò)3¬í,MƒéÈÍy_ë&¥y,,ßGÿ }F3ÃŒ] 9bi¥'ut¿gxWà–º=þ·lgkcg$²ù°’°©ùÊX1n½€õ¯Gø'à õ¦•üBð\D-È!XZ8;Î~é@äw©¼Câ Káïü! YËvÞ&”ÇsPwB±‡“x?/·žƒŒœ×¬üðMŸ‡|Q%äË$ßlÓ ³ÅÎ@—Í?8e=ˆ>˜Û_¤dIc`ñ1W{Ÿß±ø¶oBymW†©¹ÁxŸÁÏáo i1\(óq†*ÙV^«lNE`ã­zŸíC2Úø²ßO²Ë·²b sÇ÷Åyv29¯ŠÎí\á‘÷ù_Ô©ÉõÔi^Ô¼R•ÈïÍ⼃ÚHn2y§Q‚=éqǰư SNiäÒ0Í!èDÃ'š†*f_ïSŽ´½é¤`zSÙýiŒô %êy“ÍçåQ^gð=õÐJ„Ðb½{áÁ(4ÅFž 6õâ³­›QÀBéjVW’ÕÌgìèGsɾþÏ3ƒÝ@眒E}›û.|)[Yí‘" *ǯ‡–:œà\…À8Æké…Ÿít”ŠâÄqŒ‘_˜ñgFµ7M»3÷ðêYl^'=ZØöƒ>þÆÒãÚ6€21]Íö¡4Qàé\g‡µ´ÔXá?/LWC6§æÙ“(ù±Ôw¯ælÿ9öŽnmYõXl#q±£á}BkC÷„í¡æ»{›à,–í^wá ½·¡ëï]MÍÉ ç­~s›g5qøÇJúEjÎÙ`”)]žvã9ï^ûfèÆo]é´â¾ƒµ¸MåœÆ¼öÙÖÖܤX9S\y6oW˜Ñ¡KnclMãFqK¡ùUñ&?³kwƒ†5ŸðâÎk‹ýÅÒy8©þ,^â;œde³G‚|Eý‘hXœq_ßü=,l®ÜWä!æØyýzªk«üÏgðUÅž‚ë<„y€tïš§ñ§Äíªhe·2+<Ú¼”|T[]I›Pvã¶p+_^ø‹‰t¨Êº4H8Ul“^¦Y‘Ö–aM¥fÞýw–‚º2|$.nüÈõ«ÛÙ =¹b>‚ºh|/¥ßùþ Ò¯µQÂÎ\úš§¡|N·ðýººY@zæ²|YñZoLÌb¯¢þUý#…¡(ÅËùêsÕn³m+/-F´øÿá­*ÐÛé~…†Ý»a‡åRkñçÇ9õ¹¼¿ ØYØ…áCßøè8®XÅ{¨ÜÄ fe Œ*þU¦¿o4×oC Ëeå21ô‚½xÖ¯^<ªôV8eJ9]Êå kÞÛ¿žà¿2û°ÃÔÒ·¦ñiÄ\iÓß^µå¸]°§ Üÿ3}›Pñc|>ÑéVÊíüžl£Ùwöæ“G¬\´Ö>}ÜÓ`•O¿sÏQôQZÊ­L"ö|ß§ ãN8‡Ï5kkü$Z„PÁ… Xáx[=Þ>õÜiš¯„t‹‹rþÚïSƒyQ/™¸éµÈ!GA…É'Ò¢Ót+ÂzA¿ñ°I®’0°ÀŒISŽõ9è9?JÂÑ,µoZÉq¥B-ôÈ•åI±·¾ÏR{¸Cè¡CêRnÜÓjëËÎź¾ÙZöŠ:+Mvû⦡lšÅÓÈ–êA{ÝÃn™ÀÂà=uüëNoèÖ—w×z­Ê]YF¡-Q”3ßÍÜl<".rÄûMrV6–Þð‰Ÿ]™ÖöYË‚'8ñ—=I8ÎsUÅ–§udoGm>&&[˜‚ÁAéžç+9VÑJ­.zVßž×]‡ìÕí rÇaú;kPÚjØW÷ž2vʨ‹jI)TF™ö,@'¶¦›Æ¥¦éúÖ½t…"™,þÊ‹ò @¥¹'°'êjÖ­·áŽ•q,ææÞîò°–ùŠŒ÷É@}…UÓ Ôt‹=W-¿LK—o)yb’¾œ®~½«aÔ`îìµ]"ù¿áÛ5æs¼–ŸW¡ç´.­ ÷Źtÿêöšc_òèE˜È»–X^„p8êåÆMzOÂÍ?‚£]’rÚ³j÷¶´Iˆàv*Öò«8ËG,Y'º°*Tד|Cð™ðŸÇ=C]BŠu˜Å‚yJ˾FUW>¥UN=N}+èÏ„~ m{á–»Y_ûö­ÅÇœ|»Õ¶etU·dRFÎÒy‹’á¶0ùA¯Á|LÆÒç©Cùfåx®úôõW~§îžañxLʆcB У7¦ŠI-oÙÛoÊæ$*øp¡ˆÏ§é]v›©É¤ÞÁ%¹eeÆB rÞ–ÞÈN×¶É5ábërîA…‰ûÛq‚rsÏJÔÓíf‹Ä‘A©>Øî]HÍ‘*1Àp}_jü’¦Ý‹Sû†5£7(Íh»õô>…øoñtér×Þ-ò²—¶ç$Œc>ã» |Soª\³éñDv¤œîuÈàWÎÄW~˜«¸I-ݼ‡ Y2G|^+¬øUãg·ÔfËÂÀ1þèŽ2Tâ©MŸ7‹áÚu9±4×NO>ø‘_øŽõãó'#pk‰Ó4i&ñu²îWØ·&»_^îÕY÷­›4Ÿ<:¾ ø•¤ÂÜ——~áÛäW••M¼Á%×Cn ¨e’¾‰&þãšø³em­~ÒZ^Œ®â/ø{ûfí"À´²—Žõg0¨úf½ÃÁ¢å|C¡I­Ç\j؈àáaÎ÷!sÐüÝùÁ¯'Ñíà|mâ-l³6·5ÄPÒ 8[†çûÆ9vûÉžõéŸ/ä×|M£Ç{æ[ÝÛ‹{©â Ÿ.S!!OÑJþµÈpRÀBžÚ^ßqþsq.7ëù•jÛ®g÷^Ç?ûP+7Ä[†ud ö¯5+ÇìÿµÝºKâß´E‚]Žï­xØãÒ¿1Ï#lmMzŸ¤dRæÁSô"aè)=ÏZŽ´Ó…5帛yæ—¨¦“ÏZMÙ©hkQY€éQ³úR¹â˜ÇŠ› ¡J‰Ï¥Hçõ¨¤=}h$aàâšÍÞש¦0â‹ _ ÓÍ&)äŒñAÇsJ樌§ÖŠxOÆŠ.QûF4Lö&œ4j놌AúS¿±ÀŠý]£ðžc1ÅXƒEÙÉÓe€yå°P:TZãNæZKÕr3¥i p´ÿ(*â—)IØÎ{ )ÍR»¶ µ8À&²ïÏZ’âÎGÆ:Ši6Hä )5ðí¹ñfMNâ{KIHœàר´‡Œ°ü=rUö¤ üßø ÷Þ:ñt°ÙDóosŸÿ]|Æy˜Ç ÉØÏYÓ§h«¶yW‡| ÚÞ©%ÅÀ's=ëд†`°KxŒŽy;GO­z_ÃÙ¾öhã—U€Ž5îø#o¥À G rvŽkò\ËŒèÐO–wcÊ8W™MN¬\cæxWƒþÐ<ñ¢çÐZël<2ˆÊNkÚîüo§Ù0P ÇaŒWüM½—B¹i4ÒÈã@¯Ï¥ÇÇÕt”½ãúwÃÞ¤ùb•­ÜÜÓ~MjçB™ •yã~¢½SáwŠu­3l:Š 6ðYsʼ#áßÇ­HÝýžþ×ÍÇ•NOá^ïð÷Å'P)$ðü`x§âÅlj—÷S4">c…>û}Gð­yŽ©¬Mmvð鋇—ïÉŒíÕ!¶Ô/,Ŷ–ZÒ&;¤—’SîMkS7©]8%÷ÇZLêÄ7:Öß·H÷S7îÒ3÷aÏ î}ë·°:_€ôO6yæ“Vœ ¨ô>µÁø?Â:†«"C᫆âkû‰L’Ü¢ŽõÐx»N´Ð´¿.Å¥šî2Í1ÜÓ7p>Ÿ•^ÔÃÓw·³wü;…XƤ£þEy5W¹yn59šu^wHÄðIʯaž­tqx»Rñ†%m*7´Ñì¬͜ œ#°ôü0\_ xNoêIéû=´¼’N¬’~µ£â-pÝmÓô'X¬m[ )þñõ&.zP”ª6¹¾÷ÿ&”ÚŒUìTðÒ]ø«ÄPX[Yg8MùPy‘`2qùõ5ÓkÓ›»];Âß¼´°} ü·2näÇ»`gØ Èð¬ðèþÔ5[“ä=Ù–¡Ž$›'æ|ž}OÐ{ÖÇÃ+o+Ħöó–Ú&™TžÄ2~¸È÷¨ŒU%jZËv»tþ½ù§yÛE·©sÆSC7…ímodiïn¦’kÂ6ü¹r#Qÿ|“ê)Öë=ÿƒî4V8\_P¶‘›nwÔg¸æ3’?¥q:±½×çßHÅ7ç¾NÓ¦}«GÇP]=–›©–IôËY-æ á”,ŒÃž¹ÚÀŒzW?×"çR¤¢íkzôÿ‚kì£õßÐàuý:òßã\:‰¤’s¢\-¬lüyJÀ0-Ž9Ü}óÞ¾ øw¯Ë¡j[RÉ" )å$àa½Ž+Æu¯‡—ZõŒºÞƒ7Û¯®¬üÉZL1Ya8å°¡sƒžÕëÞ ×¢ý¢Ù?Óçk}¥rq|Æw×­7x¹“Õ¡£^oÝ’•¾Z­{Øþ¬ð1¡‹Áâ°N>õã§®år·Å  ø¶I4ÇŽ];PAwjñä(SáÊùO@WÖ·~hP|T†ëN¿˜[_ZÚ¼Ö-õŒƒvÁø~yö­Ÿ ø2‹Úudž4 «ÝwSv»Òäˆä[Ë´æƒÿ,ÝVl¤¯RÀWáMámGIÕ¬ã–Êé±yn]vƒŒ«.ü uŠøœfá T»³^ŸÒ~WGôD+Jtê`ÔíZ r½5ºÑüÚq}ìÝ‹WÚëjQDê$ŽÜ*„ rvãŽ:í]?€å #±=ñBKÖšã@•&ÒnÙn#xˆ¸Ücÿ€’Gä+[Á$Á*ˆÈv•7aGÝ®Lbi¶ÖÇÒaêB¾2‡Uý'æ3ÄzöŒiƒŸ³ÈÙPœŒô$úV·Ây£ðŠîµMDb-'K¸¼vþàTÏæz~4û(Í|¡rûÞÿZ]MH|âD»mƒRK})[Ñd“t§ðMuðžëÙµ kw$|?ˆùšË8U½ íêôüÙç^Ö×Äßo.oÔ[Ý óÔ ´IœˆAïó–'é_Jü ð¼Cƺ­ÍÝ»%Óàœ9$Ç\þUá^ Ð-õÉ•måKWT³BpDh¸ÞGùë_Gøg[ð­Ô—îYÊ<ÿ Wõ´ÿqFÒwÓ¼ÿ8âz©EnÏ ý¢5—Ô|Xcf$FÍÇãÅyÑ9±ã­|øÄw?ÂX…ÕŠyë_‰æ½¾"sO©ûV_CêøxSìˆ4Æn9¥cúS×"W;g¤ßúR1Ïzo óG-Ç{ XúÓIç­ yëM/ƒH/q§SQHž͞•u©°!¬ÜqÍ4¶:æ”õ£mIi ïÛÒœ£'¥ µ*§Ð ›–†ù%ºQV9$}(¥qŸ¼ÆJŠDaÚ«ÌØ×ëgàä T,qOšN*´³VcD¥À¨Ú^* .qÞ«ÉyŽô2ÉîfœÖ6«uåÄäž‚¬]^qÖ¹ÿj]„‡=Ee'dhšÿko­å‰[‚M|Éà-Ä 4‘±ó“À¯rý¥õS5ä»f¼SCÕÒ+‡1à¶prp+ñ1SPPS·+ ñxµ{.…â+k%P eßµñŒrýéH°ã1x¢Xîv=.kwÂϨ뷋ö•/÷Æ¿Ÿs,Ý9Ë•zŸ»d¹Tä¢ísÒµ-Õ»7¶{“‘\7ˆ`·º™à_˜÷é]¢é&×L-rp;šñÿŠÒÍu#®œì9ëšøÌ–„k×äƒë¹ûÐöqi;÷ÃÝ I´¹W¸XÇ9ãím!¶­®Â:ù7á—†õ ˤ—·=­}+ðÓÃN·F•ÁÇrzןŘeFMJ³läÏ)ý¯ivzÖpƦ v«sjÂúÖâC4Û‹ÑpšüÁÐs–§Çò^Z–_PSðǯOZŸV¾ò´ÆÚyÅf¥³E†ëTuoÈR“ž+®x7 ŠZ„ÒQèSÐ/¾Õ©:Î1Ï©ü[ª¾“îØm>†ªióD\¼ së\׎µgy0X¢Žä×»–à7좷¹ëáb±„™Ÿâ>-jݤ½ ÷ÍxOÆMËìS x‘ȵz/ŠüjR ‚OÃëcR°”ÌÀ–­~ÝÃÕq©u=,}‡ö2ÅÑ”jì|eñÄIypª¦0 àq^W¨¿‘ray)<‘×ð¯¡þ)x=àÖ.C.CŠðohRXj ÅN9ϵdp¦o”cgºGòpÅ\å8ÃDÙVÛÄqYFm´xŽOßž¿ãLmf;i?|Ëô'5‰5áÙfîçÒ®iz%­´‰uª?Ÿ1¬}Mà!o­ê _Kµ ß!'P;ØW þ mZÓf˜›Ñ5‘åÜØ]KÙ¼¦ÈC†éìkŽÅa% U…×NÇN…*ɨ;3Ú<] ñZÉgÛiö ÛÚmVÀùÜv'¶~µWÀ¾&¶ðìZ“ܼÛncY«žAçúW-âÝ\é6zq)Ó4¨vƧ’Xœ³gëÚ°ôMrïO“Ê.ê]ƒçsÞ¼ÚÙŒ¡ŒçëÝm±ÛK¥‡å¾ºž•¤Î|Y6©=оÛXÔ`pÎ.?ϽZñ'‹Ï‰µç½¶·2Lê“:¹ä…@ ¿Ýæ©|;”i^¿½³Éû¨só8}ÌÜ{*ãñ«? n´{¿‰>Æ×>‚fî¯m-ÍÌðÛàä¬dçvÑŒpžqÏ­:’úº»ÖZµùXóýªI.…­BêK-^ÀxU® Ò^'¼y-_O‘—ÂŽpî å[ž•Ò| xîôyô{Ù ×’êTÇ Ìñä”hØgåÐÔß´%—†¾|XºÔg{û«ÏyqɧßHK™ßaó‘ì @Ž9ÇÃÜF¶·êÞQ¥ÝL¢`ˆIØŒ’ `ú~uùïä‹=Á=m8ûÉ>Ÿ/>¿©ú‡|U.Ì£ˆJð—»+nÕú>ëuúl~Å¿´´¿uøFà‚;¬^‡Õu@GŸ5º|ÂÔnRQ“ ËÈ'¯5ÿð'$xgÅÞðÆ£m£xÑndÔôû¥>TK!_–'É0f}3^nÚWö;6ÆC-µ³mVnLè|÷àÄéÆÓ…(Î2’ro4š4ÿÏSÜáÞ$yÕ8ΔZ„•õ¶7-Õ5ó½Ö†hm-ð!r óTþ$Ø<^°²³‹tú­ÛÈ9èŠúãó®ïM²&&x $íÎÒq“Ҹϋ—²iž(c W–ÒÙtÛdßzWüÛ…}_…9oÖsWˆkH&þoOÔüËǼùaò?ª'­I%òZ¿É à_E6´×6ˆßNŽš›¿‰¹9ü«?ãÄ)D’YY¨£aÇsÜ×Z¾"±ðo€ìÒ?-n–¸wõáþ.×µ¬K19×ëœ]˜ýV°¦õ‘üÃÂygÖk:óZ#-†sžiŒ0)w~tÙ+òÓôáŽy¨Ù¿:q<ša­!àóMëšu7¿Z r~œÓ5!ç¯4Â0*yC˜ktÍFÇ=)òt¨ØüÜM  ñMßéI»šÍ¢Ó‡Ÿzz?¢Z~qÍCF‰“Ïz)Šù(©*çï+ÏóUy§â¢’犯-Æ{×ë‡àãæŸ¯5J{Œ Oך¥q!9¨e¥af»Çz«5î3“Q\JsÖ©O1楖‘5ÍîAæ¹ï^gO—'µ_¹¸ã­s~5½èò±=A¬j¾X¶Qò?íGâ´¸¤8Q“^5ðóW†úo0á:}Ðç©`z÷‚>!\ß"‰PËÚ¾G‹âŒ6—@Dãp8ãšô߆¿ã£HÒ8=‡¶Ïø}Î.£žo²ØúËFñ¸Œ(þ5»¦NøbI¯𗌃²º©¯PðÆ .•HaœWäyŽá›ÐøŒE'IÖŸiö˜¸Ëx÷Ixùæºÿ Êpj¯,üÛ'1pq_;G5‰\ÌËtk%Ðó itéJÍ“ŽÙÅsŸ$ñ\×J¶Ö?»8ã5ƒo¿rŠ`ö8Ízøê´êÊ0~òG-(Þ[…¢Ot¬ÿ£DKO'¨Úéõ=ÆÛ–Ӵ@]Í!ǰۜ*¢—ÇHðs,K´È"wÏrk;S×n/,bŽG%¹ã#©=k†­RWm}Çd':­;õ64]`Ãoö àý¡ã”åˆ)_äkbïIL´Òä‰ã0YÜ•U ò?„ôÏlסIæø™fú®²&ð•ÅØó‡ï#n\{ãƒõ®Óöxø¹âïx²Ä[™¯ü= É Ý–£+´W ÊAò¤_ÞFêNU”1ŒwÞ ¶³¹¸¶Å-ÕÎàZ2þ\ w%‡ÌßA^±á­* NùuOÈ‚ÆÅ6ªª„Œû(¯—žCC5N5aAîšM_‰ìás|VSQVÃU”&ºÅ´þõo»cìŸ~Øú×üÃáˆÞѼ%¤ø+E7v•Ô“½äÐ!LI¨©8V~Xò1ÉðïáijÔþhXŒÊà‘…tê+‹ÿ‚vBû|Rµ»À5ûeŸêÖHñ­*Ô÷Ÿ’è¿_™ù—ˆ|HøÛ:… /ðih¼ÛÝþŸ"?ø‚Y.2å€ã­`Ï~´·7y™Øç&¢'šùŒf*xÚÒ©Qž¾ (Ò‚Ð~þô×9¤Ï­#?<ç:[°ÁäÒ1 ôúsAëíM+’ÝÆŸÒž´ã×­6ªÈ›Œbi„úÓ›¥Fi8…î#±<ÔNÀ·éÎÜÔLi5`LJ'­3ÌÏSA~ fÕ‹‹&SëÖ”·]¥ô¤2穬Ú6DÍ'!KÌY±ò“Öµu=}TñÚ_âÓô €æ¼ìʲ£I¶gV|‘mŸ ~Ù¾-:¿‰ÞßwÎI¼¿Àº´¶S¨F!sÈ«ŸµÖñŠî%ÉoœÍ`iw&ÒMËÁù}f¤ÛÙŸ+‡Ä¿¬º©žÃ¦ëÒ"+oÀ#è+ Ò|tñ&Ø¥?\àW‹Åâã{n9ëSGã×cˆ `µóY§ ¬Tœ¬~åÂ*Ôw\HcMyçŠô“xLÐñ ôï]½ôm¡b@8ú×5yRÛ²GÒ¿VË1/ “ƒÛCÐÆa)ãh{ˆòo«´Œ.oµÌ^Y%Æå‘y¨ÓÒõ$¶€¨Bò[½U—X‘LXáGµIg£‹Ø3‚ 3QÑ´|¶6Š÷éæÎ³äŽèùzù%\=5V[2´ú¬—,½°;w­ À€¬š‹Á9PkHnÇš sZÖÕnDñ€ùOLW¡NªKÚÉÝö<—FMò%ó6õß+ÛÇo.¨Û˜Žõ‘ Ó_Ü|Œc¸â Ó®¢wÚK dž•¡a_efŠEÎxÇZ¼ñSM4éF’±Óh0Ã&Œñ[g(¤»ß°¤ÓlÕ¬ã7òí’ uì+ÏÅ2YZùÄ8nqüF³5?jÊ!±@›“ŒÖÕëÓäŠëaBmØÞ»ñ¤U“¤¡žg“h/ÎÔ>“â”Õ")¨LfÞp«ŠåbÑÛ]œyíîMliÞ}ÔrX;CÜ×jÕ‹åµâl¡ -w;‹ì´ûXCu Ä/}ÜÕ-;ÆWzƦ¶×˜í`8Tþ}jµŒ°GtòjÅ_n§Ú–ÊÊ-CQóm¯<Æ+¢¼¹%KO/ó2„T¢Ô¼ÿà“:¼ü_×íô¹æ‚Õ´ÓFåLáç)õoë_Pþڵŷì×ð|2KwñV´ÛI‡ ´Dq%Ë/uŒõb£½~füý¤õßÙ¿Äkª|1kvöïkqÜ&kyãb×PAÈ AÈ9ìMlüEøãã¯Ú·[±½ø±ªýº &6†ÆÚd·µ³F9o-’Ìq–fbp:Wç\OÂXlß<Žw˜Ê.5GÍtíkêûì}MÄ}YeØ(¿i&õõëúGˆ5»¯jR´Îå®d2Ï+¼ÎNK9þ"IÉ&´´éÒÙ!€çŸZÃñÞ¡…®DQ0ó^zT^Ö…ó’NâMa˜g2Ío(|'Óa²HäSŒ*;Ôêu}¾½é³×¥(#µ#ûæ¾rögÒ'¥ÆäœQ“ïÍ!ê)sZ"$)÷ÿõP{Rgw¤Ý޵D6.>˜¦±ÇZ €ÓLúP@9Á5Štœâ¡‘¹í@ #Ô2HIúSäoJ…³œŠöb$óH?z®iž½Õä §[M)'Œ-z_ÃOÙ3Ä^9¼Ï·xbb ùNM8ÐGh«™UÅÒ ¯9e¦h—:ÌÂ;ÝØöQšé-þøŠñ´±–LöÁ¯¿ÿg/ø'Õ¦™i jv¡ßœ®I¯¥ü+ûé¶0.Ë$ÀÖ½zª+ÍØùüOFœ­M–_³?‰î -œ‘œãI¢¿höYÓÕp-#Ùh®¯ìw8¿ÖªŽVã\Uþ!Y×>"Uþ*âo¼hŸž±oür9zúËc¿ºñ:õ Y7þ,UÏÏ^{¨xì/G¬=GâœæJE¨ÜôMCÅÀg-úÖ6¡ãÇßy¶¥ñ âJçõ/ˆ\œ?ëHµž“¬xÅBœ?Jù£ö­ñ‘šÊdWÆAØj~>gæé^ñû]kõbÇmñ$¡µ I9ɬÑ6Ä;zÔºíÇ™¨HàΞc·ñ_§ìàŽŒµ±íáòòMiøkC¹Ôd ùT>½éº&ö©8÷®¦É¢ÓÔ Ø.NõǙ殜]:[Ÿ¢pžAõº±«VV‰­¢øvP·/+Õ~xfѧO" Ç=My>™« «•[t'œs^Ýð†Úà’r‘'¿S_–ñjª”¥9jÏꜢTèaU:]dð׆ݭ•-ÕTZ±|9y¤ó98ªž×Ì.æ-øWg¦øœ]@WžÝëñle|E)7GŒ•)ncé±è)Æéë]Ö‘©-í°Ê Ö¸n4¡ÆG¾kOÃÚœvöøi0Gšòñt½¼ú˜¦±æ[šþ$¼¨@®6k¶´˜°<WXÉ]o©à⸗EsÒv’Ñ¥{œüº\—‡1œ/sPÁo5…ÆØï]‹x P‚Ü£!WñÍR½ð¥ÃÉ™P©t¯bž&Hé-}O‘Äe8¼4µ¦íèP³Ô"·Œ½Ë·š¯k¨ òíŒ~Z×O­Ä%f<ýiWÁMm6ÊÄöÅn±-«tG²Ú‹TµfdV÷°Êd¦{VõŽ¥pعp1ÍU³³¾ÆÄÈr)Ëo{¸òØc½EjÍjûz3ühñ£7ŠÊ™Þº? ûÒ1ôýi7s‘Mc޽«DÈc™ø¦3þ´›ùâš\îâ¨Í«ŠÍLvÀ©ìôÛN@–PË+î©5ÙøCöwñ'‹¥_³YI7vZ¸S”ߺ®aVµ:ZÊV8&n)özUƧ Kd•‰èªM}[ð³þ Ó}­4o®,¬OPGôןø'–›¢¬FkPÌ1ü<×¥G)­WW¢<\NBŽÕŸž ýš|Iã9Ci$HÜä®M}ðŸþ ·s¨´Rë‰$‡‚w+ô_áçì›a£Æ‚4\wÛ^·áöÖt£þ^Þ%§ e©óx¾"­WHhŠþÿÁ?ôí(ËY©#Á^ñà/Ù~ËCÙåÚ¢ãýšú?Køuoh£dcò­h<'Cå@? ôÖÕ¢¦2¥WyHóß|6‡JU!òûWm1ª3Z+¥ù\(¦®žåûÒw‰Ÿ5ÊFˆŽM·œBr(§©7?õˆ ƒ‰1øÖ£ñàÿ­pž$<’Õ•{â<’s]›\§q¨xíˆ#q¬kÏ»“‡ýkºñf#?­gÜëL¤®^§]{â–9Üç'Þ²nüK¿9cù×5.®ÄüÆ«M¨œrsšEØÛ»ñ`ÜôyÅ[í1ÈIÎu7z–È›=Åy§Ä½Ty2á»øž'÷´g›É(E¨K¾þRÜòj…ÑÊðzSµK’—}Nj¸—|uòôŸ-ŒÙÝšº?ˆ ª…ÎN™­ï澟‘´zõ&¹Ý9–)rþ½ëvÓQS… ðqÖ¼ìu©9F;ŸqÃ8Ú“j2©dŽÓÁV/ss®zó޵ïþ·µ±µµÆ@PzW;ñ X°û²~ñ'®ÂÏâK銤8-Ô(=>µùÎ{–VžX³úG†q•·>œ‡Ä–Ñ ,vŽÀžksÃþ3¶3æg=q_3x{Ç÷:Û™nd;3…\ðk´ðÆ·(¸ŽK‡äž™àWÀcxwÙ&¤õ>­BS\ÑGÒßÃyi¹œŽæ¹éµÓe9ß„˜ª¾ñlNA#®ìtô¬ßß,„¼-¸ŸJù:7 Žœ–‡n«ø$ZÕµát8'Ú ±1òÇŠæ×Q}ß¼9¯iÖ_iÆ>µê<'³…¢z¡¡×Á¨¬J±¨¯f2)y>j¬NŽ¡³‘P^x†8Îׯ+‚4[—º9JòЯªxôøÎ ÀôÇø‡Ä¯y²ŒÜòMhx³ZVˆùX?Jäïu¸€ªã&¾‡/ÂE%'O®É㔤ŠgÅ_hs¼ûW?âuŒ£œÆZÝìä.IëT™¥¾L;f¾Ë Nœ³¤áM©DåæO"VßÉ=2kI‚ï í=1Z·úX†à<½©/uhã¶òð}k顊m'¢¥Vþa´®åf–Eó9ZKÙBœÅÐÔ_ll7Nõߤ®ŠU5cÊ($õß²9#¡«Û£™ry>´Ù4ó³æç5½*î›ÜáV7kRˆ›çù¹Í[‚tNp9íU! ør8«Y “sÖœ¥RÆAG†¬”*Á]y 5úËò•P>•Vm6+©1µyëV^ÕW$íïQ@ÍÆ[‘šê£ÄÅZ5ljËrÙ¾iQOäC'ƒ¢c¼O}&(HdŸj¿s¬ÇqÔVEÿˆÆ;×jÎs G•ÔvþÂZ¦»,m«$Œ éŽ+韃ÿðO{;-îíT·ûµéáòšÕ·Vð‡ÀOø¾Uû”ˆ­ÎXs^éð«þ ߨë²Å&º²0<‘ƒŠýøuû$XèèžM¢.?Ù¯bð—ÀÛkOܨÇû5îaò8CYê|Î/‰jÔÒ#â¿…ðO=?HŠ#- 'ᯠ¼û!Øi ž]¢Œz­}£xÚÅ×jݶÑá·*Šö)`á¢>z¶>¥WyHòï üµ°EÄ*¸ö®ÏIømokݨü+«Ž ©N}«§Ù#‰Õl¡cáè¬øU¡ªGÐS”dÓêÔR!Êà‹ØT‹&‘õlRq¸&9,Õ¾õJ¶ ž”Ô—©õ)¤Åê(¦ý£=襠îÏçëWfÎMPŸT995“6­×‘Š¡s«‚~õYé\ÚŸUäæªË©‚:õ¬ µ±Î[š©.¼3Ãb“W‘ÐOª`ýê­.¯î sÓë ˜ô÷ª3ø„õ-X®k£wXÖuÁÅywõc3Ϻ]cXß ÃsŽ•çþ)»óf<æ¿>âZן)óy¬ù´8ýnBd8ª ¨”nN1W5FÜI'šå|Gª‹;N yXJ^ÚѱòóŒªË•º—ˆÖlTšcV\°$zטjþ ’êm±95«á;v’UiÉ95ïK)§ì¯3ÛÀ)eíNúž«aã.$ÅXÕô®ŠÁn.ãc›“Šå¼)j¸V+“Ú»«0¶¶À¶2E|>p©á½ÚqÔýç1¿XIÉÜè|%pÖ¤4ÌB'AšìôŸ³ñeæ¸kKw’4Wàw½£ßCgr«!]«ÔWÀchÆ«rjìýëÊõ_ê×W+ÎåW¯&ºmkÇ6¶v¤HÀ‘À'½yÿ Ó-˜¬Š¸µÊßüC—]¼"BÇ5óØ3ÆTç’´F°ÊRrG½éšä:¨OÞéÍ8Ý›{Àð+Ì|)âÆ·ÚÓ¶Õ]E¯ŠEä{‹½«Ï¯–ÊŒÚKAIÊ“³='J×­³#ŽLÖ‰õÞþä×*þ+1!`à񬧿ÄI÷Û$÷5ËC+”gÍc:t½þhššž¯$°0ÏA\×ü$ È›§©«0ë‘Ü 9õªšŽ”·À²kÚ¡J4ýÙ£ÜÂb-fkÕÔ¢ýÙÈÅU·ŒÚMûÞ‡½C¥ÊtÉöÎxÍkÞ˜/-÷FÃv+Y?dùz3ا˜/…™šô1¼?»<ú׫ڦúúÖÖ¹w-£àVßý®açW»—ÅÂ+]s ;Æ÷ЊD ƒwz‚Hö”f­ÝƂϦ$ÆkÔöÖøNЕմ)#•l© ÔÍ«4Cç9úÓœF[ Yº«®Nõ®˜ITjç%LB°ËýCÏr@Å:ÛV’ð "±/ïăQZx#qæîTß/ºqK§@ú´Îܽ©²jòD=ê”>$·+É5«ø­UÏ”F+:qœånS™ãTž¬Ó½Ô䕉vÆk6÷QØ§çæ¹ÛßÉ!ù S:«Ü7ÌI¯FIu0–au:[{¯4“œÖ” ?ß®oM¿ŸÖ­¿ˆÒœæ±«N{Dã­˜«]3­Ó-R,g¨­¤Ö×N‡†Á5ç§Ç)ûâ£oϬÊØ1Œ>Y^¼ÒhùL׈éaá&婵ão<Ñ0V<æ¼kÅ–rênäc×Ö½Ëßo¼i,j©!ÐW²|;ý…gÕV3yfÇv9)šý/'ËV %«?Ÿx6þÓ«)7¢>!ðÂÝWÄ:ª}ŽÑö“ÔŠûövýµmtÀ×pÈޝ­>Á>­ìfŠIí@ç?r¾Äø=û/Ùxv¶Û¨#Ã_CS±òx||°—å>eø'û GAö»PN%kꆿ²5–˜©þйþ÷ïü0µ³?v€jô]3ö–1¨¹µ *+DcˆÌëWwlòŸ| ³Ó£Õé^øumb«¶5…\ÕgK¼ö«SGœÍl¦ºákÙlæÞ¬žÇF†Õ@UV„*«€ ®²íÔö¬²žMthŒ5e”lÔŠùúÔRb!œÓR|ž W#àóÖ¹ ¿óÃqY×>$#9z«œç[sâ³; cŠö19´1Ì1\ˆëü;(·A°Œû×O§^‹‹ˆÃž‡$WŸ‹ö±qƒÁ­;Å©o"¶rzù|ß&X:‘W?Bà."TZ¦Ý_´»O²—lzæõ=jDwpØÉªž2Ú ÛŸjν¾7sp~Pkóê8 R›çGõ~QŒJ*iݱoµk‹é.Äg¥tÞ \• y$c5ÌÂTt5»á#'Ú·&vÖµÅÅ{&–‡´ê'£Ð–1 ç<ŸzœjÆq¸…^Ù¬™5¨´ëu3°,i‹¬­Çñξ[ØJZµ¡ÍR·2³5ζóräí*æªìûýj½[Ž"ÁÇëQÜÅžµP¥½Q…,BOBÕž´å»ñ]›®NOá\´A ki¿+ج±4a%±¼±I­MëœL›‡Þ¬iµ×Ó¥ÚZ´ÒíYH®sÅaGÏsõ®|55)rIho…Åëf>ÿ][°wã&².å³jË{Öß‚{Õ»6ó—ç5ìǨ­]f>ÅhÆÍ¬\sëTnµ"#нyc9æ¹ÍwP[PA#ŽµÛ†¦ª;Eó«u ŸI; fÝøšGÎæ•ËjÚÎXüد ÁåêjÍ)‹âGu#µƒÆ{› ÔOâE“« óVñŒòÝ)’øÀ¯;ŽzØ©»¤y¯Œ=š÷¤z#êèzBë±ÅÎA5ç#ÅÏ*á:ýjH5K‹ÃÆyô­VMüÇn4„—ºzx©g"«\xÂI›e±<ñ\晣Ýê. ϵzOÃsk7Iç#ž˜­iåT©»³çñÜWˆÄ.X| ^øŠñp¬ÀŸJúCà§ìís«ËMÁ#¨®ÇàOìÕŠ%‡ž:Šú×á7»mc ŽºW­…ÂÁ;¤|v;Vº|ò3?gŸÙžÏI¸¶}VÙ‘œŒ×Ú~ ø?¡¦™ÙmÑJ¨ÉÀæ¼óÁ>S2ax\q^»¦_2Ê8“†#§¥wÎJ 74í£5ô_Úiroô®ËD…P  q\Î’ÎÖ¢YAç½ihþ#…nÉ {×§ ñQW<™Ò“zö‘pð/É“Që2’À•`K‚²GެôËBóJªõ®Pøñ£jšÿ”n#+aŽE*µbº“ R}¾ûÇW&@n”¬`äŸjô/x5]=]W‹üBøÉ¡Ûøsp–¨2["´¾ü_ÓuÝ ÿgÜ$ž›Nk:rqÛ*q授ö»½~ VÄÒ('§5FoÅg(0•b}댾'T”Ës.Õìj¯4‘¨Ä˜ŽäÔÖÄ7°©Ñ]OG°ñ_ö£€Hö®†ÆÈÊÏq^%§ë—Zf£PÞ[}+Ø4 xÉ£©#/¶£_Ú]0­K“R]KPß(<ƒU Ö KƒÒ³®’YnÚI›†9çµ*!“ý_Pk£ÚÉhŒyÕ›ƒQVjT¸ 2*…µ‹4`“а‘˜ˆæºcRëTc(.…Ø¥ÊÒ÷5bk¾)Ãê>ÑœŽËÄñ]€ÀðÔý¬Óz‡$¤t¶Óm?7J›ÏRùÍcZj);FÉ« ÛO¢ñzŽÍM|ùù8Vwš{š*Ô.MÏäbóÄ'®îk2ëÄYêÇó®nï]'?5fÜëdçæéY9v:{uùª…Æ¿»«W3q¬“ÞªI¬pj%2ÔNŽ}w9ËUi5Þ[ó5Ï>­“ÁÍBú‘ÏZÅÌÕBç§xKQ3F9é[ºƒˆíÙ³Íq^ ¾ò푉­íOTßnFsÅ|q b1Ëæpr•Ž'ÆÆI™AÏ5‡ghd—{õ­­BØÝ]r3Lk1 Gíaš¥p¹ªpå+Ûn@í]~U`]½«…–øÚ]ù×IáýW|@“[Ê„ªµcËÅÓuW1¡¬O…bF+þБo6Æ~ñ­Mnï yëYZtbIšFçïÊ”(á½äz=NJ¼Rfä!kD Äà ·gâõ‘Îæýk×µ?%³4íSCžrkåe”Rŧ&ßòìþ¶]Ë-[°ñœÃÌ#Öé^,‚ÊÐ*‘ǽxŧˆö®Kpz”x±Î~s­|æ+†]ge±÷8ÚšŠ»Ôõ©¬#k[v|žËÖ½óá¯ÀkÝ.HÜØ¿êµ÷Ãßø'¿Ãm"Þ[xÖà*‚xÉØX|0Ó툀Ypp~Z‡Íï#ŽxêRÒ‚|!ð$°$iunP v¯ |à„·hÄˌÊÝo…öú5¨¸¶‡p1Vc¹M:Õ]ˆR£ÝN§,t<е}£Ð½G ÜÆ·5Óé·‘\*I!áþ2øµ –¬«¼§Wð÷_“Ķqµº+b9åc ”œUÙîöWVSøU˜:®ãšùÓÇŸï´}jDÑ› @Áí^žžÕ¯­ 6†DG¼V~Ÿû7È· =àóeoïVøˆU¯+a§N‹nzž3âOŽZƒimü޹'8Åy¤›Mw-ÒM& ü§q¯«µßÙ@k–å®ÑÛx®RØRßLÔ¡Ô5iÛ@ÛÚ0HSøWŸW^§Å±ÝOB*Éj|Õ-ψ~#xˆi:l·-pX@õìçðFóះ Ä“HOÌTäœÖÇŒþü"q¾Í¡i, Ä:êþü`µø·©Ü/…ö%œm·.9­p˜xÂvu/'Òç>+çÔ,»ØëÚý¢ÒÁ±éVü=¨Ç:mEg\q]Sø2û-•Y½kWÃÿ­4ÛQ½rýM{« -â{x™=¤sº[ÔŽu¶§Êc‹ÇnÕ466ÐÁ¶5PzUk]4é÷/-̹ ÷Vº)Ðä1Npº±šO¼~^µkJÒÌCt§#¯4}¨‘òÔ%ÔfÓô &µVyàV¼ÌTÜ´F…íðV JŽ;â9lf¹ÿë—W°í8YŒŒŠv¥«âÂw³Üò*ª½Î)ýb ) öR½™g]°Y\L»ÈíëSøgDF·ÅÊ#ŒW˜x?â¼þ$ðωo®"»†m¬0Å ÎíÐäŽyÀÀ¯Gð&Ÿ¯AKâÓ¦À24whýFÁ"¸ãV™)%{2§*1³ÐÞ‡N·²²>•#*ݶ¶Öˆµ8ô{î†Xùœþ®áÿîü[{2› ˆm“%f‘J†úfºÜ©S’¦÷g:Œæœº#°hŽôS<ŸSEu$–†ño>®qÔÕYu2Ün¬¶¸fâ€IîkÉs¹ì*eÉ/÷w¨žè·~µ ¡ïRGC•ËPBïg©y¥Ž,TÑÇùÖm³D¬tÞ¹òìÔƶD¦`@5ÍéLaUº-<î=s^6 -ÈùÜÊÑ»ˆÜYÍRÕ$-Ò¶Ø5ƒ¯6ÈMqá¦ç3åêNìåuæLqÜ×Eá¨<»mƹæýíàú×Ic/•i_Q†ÚEWøQWÄWÛ[ñQÙ]->nüÕ nçϹú†]@ðOjêÌäPGÒdTc )2—ˆu,ÅGz¥…G‘L¼—ϸ$š|*6ö¬hSJ)IŒ©;Þ,°—²GÜý(]MÃÄÔNœTL8æ½:XxKtyÏUirêë²Ãþ­ˆúUý7ÅÒG ÞÜûšÁb;}h^¼UÕ˨VV”M¨æ8Œ<¹£&z^‰ãQ° ÿlÛøŸÌ úõ¯#·¼x*MiZx’Hq“Ò¾gÂp›r¦}VŒëQ÷jž«k¬ïl÷ïÍ[›[ÛÁÉú×›Xøµ˜€ ü:סø áo‰¾#*N¹dnŒP€~žµò˜¼‚tä´>¯ Å4±M$õ'Òî.5ëØí¬²ÒJvªŽ¦½ÛáÏü#ÇÿôdÔm òá˜dTVßìÙÿÚñö·âm;T’ÖXÞU”B7}s_°¿³Ï€õ/ xÖÎÿLHdŠ0®ØûÇ•ÕÉ£V’v} 3.%–¨ÒÕu?¾0~ƾ1ø]«›K»+‰þm»¶‘Sü;ý„ü[ãÉžÖdSØ)¯ÝÏþÍzOÄH\köq;¯mƒ´ü/û:h>>ÉgºŽ>@+®ž_**Òw<ÊœC*«MÆÿ Á(õ‹¹íVÒŽIZõ?Á)dˆ¨»µÜ®kõYükbû`¶'€BÖ…‡ÃºbAÁö®ºX{èyõsFÝÙùŠ?à™¶ú{ª‹`ÄŸîתøþ +cuá§¼¿»qŠû¶/„@β\Ä£iéŠØ¹·M*ÃÉœí‰G@+¦XEÝœ4›k”üÕÔÿàŸ–úUä‘¥²•FÀ;iÖß°¤ söEÿ¾kïøjÖäý¢Ýr¹ôëSxwÁêJ ÁÇÒ<59-V£–iQlÏ„,ÿb+he­€=þZô¯†?±^—bEƧjŒbµõüß ›CñÔZÚWÃÛymvÁ0+Oª©-"e,Òoí,ÝüÒtÐÖ:|`tN•¡cðþK‹èÚ(*Ž8ô6£ð½¦‘‚DjžÃáêØÛóó= eKîgWu«8?jŽ[]«ML°É/‰´»hçÁyÆ:šô=7Á¦IÚaW¢ð-”—ÀÝD\¯Lô®º´'QrœK»žce¡Ë¨Yâé\gÎ_|5Ÿ_’H­óyÆkèÝÓOÓdi¢z nŸá+Yc…¬‚Üš!…û2Ø>¶·GÎWìqauxgÕÌ“19Åw~ ørÞ¾[}.Ð}ž"qšöëOÄ£ªœ{ÕËO sº"‹¸ä t«úŒ"×*3–6m4ÎVÇK¹•Ua·òÔ dŒV½¥šXÜAö ²4‡}>µÓµŠ¤@JI>¸â©^Ae „b®¹þ¥tMrks–2æÐ¯ol…xPkÆzÖ¹fÖÚj¼`’:Waž»UãëtÚ:Ò›’çE„ØË5t¸©+óYÜùçZý…4ïjQÍâéšM§;3ý+Ô>þÌZÂ랉âqÔt½ ÆÞ8%iò猰éô«Q îg 'v&¹©eØzRs‚÷»›TÆÖ¨¹$ôìPŠ#mHÑ—ñPêúÿölLùž¬0+¦M*%æGçÓ5[T𽞨¿é‘ïÇ&º*ÛCJ7Ô¡oqºzM )sÉç5GWŽâî[e³ŽIFü’;V嶉g²Ô S!”c,aÚµP”à•ÈçQ•Ê"3:1#¨š’ÖtiLg”d«u…Z:ã"¹ÎAÉozx°‰ßÉMò[ñ­u{lMƵ¢IŸ•WwSŽMD-ìôùÄ1¢FK8'¯°«‘@Œy$ñÎkø£ªë2B<'içmûâH²¬= ÏJƲŒc} )^NÅoø>åtK¨üñ-ã«K „¾rNß~™¯×~2x›á™†xz÷óÎâ4¹SæZNÙ•ILŸFÁö¯uðlo`û/ˆìŸN¹ïo1ÊçÖ9?ˆ{uë_^ñ.…5œÖZ…ƒ][8Û,s((Ãèx5ÃìœýøJÇZš‡»8Ý<ø/âo‰u,÷·µ´ÅT.”àŽWkê+IîÝ<° GJá¼)û>øÄzüÞ"Mo®%ÜÎÄí|£•éðéëjŠ"¤h0 ]˜jRƒnnç>"¤eebšÙŒQZdÍ×ÌrXþ8©?Zr¦O4õJñn{Í XêU¡sOQÈÅKe%Me€#½5WÓ½KüÀŽÕ-–¢k[D ¦+¡Ò“txíX–G!}ë Ò†ØÎ}+ÀÇÉòŸ1š­ n8‡ük›ñ,ØB+~ú|Frkñ5×\šæËâå3å”o$Œ‹gÝw“ëZæèù_)®~Þp­ÏsZqͺ>;רa#ï#ЩFéI•/¹fjȽ»ÿÁ3>|²†=E²Cˆ†:÷=á. À#°²…û¢³ž&¬þ £EûÎþ‡â?ìßÿŠÏT¼gn]S—;‹ý øÿÑð·ÂÍ2ƒJ·ycn( }z<'gg&øáE?J´,ÐÅÅ,7µþ+¹ÓJ¥ü5cË|3ð_Kðô@[ÙÄ»}[w~ßm²Æ5äv×\Gð¬9>ÕnÚÝc\¨ëZ***Ñ"U¤ÝäÏ5±øg*Ld½_ÀW7âýè]t[bÇ=@ɯk¹·óN@5ÍjÚ…—ƒ^InÌÒ;œ*$e™Ï Ç5Ë[ §dÙ¬1.:žoáÿ‡¬ó$ºš2ÎØ\ÝZørÌ RxâP0r@©õñ/Š­tKHô¤eù$»l1ÿ€k'Hø+Ú†øƒ{>³sœ•»„eŸÆµ£‡¤UÄJ¯Oëó$·Ô-|H­ŠâVõ>ðÍÖˆ”0ûµÒé¾³Ñ-Äz=¤6È1N¹†ç­’Iì£9­*R‹÷¤D+I{¨åõO†¶OÑü¾•^* 1P:Wc`%Ôl·][Iný °æ’çG[µÙuuïš#E'Ì„ëKfrÐÂ<Ïݵ†jŵ˜p£ï]øv#lÆ×ÊY”a³Ò’ÛNxÇúHPG]¼ŠÕ-Ñ<ÝL„ðûGk½YÁçéLMn¤ ãpÅt dåŽ\S"´RÙ‹·CŽirò­ÅÍs(íò¡@9Ç=êÂ[*¦2Iô©á“ÏÔ&„ÊÑôuBÊ=½«öèò©ÂAÆÞ3Ÿ ¥¤®7u¹NƱºOpznÅ%¿†_Så¤"€ºµRÑã Uƒ÷ŸÄš³ ´ƒîÆŽ9ɦéÆh\î&D ŽÂfq<³î9ÁáWéVâ´L’Š\¯ ïéSêId§ûAÖ"0@?Åô¦è—×îÏ5„±ÛtYe>V~Šy#ß„ã¢ó=Fäj0:ÞÍÛ*ˆ»ÈçÖ«KàÈ­$ë7²'vOÒºUM¸=úñ\×ÄÝBëG²‚ä¯ú–Þë“åž0X{óÍeZœRr–¥R”›å‰’¿t[MA­¦/Œqì9ÅnMâý* ï#™wkº9ûÜqÁö×Ë|K{'Ä <¢jÞ#º™ö%µ„Y‰$$Êÿuê@ÍzG€þøžì[ͯÚÿf¹ÝæÅu*K±HáH†Áì8¯*Že6åN)]õpŒc6ôg¶ZjëxaŒH¢YcóU7 ²úùV•¹>Q—æŒÕçžøI®Ùk0ß^ÞÛÞ²¾|É•DÀUQÉÜŠô‹ Š0'uvîUp3í^Ö¬«BòMeh*r´]ÂHY€h#ä÷ô¨d´•€ê䞀ⴖۂ@ô¦Ž€Îǽtìa¹T&ØÀ‘€ÁÀæžl™È2p?*» \,Kê ƒê)ÂÜu|“T®·k¡Imz0:JDÒÃ\´ŽÅ±÷sŽkE#þèüéâßqù‰4Ä™Ua|ÌÇÚŸ²»*ÔU´µšx‹'ŠM&5sÿÀZ^ªÔ-"¡†j½·ÂÝÃ.Ÿ ã ³(ü ÅtA <-G³cNyw!¶´ŽÖŠÑ(ÐaU°©~´õÔÓ„uz"^£BQRìÅ\áÁSŸZ. ˜"§ç^;=ÁsÎiáséJ«ƒO ŸÆ `‰ÅN‹Þš‹Ç5*©jY¢zšxÊ®}kzÁ¶¡Ç¥aim…­»gù~µàãÑó™¬.VÖgÄuÆøŽãt„WU®?È}«‰×gÝ)#Ö´Ëa©ó”iÞe ¥¦P+fÖÆ VNœ¾tüv®‚ÑRffà2I¯© Ôu;êê”Q¯¿eëX%K?C_Gü ÿ‚q|^ý§¯âO†¾ÔÞÚb?Ò®b0®Xdþ¿F¿d_ø5sQÖ~ͨ~Ò:ÑT8f³µWèXòjeUT•–§³ƒ‚§cñŸBðö¡â;Ô¶Ð,îo'sµc†2ìOÐWÕ³/ü«ã?í,Øøz}"Âb?}v…N=v×ô=û6Á¾~Í–0/…¼5`óÅ‚fxƒ;RM}9áŸi^¶X´K+xD´yíe¡³«­ÙøËû*ÿÁ¯úN%­×ÆûÙµ)Fâ?,LWèÇÀ?ø&Àºt1x[Ãö´@ Â%,úe \Œ(¦ùeœûRTwa,D¤¬sº/ÃÍ/BSJ²† œ ­I4§Te 1Zb'88§>r ZIlfäÞå(­Ê ÔæPŸxŠ°ë‘’¼S<­À€ã§©¦"ì_!Fr¿J©8M.ß7*Dƒ%ä`úš–÷LÕõJÛMi§AÓqO:cô*þ$ÕŸƒÚNµsÞ-{ÝlÀÛ–;ɳ>¾RáOãšlî'&O¥kVšÛ0Ò6^íûÏÜ£ñéR]iz„áZÖ5L7MÑï[Im¬*Š5ÀUE £ØN? ùZy´NÀ¤Öú™ë(ŠAïÍ6}*ÍäYd†32t'¨«<ƒk| òëHÖêG#öÍ EègÜÛ;`@=ñ*¦Æ¤4¸i;1ŸÂ´dPËÆ~´Ï³1æ“W ”Å’ÿ Š|Mä僟Lu«Â ƒœtÅ6HIÏÊc–5I4O;ò¸'¦;Ó?±·&霃èNjø]Ø;ƒœsšU·Ü[,Ø=01¥ 3þÆ"|F’c}ˆ>˜õ¦ ',Å™Îã““ÀúzV³[‚¼~gšŽÞ?™(—qÈ\°zq×ñ w3Ρt¹aÜ’i£Kq7™è€ò}æµM¾OÌΫÜ(Áüé°”ŽvUTLrIl±¥dÅvW»¶yâbclz•ÛœŽ˜ö¤·°4ŒyË+M› c>‹ME »*y±sK1=xéØU¯'ÌcÀ¸ÝŠŠ- [Ý´ÆfmÜÓôBo!Ž=¡Wå<F¸N8<óš™bʃBÚ¯˜IÉ,}•U—D"Œ¡?Å“Ç)ɦ –e¹;ÑÆ 7* ´°p1OHJœçšM_Aܤš-Ÿ‡­%m"ÎÞ ß3ˆ¢T.}öšµ¥>ûEwƒÉfÁP*ÚõëHà³f¢4”vJÀæÞû•‹¯ÍøÔ;°pŠMO³Ö-Ÿî~µºÐÎ×!Ë r'<-XXÈâ”G“ÍP¬D#ü)âï“Ôª™?5L¨;Òœv¦""œtâˆúr*]†ž±zÐ åLqCJ¨sÍ ¹Ð@E?oqLL>> 2A<B- I"99"/) Â¡  }MPP}| QQ*r¬¯t±³B3-ºW(% ÁÃëŒ&q|.llu.ÉÔ2³"þ,@°à7‚᤬@ñF ?;žL’„E5Al `Câ‚G$ò5²@ŠÉ“(Sª\yr\ vè€Aá+CD\Ä„ Ž/¸0B§Ë£H“¢¼ò&Œ#GŒXrăÎ~ht##X(K6é•:,¢@Áˆ)3ÿ°.2¡¡@u HR¶¯_¤`,QÀƒ< äÊe”|äø»r†Ë˜1| œô Ö¬QàA±š°ΊáðáŠ@`§€`npC ¨YbÊø“ÀbÓ" % Â`<×8) P„$&»úx)H€t@!»!¨þÅðŽ€ã -¹xxÁ“ñ)ëàÌgÞÁGI|ÝAíцpù/@Àˆƒ>û™~ø¨Pó3"<4Õq¢q;ß™"ž)@éJSú}®p ßÀiNKàÓŸ*P‰pi¶ˆ¦7¨Npl 1F >PX*Py€®w=•%¬li a c˜Ðœº7EPn801ÇZ1)P<à l -¾v°ÛBlÃp€ #¬P‚f?ûÜ‹Apt»ûÝðŽw¼;imagick-3.6.0/tests/skipif.inc0000644000000000000000000000526114145213431014746 0ustar rootroot= $imageMagickBelowVersion) { $message = sprintf( "skip ImageMagick installed %x >= limit check %x", $versionInstalled, $imageMagickBelowVersion ); die($message); } } if (isset($imageMagickBelowVersion)) { $versionInfo = \Imagick::getVersion(); if (array_key_exists("versionNumber", $versionInfo) == false) { die("skip unable to determine ImageMagick version."); } $versionInstalled = $versionInfo["versionNumber"]; if ($versionInstalled >= $imageMagickBelowVersion) { $message = sprintf( "skip ImageMagick installed %x >= %x", $versionInstalled, $imageMagickBelowVersion ); die($message); } } function checkClassMethods($class, $methods) { foreach ($methods as $method) { if (method_exists($class, $method) == false) { die("skip Class method $class::$method not present"); } } } function checkFormatPresent($format) { $result = Imagick::queryFormats(strtoupper($format)); if (count($result) == false) { die("skip format $format not supported by ImageMagick as compiled."); } } function requirePHP($required) { if (version_compare(PHP_VERSION, $required) < 0) { die("skip PHP version $required required, but have ".PHP_VERSION."."); } } function requireFormat($requiredFormat) { $formats = \Imagick::queryformats(); foreach ($formats as $format) { if (strcasecmp($format, $requiredFormat) === 0) { return; } } die("skip test suite requires format $requiredFormat but not available"); } requireFormat("png"); requireFormat("jpg"); if (isset($minimumVersions) === true) { if (isVersionGreaterEqual($minimumVersions[0], $minimumVersions[1]) !== true) { $message = sprintf( "skip either version '%s' or '%s' is minimum reliable for test.\n", $minimumVersions[0], $minimumVersions[1] ); die($message); } } ?> imagick-3.6.0/tests/skipprobefourier.inc0000644000000000000000000000073714145213431017056 0ustar rootrootnewPseudoImage(640, 480, "magick:logo"); $imagick->resizeimage(512, 512, \Imagick::FILTER_LANCZOS, 1); $imagick->forwardFourierTransformImage(true); $canCallFourier = true; } catch(\Exception $e) { //fftw probably not available. } ob_end_clean(); if ($canCallFourier == false) { die("skip fourier function seems unavailable"); } ?>imagick-3.6.0/tests/anonymous_pro_minus.ttf0000644000000000000000000035555014145213431017641 0ustar rootrootLTSHj*p•ÜtOS/2Jb¾„˜`VDMXj¥r< PàcmapÊLôcvt Š ž! .fpgm’AÚúüagasp ÛXglyfe¥G& I|hdmxydM´0 Øhead÷ÿÔ6hhea gÎT$hmtx4j5Ðøâlocaq>"<!<âmaxpˆax nameµl¿¤oœY¸postZ`ÈvÉTprep0÷Ôh `«ƒ$6î_<õÆõEÐÎoÐÿ[þu{> ‹þ‹^ÿ^ÿã{paX ¦^š3%š3 {Ñ  ¯p©Êmlss@û‹þ‹‹u Ÿ¤ ^1ÿìÿçu¼å#ðu)ÿß ÿø1ÿøÿéuðǨÿßÿÅ1ÿì111ÿì1ºÿþ1111ÿß1ÿß11ÿÅÿÁÿéÿì1u…ºåÿþ1ÿþÿüºÿþ1º1º1ÿì1ÿö1ÿáÿåÿìÿá/ººÿüÿÅÿÅÿì11ÿß1ÿüÿüÿüÿüººªº1ÿìÿìÿìÿìÿì1111º1º1òºÿÁÿÓÿøºº1ÿì+ÿøÿîÿìÿÛÿÕÑ/ÿìÿÅÿÅÿÅÿßÿòÿÛÿ¤7ªºÿîÿáÿìÇHºu.ÿìÿÅ1ÿÅ11ºªººÿßÿßÿß111ºªNº¶uòòªðªuº7ÿÙÿþÿþÿ‹bÿì1ÿìÿá1ÿÅÿÅÿÅÿþÿìÿìÿìÿì1ÿ‹ÿþ1ÿü1ÿü1ÿü1ÿü1ÿüÿìÿþÿìÿþÿìÿþÿìÿþ11ÿwÿwNNºº¶¶ºººÿþ1111º1º1º1ºÿ^º11111111ÿßÿìÿßÿìÿßÿì111ÿöÿöÿöÿö111111111111ÿÁÿåÿìÿá1/1/1/ºÿÁÿÛÿÓÿÕÿöÿÅÿ_ÿ_ÿ[ÿ[ÿ[ÿÅ11ÿÅ111ÿߺ1ÿÅ11ÿß11+ÿìÿìÿé1ºÿì º1' )º1ÿá1ÿì1ÿì1ÿìÿø1ÿòº1ÿì1ÿò1ÿw1ÿ캺ÿþÿu1ÿw1ÿá1ÿÅ1111ÿÁ111ÿç11ÿß11ÿìÿáÿìÿé111ÿø1ÿôÿþ11ÿüÿðÿþ111ÿç11ÿì11ÿáÿãÿì111#1ÿôÿüÿ1ÿöººÿu1ÿ1ÿá111111ÿþ1º111ÿöÿÁÿåÿÁÿåÿÁÿåÿìÿáÿÓDÿÓJ¼ÿãHÓÓÓÓÓÓÓÿîÿòÿòHJ Jÿìp                                  øÿÿþ ÿþ ÿþ ÿý ÿý ÿý ÿý ÿýÿýÿüÿüÿüÿüÿüÿûÿûÿûÿûÿûÿûÿúÿúÿúÿú ÿú!ÿù"ÿù#ÿù$ÿù%ÿù& ÿù' ÿø(!ÿø)"ÿø*#ÿø+$ÿø,$ÿ÷-%ÿ÷.&ÿ÷/'ÿ÷0(ÿ÷1)ÿ÷2)ÿö3*ÿö4+ÿö5,ÿö6-ÿö7-ÿõ8.ÿõ9/ÿõ:0ÿõ;1ÿõ<2ÿõ=2ÿô>3ÿô?4ÿô@5ÿôA6ÿôB6ÿóC7ÿóD8ÿóE9ÿóF:ÿóG;ÿóH;ÿòI<ÿòJ=ÿòK>ÿòL?ÿòM?ÿñN@ÿñOAÿñPBÿñQCÿñRDÿñSDÿðTEÿðUFÿðVGÿðWHÿðXHÿïYIÿïZJÿï[Kÿï\Lÿï]Mÿï^Mÿî_Nÿî`OÿîaPÿîbQÿîcQÿídRÿíeSÿífTÿígUÿíhVÿíiVÿìjWÿìkXÿìlYÿìmZÿìnZÿëo[ÿëp\ÿëq]ÿër^ÿës_ÿët_ÿêu`ÿêvaÿêwbÿêxcÿêycÿézdÿé{eÿé|fÿé}gÿé~hÿéhÿè€iÿèjÿè‚kÿèƒlÿè„lÿç…mÿç†nÿç‡oÿçˆpÿç‰qÿçŠqÿæ‹rÿæŒsÿætÿæŽuÿæuÿåvÿå‘wÿå’xÿå“yÿå”zÿå•zÿä–{ÿä—|ÿä˜}ÿä™~ÿäš~ÿã›ÿ㜀ÿãÿãž‚ÿ㟃ÿã ƒÿâ¡„ÿ⢅ÿ⣆ÿ⤇ÿ⥇ÿᦈÿᧉÿᨊÿá©‹ÿ᪌ÿᫌÿà¬ÿà­Žÿà®ÿà¯ÿà°ÿß±‘ÿß²’ÿß³“ÿß´”ÿßµ•ÿß¶•ÿÞ·–ÿÞ¸—ÿÞ¹˜ÿÞº™ÿÞ»™ÿݼšÿݽ›ÿݾœÿÝ¿ÿÝÀžÿÝÁžÿÜŸÿÜàÿÜÄ¡ÿÜÅ¢ÿÜÆ¢ÿÛÇ£ÿÛȤÿÛÉ¥ÿÛʦÿÛ˧ÿÛ̧ÿÚͨÿÚΩÿÚϪÿÚЫÿÚÑ«ÿÙÒ¬ÿÙÓ­ÿÙÔ®ÿÙÕ¯ÿÙÖ°ÿÙ×°ÿØØ±ÿØÙ²ÿØÚ³ÿØÛ´ÿØÜ´ÿ×ݵÿ×Þ¶ÿ×ß·ÿ×à¸ÿ×á¹ÿ×â¹ÿÖãºÿÖä»ÿÖå¼ÿÖæ½ÿÖç½ÿÕè¾ÿÕé¿ÿÕêÀÿÕëÁÿÕìÂÿÕíÂÿÔîÃÿÔïÄÿÔðÅÿÔñÆÿÔòÆÿÓóÇÿÓôÈÿÓõÉÿÓöÊÿÓ÷ËÿÓøËÿÒùÌÿÒúÍÿÒûÎÿÒüÏÿÒýÏÿÑþÐÿÑÿÑÿÑt    êβ€2 "~ÿ01QSwx’ÿÇÝ†ŠŒ¡¨©¿ÀÎ O\_‘ AWak…ó    " & 0 : D ¬!!"!&"""""""+"H"`"e###&#}#ˆ#Î$#%%% %%%%%$%,%4%<%l%Æ%Ê'àöÃùûÿÿ # 12RTxy’üÆØ„ˆŒŽ£©ªÀÁQ^ @V`j€ò    & 0 9 D ¬!!"!&"""""""+"H"`"d###$#}#ˆ#Î$#%%% %%%%%$%,%4%<%P%Æ%Ê'àöÃøÿûÿÿÿõÿáÿóÿ¤ÿòÿ\ÿðÿAÿïÿÿsÿ[ýóýòýñýðýïþÆýîüÙýíý»ýºý¹ý¸ýˆäääãàãÌãÄã¼ã¨ã<àƒà”àƒàvàáßhßwÞ”Þ Þ‰Þ‰ÞrÞoÞ]Þ-Þ.ß0ßßÞ»Þ±ÞlÞÝ<Ý;Ý2Ý/Ý,Ý)Ý&ÝÝÝÝ Ü÷ÜžÚíÛR"f ½®°Z\8<@D2øà᪡‚ƒã”䄌‰›§¢åˆØ‘æç‹•†ÁÜ蜨éêë «ÇŬ`aŽbÉcÆÈÍÊËÌìdÑÎÏ­eíÔÒÓfîï‡hgikjlžmonpqsrtuðvxwy{z¶Ÿ}|~ñò¸ÖßÙÚÛÞ×ݰ±0´µÂ²³Ã€À…—2Ðn àá  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_»Â¤Ã©€ÀÖÄP¼®l´µ²³…°±×ŠQ½¯m¹ª¡‚ƒã”䄌‰›§¢åˆØ‘æç‹•†ÁÜ蜨éêë «ÇŬ`aŽbÉcÆÈÍÊËÌìdÑÎÏ­eíÔÒÓfîï‡hgikjlžmonpqsrtuðvxwy{z¶Ÿ}|~ñò¸°,K° PX±ŽY¸ÿ…°D± _^-°, EiD°`-°,°*!-°, F°%FRX#Y Š ŠIdŠ F had°%F hadRX#eŠY/ °SXi °TX!°@Yi °TX!°@eYY:-°, F°%FRX#ŠY F jad°%F jadRX#ŠY/ý-°,K °&PXQX°€D°@DY!! E°ÀPX°ÀD!YY-°, EiD°` E}iD°`-°,°*-°,K °&SX°@°YŠŠ °&SX#!°€ŠŠŠ#Y °&SX#!°ÀŠŠŠ#Y °&SX#!¸ŠŠŠ#Y °&SX#!¸@ŠŠŠ#Y °&SX°%E¸€PX#!¸€#!°%E#!#!Y!YD-° ,KSXED!!Y-°+²+²+·B?0%+· S?=%+· gR=/+· L?0%+· S?0%+· aR=%+·! +·S?=%+·gR=/+·M?0%+·L?0%+·B?0%+·aR=%+·S?0%+²+° E}iD*oZy{‹u‰‹oZ{‰u\þ¢8888Äx€Xp¶üH|”¦¼ÒŒÈ6ì8Ê†Î Ê Š ´ Þ ö  , ¦ Æ ú z$„¼î–ÞX˜¼V`6¨nÂ"PšbªÔè8J^$Òx&šÖ>ˆÎHæNú¨ X À!z!è"P"~"È#2#j#²$ $ $z$°$¼%0%è%ô&& &&$&0&<&H&T&`''&'2'>'J'V'b'n'z'†'’'ž'ª'¶'Â'Î'Ú'æ'ò((Ž))’*R*|*î+Â,|-B- -´-à.&.x/V/Ì00$0F0ª11¸1ü2@2¶2ô3ª4B4è5à6ª7&7Z7r7–88P8v8œ8Â8ú8ú9999°:p:‚:”:ö;R;ˆ;¸;ì<< <,>h>z>²?@J@V@b@n@z@†@’@ž@ª@¶@Â@ÎA&A2A>AJAVAŒA¤AÎAàAþBBfBŒBªBÞBøCCDC\CðDD"D~DøE*EÀFPG*G GÊGÖH2HÞHêI”I I¬I¸IÄJ0K KK"K.K:KFKRK^KjKvL$L,LòLþM MM"M.M:M¢NHNTN`NlNxN„NNœN¨N´OŽOšO¦PPœP¨P´PÀPÌPØPäQJQÆQÒR4RÊRÖSS&S2SrS~SŠS–S¢S®SºSÆSÒTTxT„TTœT¨T´TÀTÌU$U¦U²U¾UÊUÖUâUîUúVVVV*V6VBVNVZVfW WÈWÔWàWìWøXXXzYY YY$Y0Y\J\V\b\n\z\®].]T]z]²]ú^B^ø_,_l_š_ì`4`˜aDa|aÚbbrbÌcXcÆdd*d6dBdNdZdfdreeêf(gg¨h(h i4i‚iÂjj jÔkˆl4lÖmnnnbnÚozoºppÄpÐpÜpèpôqq q¶qÂrbs"sVsbs¨t>tºu2u>uJuŒuÀv"v¢vÈwwVwÀxŠxÒxÞyy†yØz zÌ{{b| |`|´}@}®}î~@~˜~ìL¸€€´ZЂ–ƒn„„(„z„î…X…þ†F†R†’†ú‡L‡”ˆ@ˆx‰&‰ÌŠ ŠX‹6‹ ‹àŒ0ŒˆŒÞ>¬ŽŽz„".ž‘T‘ž‘ª‘ð’t’ð“r“~“Š“Ì””4”@”L”X”d”p”|”ˆ””” ”¬”¸”ĔДܔè”ô•• ••$•0•<•N– ––B—R—Œ—À˜˜B˜Î™™8™J™d™‚™ ™º™Ò™øššBš`š”š°šâ››X›”›Èœœ>œpœ¤œØ8hšØž$žTž’žÚŸŸHŸŸ¶Ÿê $ ` ¬¡¡0¡J¡–¡Â¢¢f¢˜¢Ì£ £<¤¤¾1sE°/° /°Ü°°а/± ô°±ô°EX°/±>Y°EX°/±>Y±ô°±ô01!!!!!sü¾BýG/ýÑû\/¤¥½° /°!/°ܱ ô° °а/± ô°° а°а°а°а°а°а°а°аEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³+³ +°°а°а° а°а°а °а°а °Ð01%##5!#5#53#5353!533#3!!¤ÝuÿuÝÝÝÝuuÝÝÝþ®ÿÞÝÝÝÝnmäääämþøþøÿFƒÓ+2;¯³3+³$,+³)+°° а°а)°а$°а/´Ú,ê,]@ ,,),9,I,Y,i,y,‰,™,©,¹,É, ]°,°а/°)° а)°/Ð@33&363F3V3f3v3†3–3¦3¶3Æ3 ]´Õ3å3]°°6а$°=ܰ/°*/²/*9²6*901.'7.54>753&&'#4&'66T‰d@ tTƒ\/1ZƒTŠK\8 h`¶¶1^‡VŠamjtaýÌsb7R3 ?_zD!e•ATmI@p[9 ¤¤ Dbw=X’þ)C¯“Dx_AªVy/þ"}íMg'ª+9BÿìÿåÁ7+7CE³2 +³ ,+³ 8+@&6FVfv†–¦¶Æ ]´Õå]²",9°"/´Ú"ê"]@ "")"9"I"Y"i"y"‰"™"©"¹"É" ]@f2v2†2–2¦2¶2Æ2]@ 22&262F2V2]´Õ2å2]´Ú8ê8]@ 88)898I8Y8i8y8‰8™8©8¹8É8 ]±> ô°°Eܰ/°/°EX°/±>Y°EX°/±>Y³';+³5+°±/ô´Ù/é/]@//(/8/H/X/h/x/ˆ/˜/¨/¸/È/ ]°±Aô@AA'A7AGAWAgAwA‡A—A§A·AÇA ]´ÖAæA]01#".54>32%'#".54>324&#"3264&#"326á'E\43\D&&D\34\E'Ãü¼^Fy)D^34\C))C\43\F)ýºV@?VV?@VßX?@VV@?X13\D))D\33_C))C_”úí<û®5ZF''D\54\C''C\@XX@?XXüó@VV@?XXÿçÿå¼/'2Bã³0+³;+@00&060F0V0f0v0†0–0¦0¶0Æ0 ]´Õ0å0]²09°/±3ô´Ú;ê;]@ ;;);9;I;Y;i;y;‰;™;©;¹;É; ]°EX°/±>Y°EX°/±>Y°EX° /± >Y±(ô@(('(7(G(W(g(w(‡(—(§(·(Ç( ]´Ö(æ(]°±>ô´Ù>é>]@>>(>8>H>X>h>x>ˆ>˜>¨>¸>È> ]01'#".54>7&&54632667267'>54&#"¼P;^J´iL‡d</@%>D³•DwX1>^w9h0=þ!N‡5þ¨4?}V#93eM/hN+E25V®N“kšBT8`L?iTCN™Nš¶)LlFNnTD%þ®B‘Fþ;1P-uV`r/wK:AP5NZ#;NuD/°/°EX°/±>Y01#/+f)þ+Õ¼þÁß>³ +@&6FVfv†–¦¶Æ ]´Õå]° /°EX°/±>Y01.54667yk¦p<³ +´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°/°EX°/±>Y01'>54.'7ìY°EX°/±>Y²9²9²9² 9² 9²901%#'%%73%þªV7þ´tþ´7Vþª7LtLŒ¸½^Ëþ}ƒË^½¸`͆þzÍ ¤° 7³ +°°а° а/°EX°/±>Y³ +°°а °Ð01!#!5!3!¤þhtþh˜t˜¤þi—u—þiðþ‹bº°/°EX°/±>Y01%#bþî`ººýÑ/¤¤ ³+01!5!¤ü\¤¤uu/º°/°EX°/±>Y01!#53/ººº)ÿ‰J °/°/01'‰ýbþùù4ÿßÿéÇ/%ø°&/°'/°&°а/± ô@&6FVfv†–¦¶Æ ]´Õå]°'°ܲ9±ô´Úê]@ )9IYiy‰™©¹É ]²9°EX°/±>Y°EX°!/±!>Y²!9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°!± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]²!901&&#"324&'4>32#".h#c0^°»Rc¶¬¾üÄ8v¿‡‡¿x66v¿‰‰¿w5‹‘…Z`þÕý}°+H;þüƒô¼qq¼ôƒƒôºqqºôé:³+°°аEX°/±>Y°EX°/±>Y±ô²9°аÐ01!!53#52>533éýÑÓNjD=ŒvNŠÒu{)]M4ŽLv–Jû\ w/ r°/³ +³ +° °Ð°/° ± ô° °"ܰEX°/±>Y°EX° /± >Y±ô°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01!3!5>54&#"#4632s1P=þ9'uü°ü'G8 Ÿu¤¨ìßT•sBÇ6VXb?þ3þ‹y'NPV/x{¶¬Ýú1\…ÿé˜/6Ô³$ %+³/ +°/± ô±ô°$° а /´Úê]@ )9IYiy‰™©¹É ]²2%9°/°8ܰEX°*/±*>Y°EX°/±>Y³+°±ô@'7GWgw‡—§·Ç ]´Öæ]°*±!ô´Ù!é!]@!!(!8!H!X!h!x!ˆ!˜!¨!¸!È! ]²2901#".'732>54.#52>54&#"#4>32˜Fu™T_£}N… ºŠ;hN-3`]Dd>’t’°Bv¦eT‘m=…{FhF%hVd84d˜b—˜'H`;Pe9u5XDn…™¤f¢o;1\…Vo“ ;[n¤Q³ +° °а°аEX°/±>Y°EX°/±>Y³+°±ô°° а° а° аÐ01!!53!533#3¤ýÑÓý¸#®ÓÓÓþ¤þIuw-üÓwÿw‹ýuÿéª*¦°+/°,/°Ü± ô´Úê]@ )9IYiy‰™©¹É ]°+°а/± ô°"в#9°EX°/±>Y°EX°/±>Y³&+°±ô@'7GWgw‡—§·Ç ]´Öæ]°±!ô²#901#".'732>54.#"#!!6632ªH}°h^ yJ…4TrDP}X//V}LP“6‰1ýX<™Pe¨zD¶`¨}H8h˜bDuR/5_}GJ\5C@Œuþh:?Aw¬ÿøÿé¾/"6ß³ +³ #+@&6FVfv†–¦¶Æ ]´Õå]´Ú#ê#]@ ##)#9#I#Y#i#y#‰#™#©#¹#É# ]° ±-ô°EX°/±>Y°EX°/±>Y³(+°±ô´Ùé]@(8HXhxˆ˜¨¸È ]²9°±2ô@22'272G2W2g2w2‡2—2§2·2Ç2 ]´Ö2æ2]01#".54>32&#">324.#"32>¾G®e‹¼s3EŠÏ‹ÂZZi¡k5NfwY°EX°/±>Y°EX°/±>Y°± ô01 #67!#!˜{”P#X˜tý’ug …þþþçþÁÁ¶B% }ÿuÿøÿé®/'3G1³> +³ (+´Ú(ê(]@ (()(9(I(Y(i(y(‰(™(©(¹(É( ]²4(9°4/´Ú4ê4]@ 44)494I4Y4i4y4‰4™4©4¹4É4 ]± ô² 9@>>&>6>F>V>f>v>†>–>¦>¶>Æ> ]´Õ>å>]² >9°/²# 9±. ô°EX°/±>Y°EX°/±>Y³19+²919²#919°±+ô´Ù+é+]@(+8+H+X+h+x+ˆ+˜+¨+¸+È+ ]´++]°±Cô@CC'C7CGCWCgCwC‡C—C§C·CÇC ]´ÖCæC]01#".54>7.54>324&#"3264.#"32>®J®bd¬J'Ii?7V;!FvœTTœvF!;X8@hJ)¸œ‡‡œ””/7_xDDx_77_xDDx_7og‘`..`‘g5l]=Y°EX°/±>Y³)+°±ô@'7GWgw‡—§·Ç ]´Öæ]²9°±3ô´Ù3é3]@33(383H3X3h3x3ˆ3˜3¨3¸3È3 ]014>32#"'732>5#".732>54.#"H®e‰¾s3F‰Ñ‰ÂZ-wEiŸm5Lfy:f¬{FŠ-T{MLZ1)S}VJ{Z1\m¬yAq¼òƒ…ô¼oˆP21PÉy3ZB'F{¬fJ^51X}LJƒd91Zƒu/¤/³+°°а°аEX°/±>Y°EX°/±>Y01#53#53/ººººé»ü\ºðþ‹b¤*³+°EX°/±>Y°EX°/±>Y²901#53#/ºº3þî`ºé»ýýÑ/ÇÿÞÞ °/°/01%MþMþP-OPþPǤö³+³+01!5!!5!¤ü\¤ü\¤wýÑuÿÞÝÞ °/°/01'7ÝþN°þPNÞþO±°P¨/!³  +³+° °а/° ±ô´Úê]@ )9IYiy‰™©¹É ]°°#ܰEX°/±>Y°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01!#53#4>54&#"'6632/ºº^9VfV:‘;ViV;lg?_A'{𦺺DNubV\mENzk^\c9Xd)E`:¨ÂªÿßÿéÇ/O`@³2 D+³X +³ +³ &+° °ж©&¹&É&]´Ú&ê&]@ I&Y&i&y&‰&™&]@ &&)&9&]@V2f2v2†2–2¦2¶2Æ2]@ 22&262F2]´Õ2å2]° °PÐ@XX&X6XFXVXfXvX]@ †X–X¦X¶XÆX]´ÕXåX]°EX°K/±K>Y°EX°=/±=>Y³[+³S+°°в =K9²S9°[°!а!/°K±-ô´Ù-é-]@--(-8-H-X-h-x-ˆ-˜-¨-¸-È- ]°=±7ô@77'777G7W7g7w7‡7—7§7·7Ç7 ]´Ö7æ7]01#".55#".54>325332>54.#"3267#".54>32%&&#"32>5Ç6ZC6*^>BX5"DeC#Nƒ( '>YuJq˜]((]™pR‚5;€Ä\‘oO22Op[‡¿x6þ?&&7$94%<*¬DŒqH&3 K^:`z@J‡g=#%5ýó 6Sd/E‰{iM+`¢ÔusÓ¢`:1D3\~–¨WY©–~[3o¶æ1'-K_1mn-I[-ÿÅã 0°EX°/±>Y°EX°/±>Y°EX°/±>Y³+01!#!#3ã“{ýüy“²º}ÛÛuþ‹üÕ¡ý_1¢$‡³! +³ +° ± ô± ô² 9´Úê]@ )9IYiy‰™©¹É ]°!°а °&ܰEX°/±>Y°EX°/±>Y³+² 9°±ô°±!ô01#!!24.#!!2>4&#!!26¢òßþ`‰Rž}NËø¶:Zl2ÿ8lV8-¯™þ陯u»ºJƒjËJLaEX/þE1Výô‡{ýþÿìÿé¬/%ã°&/°'/°ܰа/°&°а/°± ô°а± ô@&6FVfv†–¦¶Æ ]´Õå]°°%а%/°EX°/±>Y°EX° /± >Y°EX°/±>Y² 9° ±ô´Ùé]¶(]@8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>3253#4.#"32¬3è°‰¾y55y¾‰y¬)uu5Z{Dj‹T##T‹jô`V¨Åqºôƒƒô¼qVX˜þTE{Z3d¢ÆcbÇŸe'1Ï p°/°/°Ü°°а/°± ô´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°± ô°EX°/±>Y°EX°/±>Y°±ô°±ô01#!!2#!!2Ï7y¿‡þX¨…¿y9‰Á¬þá¬Á‹ƒí³hk´ìƒûÑ1s =³ +° °аEX°/±>Y°EX°/±>Y³+°±ô°± ô01!!!!!!!sü¾BýGýþ¹uþ-uþ1s 6³ +°°аEX°/±>Y°EX°/±>Y³+°±ô01!!!#!sýGýþ‰B¤þ-uý¤ÿìÿé×/+Ó³ +³ +°°Ð@  & 6 F V f v † – ¦ ¶ Æ ]´Õ å ]°±+ô°°-ܰEX°/±>Y°EX°/±>Y°EX°/±>Y³+(+²9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±%ô@%%'%7%G%W%g%w%‡%—%§%·%Ç% ]´Ö%æ%]01#".54>3253#4.#"3267!5!×7y¿‡‰¾y55y¾‰y¬)uu5Z{Dj‹T##T‹jž¶þß²‰…òºoqºôƒƒô¼qVX˜þTG{X3d¢ÆcbÇŸeôÝu1s `° /° /°Ü±ô° °а/± ô°а° аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y³ +01!#!#3!3sŠýщ‰/Š\ý¤ý¸Hºé =³ +°EX°/±>Y°EX°/±>Y±ô°±ô°а а° а Ð01!!53#5!#3éýÑÓÓ/ÒÒu/uuûÑÿþÿésL³+°EX°/±>Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]01#"&'732>53sÓÙ®ì/w+ª}\s=Šòøþï·¶-¢ƒJsH'1ž J³ +°°аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²901!##33ž¨þNЉ‰/µþšþý…{ýÆ1s'³ +°EX°/±>Y°EX°/±>Y±ô01!!3!sü¾‰¹û\1s m° /°/°Ü±ô° °а/± ô² 9°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²9²9² 901!###33sŠçb扲îð²?ý_¡ûÁýVª1s b° /° /°Ü° °а/± ô°±ô°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y²9²901!##33sªýñ‰Á÷ŠPû°ûãÿßÿéÇ/'â°(/°)/°Ü°(° а /°±ô´Úê]@ )9IYiy‰™©¹É ]° ± ô@&6FVfv†–¦ ]´¶Æ]´Õå]°EX°/±>Y°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>324.#"32>Ç6v¿‰‰¿w55y¿‡‡¿v8Š1\‡Vk‹T!!T‹kjŒT ‹ƒôºqqºôƒƒô¼qq¼ôƒÏ’Md¢ÆcbÇŸeeŸÇ1¢ r°/°/°Ü°°а/± ô°± ô´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°°аEX°/±>Y°EX°/±>Y³+°±ô01#!#!24&#!!26¢ìÕþÙ‰®×쉪ŽþÙ'Žª¤½¸ýÑ»º‡yþyÿßþÇ/ 0°1/°2/°Ü±!ô´Ú!ê!]@ !!)!9!I!Y!i!y!‰!™!©!¹!É! ]°а/°!°а/°1°а/±+ ô@++&+6+F+V+f+v+†+–+¦+¶+Æ+ ]´Õ+å+]°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°±ô@'7GWgw‡—§·Ç ]´Öæ]° а /°±&ô´Ù&é&]@&&(&8&H&X&h&x&ˆ&˜&¨&¸&È& ]°±.ô013267#"&'.54>324.#"32Ç/i¨w‹‡#15ÌÏn¢g15y¿‡‡¿v8Š"RŽhk‹T!½®¬¾‹}ç¶w †fu®µs²çƒô¼qq¼ôƒcÆ¢dd¢Æcþüþ×)1°ް/°/° ܰа/°°а/± ô° ±ô´Úê]@ )9IYiy‰™©¹É ]°°аEX°/±>Y°EX°/±>Y°EX°/±>Y³+°°а/°±ô01!###!24&#!!26°®þƒË‰®×ì:d‹Rí¥þÛ%¥/ýÑ»ºRƒ\8o…{þyÿéƒ/?ܳ +³* )+°)±ô° °а)°,а ±6 ô°*°AܰEX°)/±)>Y°EX°+/±+>Y°EX°%/±%>Y°EX° /± >Y°EX°/±>Y³;+²%9°±ô@'7GWgw‡—§·Ç ]´Öæ]²(%9°%±1ô´Ù1é1]@11(181H1X1h1x1ˆ1˜1¨1¸1È1 ]01#"&'#332>54.'.54>3253#4.#"ƒDr”Pn¸6tt>`}A:bJ+7]tY°EX°/±>Y°±ô°±ô°а а° а Ð01#!3!53!#!¤uþèÒýÑÓþèu¤`DûÑuu/þ¼¹1ÿésp°/°/°Ü°° а /± ô°±ô°EX° /± >Y°EX°/±>Y°EX°/±>Y±ô@'7GWgw‡—§·Ç ]´Öæ]01#".5332>53s1gžlme1‰=mXXo=ŠÑo´FF¶oFü¸;„lHHl„;HÿÅã1°EX°/±>Y°EX°/±>Y°EX°/±>Y²901#3ãþLºþP‘}{úçûrŽÿÁã Y°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²9²9² 901##33ã뢅‡ é‘¸ƒ‡„¸úç}ýƒûνýC2ÿéºz°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô°в9°аа а а± ô°ав9°аааа °аÐ01!!533!53#5!##5!#3ºþŽXÍÏXþþêmumËÅiuqþðu¬þTuuuuþ^¢uuýíýäÿì¸g³+²9°EX° /± >Y°EX°/±>Y°EX°/±>Y°±ô°±ô°аа° а аав 9°аÐ01#3!53#5!##5!¸jþÉÒýÑÓþÉjplãálp¤ýþBuu¾quuþìu1w U°/°/°Ü°°а/°в9°± ô°± ô°EX°/±>Y°EX°/±>Y°±ô°± ô01!!5!#!!3wüºýåu1ýw)uu/þÀµuûÑEuþ‹éÓ-³ +°±ô°аEX°/±>Y³+°±ô01!!!!éþŒtþúþ‹Hoù˜…ÿåJ °/°/017åbýb¼43ºþ‹/Ó0³+°± ô°°аEX°/±>Y³+°±ô01!5!!5!/þ‹þùuþ‹qho/¦°/°/°EX°/±>Y²901##3¦˜þÅþǘu¸/eý›êÿF¤ÿ» ³+01!5!¤ü\¤ºuåô¼T °/°/01%7¼)þRB5Aómÿþÿésº&7í°8/°9/°8°Ð°/°9°ܱ ô°в9° °,а±5 ô@55&565F5V5f5v5†5–5¦5¶5Æ5 ]´Õ5å5]°EX°/±>Y°EX°/±>Y°EX°$/±$>Y³0+°±ô´Ùé]@(8HXhxˆ˜¨¸È ]²$9°$±'ô@''''7'G'W'g'w'‡'—'§'·'Ç' ]´Ö'æ']°0°-а-/01'4>3254.#"'6632#5#"&2>55&&#"X¹`%;56 ;V^!h°L>TÑ}L“uFŠ$[dd-¹¾wV‰`5C{-J‰f>süXwECDX38/g3A'Q„\ýžœ-D+Ž3LV#X -H5;c1ÿé¤$ì°%/°&/°Ü°%° а /± ô° в 9°±ô´Úê]@ )9IYiy‰™©¹É ]° °аEX° /± >Y°EX°/±>Y°EX° /± >Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]² 9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 901#"&'#366324.#"32>¤B{®lL‹<‰‰<‹Ll®{B‹)T}Ržu<‰NR{T+Ñk´H65Tþ539IµjP‡d:}þA8:d‡ÿéº(×°)/°*/°ܰа/°)°а/°± ô°а± ô@  & 6 F V f v † – ¦ ¶ Æ ]´Õ å ]°EX°/±>Y°EX° /± >Y°EX°/±>Y² 9° ±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±%ô@%%'%7%G%W%g%w%‡%—%§%·%Ç% ]´Ö%æ%]01%#".54>3253#4.#"3267;Ím¶HBz±l+ZP@{{-Nl>T}T+1]ƒRh¢+²\mH²mjµI)9'‡þ‹>fJ):d‡PP‡b:RDÿþÿés&è°'/°(/°Ü±ô°'° а /°°а°а ± ô@&6FVfv†–¦¶Æ ]´Õå]°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±$ô@$$'$7$G$W$g$w$‡$—$§$·$Ç$ ]´Ö$æ$]²$9°±ô°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01!#5#".54>32#5!&&#"327sŠ;Jo°yAAy°oJ;ºDŠ;‹NR}T++T}RžvV58H´kjµI55Tuý²A::d‡PP‡d:}ÿüÿ鮺"{°EX°/±>Y°EX° /± >Y³"+° ±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]013267#".54>32'&&#"‰º•i¤)`FÂŽl´ƒHA{°mw²w9‘°BpV:¢”°V@BbgH²mj³ƒIPÄwu™–+PqCº¤/Ÿ³+°° а°аEX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y°±ô°±ô°аа°а а±ô´Ùé]@(8HXhxˆ˜¨¸È ]01!3!53#534632&&#"!¤þsÒýÑÓÓÓÇÉ/A?+ƒƒ/ýFuuºuÀËu…‘ÿþþusº.°//°0/°Ü°/°а/±( ô@((&(6(F(V(f(v(†(–(¦(¶(Æ( ]´Õ(å(]° а /°±ô°а° аEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³ +°±+ô@++'+7+G+W+g+w+‡+—+§+·+Ç+ ]´Ö+æ+]²+9°±#ô´Ù#é#]@##(#8#H#X#h#x#ˆ#˜#¨#¸#È# ]²#901%#"&'732655#"&54>3253&&#"3267sBw¡c‹ÃG`+¢hŽ¥zœÛúAy®mL;ŠŠ;NR}R+¦¦N; `–h7hbJAX‡dlúÙj³ƒI55TÙA::d‰N ¾;B1sް/°/°Ü±ô°° а /± ô°в 9°EX° /± >Y°EX°/±>Y°EX°/±>Y°EX° /± >Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 901!#4&#"#33 sŠlyL{V-‰‰cþX?}ŠFu—Rþ^ý¡þ…ºé _³ +² 9°/±ô° ±ô°° аEX°/±>Y°EX° /± >Y°EX°/±>Y±ô° ±ô°° а Ð01#53!53#5!3/ºººýÑÓÓ]Ò^»úçuºuüÑþué>³+²9°/± ô°EX°/±>Y°EX°/±>Y³ +°±ô01#53"'732>5#5!麺þsöbi$uVD\5Ó\½^»ù\ÊHLR'HfB/uü\´×1¢ Q³ +°°аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²9² 901!##33¢Ãþƒ¨‰‰Äþ-¢šþøü•öþTºé D³+°±ô°°аEX°/±>Y°EX°/±>Y±ô°±ô°°а Ð01!!53#5!3éýÑÓÓ]Òu/uû\¤º!Ú°"/°а/° ܲï ]²@ ]°ܲï]²@]± ô° ± ô°± ô°в 9² 9°°#ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°в9²901!#4&#"#4&#"#3632632¤‰85NIŠ951:! ‰‰+‰1D|wožPX¤”ýòžPX:Zn6ýò¤‡‰‰1sºް/°/°Ü±ô°° а /± ô°в 9°EX° /± >Y°EX°/±>Y°EX°/±>Y°EX° /± >Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]²901!#4&#"#33 sŠlyL{V-‰‰cþX?}ŠFu—Rþ^¤êþ…ÿìÿ鼺'â°(/°)/°Ü°(° а /°± ô´Úê]@ )9IYiy‰™©¹É ]° ± ô@&6FVfv†–¦ ]´¶Æ]´Õå]°EX°/±>Y°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>324.#"32>¼E´om´EE´mo´E‰/\ƒRRƒZ//ZƒRRƒ\/Ïm²HH²mj·II·jP‡f::f‡PP‡b88b‡1þ‹¤º$ì°%/°&/°Ü°%° а /± ô° в 9°± ô´Úê]@ )9IYiy‰™©¹É ]° °аEX° /± >Y°EX°/±>Y°EX° /± >Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]² 9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 901#"&'#36324.#"32>¤D{®lJ‹<‰‰’l®{D‰+V}RN‡<<‡NR}V+Ñm²H65þ7VlGƒµjN‰d::Aþ A8:d‡þ‹sº$ò°%/°&/°%°Ð°/°&° ܱô° в 9°± ô@&6FVfv†–¦¶Æ ]´Õå]°°аEX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°± ô´Ù é ]@  ( 8 H X h x ˆ ˜ ¨ ¸ È ]² 9°±ô@'7GWgw‡—§·Ç ]´Öæ]² 9014>3253##".73267&&#"Dz¯l‘ŠŠ;‹Jl¯zD‰+V}RN‡;;‡NR}V+ÑjµƒGlVúçÉ56H²mN‡d:8AôA::d‰žºƒ³ +°± ô° °а°аEX°/±>Y°EX°/±>Y°EX° /± >Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]° ±ô° а в 901&#"3!53#5!!2qJfT„\1ÓýÑÓÓ\^Gi-!%Hu—PþÓuuºuêÿöÿ鋺2ß°3/°4/°Ü± ô´Úê]@ )9IYiy‰™©¹É ]°3°а/±) ô@))&)6)F)V)f)v)†)–)¦)¶)Æ) ]´Õ)å)]°EX°/±>Y°EX°/±>Y³.+°± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]°±$ô´Ù$é$]@$$($8$H$X$h$x$ˆ$˜$¨$¸$È$ ]01#"&'73 54.'.54>32&&#"‹RŸLü\=gÈk53Vo=NšMGw V{ÂN7P¤`+iZ=3Vo=L›NRl@JY°EX° /± >Y°EX°/±>Y°EX°/±>Y°± ô° ааа±ô@'7GWgw‡—§·Ç ]´Öæ]01#".5#533!!3267®Ç•Rˆ`5ÓÓ‰þs!;T6f‰ )“­6`‡PÙuuþ‹uþ'3ZD'e1ÿés¤ް/°/°°Ð°/± ô°° ܱ ô°в 9°EX°/±>Y°EX° /± >Y°EX° /± >Y°EX°/±>Y±ô@'7GWgw‡—§·Ç ]´Öæ]²901332>53#5# 1‰myLzV-ŠŠbþþ¨¤ýÀ}‰Fu—R¢ü\éÿ{ÿáä1°EX°/±>Y°EX°/±>Y°EX°/±>Y²901#3Ãþl¸þj¤NL¤ü\¤üÏ1ÿåä Y°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²9²9² 901##33ý • ¿’‡‘ˆ•‡¤ü\¬ýT¤ýêýêÿ캤w°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô²9°аа а а± ô°ав9°аааа °аÐ01!!533!53#5!#7#5!#3ºþR¸¶Kþ„‘ö‡Vª¬^ƒƒöyþòyy`P{{þþ{{þ°þ ÿáþuÁ¤#°EX°/±>Y°EX°/±>Y³ +01#"'7326773Áþ'ŽV``/ZD39þ`¢PJ¤ûpb=#vB-¿üÑ//w¤ X°/°/°Ü°°а/°а/²9°± ô°± ô°EX°/±>Y°EX°/±>Y°±ô°± ô01!!5!#!!3wü¸{ýüu/ý…uuºÿuuýFºþ‹çÓ&F³# +°° а±&ô°а#°аEX°/±>Y³+³  +² 9°±%ô01#".54#5254>33#"33ç\=gI)»»)Ig=\\ª-@%%>/ª\þ‹+Jh>¨¨p¨®>fJ)o¨þR"J@/-@I#þXªÿFÓ³+°/°/01#3ŠŠººþ‹çÓ&F³ +°± ô°а °а°#аEX°/±>Y³+³&+°± ô²&901"##53254>7.54##5323ç¸)Lf=]]§/@%%B-§]]=fL)¸ö¨þV>fL)q¨ª#K@+-@J"®¨o+Jf<þR¨ÿüö¨°#2>7#".#"'>32‹%3!‡+Ff@=T9+)2"%3!‡+FdB=T;+)/u/RsAZšpB/FPE//RpBX›qA/ERF/ÿÿÿÅãŒ&"ŒsÿÅã‹%h³ +´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]² 9°EX°/±>Y°EX°/±>Y°EX°/±>Y³#+³+014>32#!#&&32654&#"ò">R//R=#?3¡“{ýüy“Ÿ3?¼ÛÛTP77PP77Pª/R=##=R/Bfûuþ‹ãhü†¡ý_¼7PP77PPÿìþ¬/.ê³' +³ +³ +°°Ð@''&'6'F'V'f'v'†'–'¦'¶'Æ' ]´Õ'å']°°0ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y± ô²9°±"ô´Ù"é"]@""("8"H"X"h"x"ˆ"˜"¨"¸"È" ]° ±,ô@,,',7,G,W,g,w,‡,—,§,·,Ç, ]´Ö,æ,]01#5255.54>3253#4.#"32¬-ÁRX“ʲn15y¾‰y¬)uu5Z{Dj‹T##T‹jô`V•½“X_uÕt¹ëƒô¼qVX˜þTE{Z3d¢ÆcbÇŸe'ÿÿ1sÇ&&‹sÿÿ1ss&/×sÿÿÿßÿéÇŒ&0Œsÿÿ1ÿésŒ&6ŒsÿÿÿéuS&B‹ÿÿÿÿéuT&BAÿÿÿéuW&BÖÿÿÿÿéu&BŒÿÿÿéuÿ&B×ÿÿÿÿéuÊ&BÛÿþº1ê³) +³ +³ +°°Ð@))&)6)F)V)f)v)†)–)¦)¶)Æ) ]´Õ)å)]°°3ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y± ô²9°±$ô´Ù$é$]@$$($8$H$X$h$x$ˆ$˜$¨$¸$È$ ]° ±.ô@..'.7.G.W.g.w.‡.—.§.·.Ç. ]´Ö.æ.]01%#5255.54>3253#4.#"32675ªsRX“Êd¤u?Bz±l+ZP@{{-Nl>T}T+1]ƒRh¢+²Rf “X_uÕK¬gjµI)9'‡þ‹>fJ):d‡PP‡b:RDÿÿÿüÿé®S&F‹ÿÿÿÿüÿé®T&FAÿÿÿüÿé®W&FÖÿÿÿÿüÿé®&FŒÿÿºéS&Õ‹ÿÿÿºéT&ÕAÿÿªüW&ÕÖÿÿÿºé&ÕŒÿÿ1sÿ&O×ÿÿÿÿìÿé¼S&P‹ÿÿÿÿìÿé¼T&PAÿÿÿìÿé¼W&PÖÿÿÿÿìÿé¼&PŒÿÿÿìÿé¼ÿ&P×ÿÿÿ1ÿésT&V‹ÿÿ1ÿésV&VAÿÿ1ÿésX&VÖÿÿ1ÿés&VŒºué °/°EX°/±>Y01'#5'37éí nîîn íÉýžbpîîééÓ'|°(/°)/°(°Ð°/°)° ܰ± ô@&6FVfv†–¦¶Æ ]´Õå]° ± ô´Úê]@ )9IYiy‰™©¹É ]³+³#+014>32#".732>54.#";e‡NL‰d;;d‰LN‡e;\+Nd<9fN++Nf9Y°EX°/±>Y³ +° °а/²  901%&54>753&&'667#²Ó7gXŠº9`)\\)`9ºŠüƒyyƒª!À^¢}R¯¦kVB>PýN?BVj¢‹…Â!ÏÃ1Ó/,³ +°°в9°°*аEX°/±>Y°EX°"/±">Y³+°°Ð°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°"±ô°$а%а°+Ð0134>32&&#"3#3 7#!532>5#1»-TxN3_K8 }R"0 »ÇLƒ\5#?^<ZI{pþøuþòPiß;Ž‹u!19;ÿFš‹?O °P/°Q/°P°Ð°/±@ ô@@@&@6@F@V@f@v@†@–@¦@¶@Æ@ ]´Õ@å@]°а/°°аQ° ܰа/° ±Hô´ÚHêH]@ HH)H9HIHYHiHyH‰H™H©H¹HÉH ]°а@°а °&аH°9г4++³ +01467&&54>32&&#"#".'732>54.76654.'D?HX‡pI\B9'!X3NfH9!#^ºº¤¤°/°EX°/±>Y014>32#".ºY°EX°/±>Y°EX°/±>Y³ +°°а/° ± ô° °а/01!###$!!#‹‰ëŠþ’óy‰ëŠrqã/ýÑ7'Fuý‘úþð}fÉ'1ÿé¤/;³$ %+³5+³0 +³+´Úê]@ )9IYiy‰™©¹É ]´Úê]@ )9IYiy‰™©¹É ]@55&565F5V5f5v5†5–5¦5¶5Æ5 ]´Õ5å5]°EX°+/±+>Y°EX°$/±$>Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]°+±ô´Ùé]@(8HXhxˆ˜¨¸È ]01#"&'732654.54>54&#"#4>32¤5_KcBN5mD\yRbA4"+/9Pou^Ó'7@½³ +³,-+³48+³ +´Úê]@ )9IYiy‰™©¹É ]@&6FVfv†–¦¶Æ ]´Õå]²( 9²7 9´Ú8ê8]@ 88)898I8Y8i8y8‰8™8©8¹8É8 ]°,°<аEX°=/±=>Y³#+³+³/;+01#".54>324.#"32>#'##!274&##326^T“ÍylËœ^X˜ÌuqÈšZAL…´gf´ˆMM…µhe´…N»º®# 3^H)b^3:;}}7>¤oË™\P“Ís̘XT˜Ìwd²ˆOK…µhi´…LL…´çòò¤7P7Py Ó-?×<¸b-AÕ³8 $+³+³ .+@&6FVfv†–¦¶Æ ]´Õå]´Ú.ê.]@ ..).9.I.Y.i.y.‰.™.©.¹.É. ]@88&868F8V8f8v8†8–8¦8¶8Æ8 ]´Õ8å8]°°CܰEX°)/±)>Y³=+³+³ +°)±3ô´Ù3é3]@33(383H3X3h3x3ˆ3˜3¨3¸3È3 ]01#".54>32&#"327%#".54>324.#"32>b`ÍP…`53^…TÍ`j7ŒfuqjŒ7jT•ÍylËœ^X˜ÌuqË™ZAN…´gf´ˆMM†´he´‡N“5`†OLƒc9“Hd‹iddnËš\P”ÌsÍšXV–Ïwe´‡PN…´ih´…LL…´é^ n³ +³ +³ +² 9°/°/°/°EX°/±>Y°EX° /± >Y°EX°/±>Y²9²9² 9°± ô°аÐ01###33###5!^nNožyyýs°q°ÑéŠþ²Nþv0þ¸HqþA¿qòôÇT °/°/01'ÇþP%“çóAº^é0³+°EX°/±>Y°EX°/±>Y°±ô°аÐ01#53#53麺þŒ»»^»»»¤¤A°EX° /± >Y°EX°/±>Y³+³ +°°а°а °а°Ð01%!#7!5!!5!73!!!¤ýßZoZþìJ¢þ!ZnZþ¶¢ì»»»pPoººoþ°ÿÁ¤V³+°° а°аEX°/±>Y°EX°/±>Y°EX°/±>Y³+³  +°±ô°±ô01!!##!!!!!¤þéo‘‹Xþ‘þëoþÅuþ‹yþ7yþs“ýmÿÓÿéÓ/&2°3/°4/°3°а/°Ð°/°4°ܰ а /°±ô´Úê]@ )9IYiy‰™©¹É ]² 9°±' ô´¶'Æ']@''&'6'F'V'f'v'†'–'¦' ]´Õ'å']²* 9°EX° /± >Y°EX°/±>Y° ±.ô´Ù.é.]@..(.8.H.X.h.x.ˆ.˜.¨.¸.È. ]² .9°±"ô@""'"7"G"W"g"w"‡"—"§"·"Ç" ]´Ö"æ"]²"9² 9²* 901'7&&54>327#"&'4'32>%&&#"-N#5y¿‡ƒº<‡R##6v¿‰‡¹;…j"ý™)‹kjŒT ý+e0^k‹T!¼TT¿hƒô¼qj[’ VT¾iƒôºqgZn–yýrN`eŸÇbEŠ?‹V\d¢ÆÿøÜ¶Å)3R³/ +@//&/6/F/V/f/v/†/–/¦/¶/Æ/ ]´Õ/å/]³'+³#+°° а°а#°,а'°2Ð01#"&'#".54>3266324&#"326%&#"32¶#?X3Hu55oN1VA%%?V3No55uH1VA%ZV;JJ;TþRFƒ;VR?Ñ3ZB&CZXE&BZ33[A%FZZF%A[3HTœŸ^AœXDA^ÿF¤° -³ +°°а° г +³ +°°а °Ð01!#!5!3!!5!¤þfpþfšpšü\¤¦þZ¦q™þgý/qºÿF¤Þ °/³ +01%!5!MþMþP@ýê-MþNþNýhqºÿF¤Þ °/³ +01'7!5!˜þN°þPN ýêÞþM±²Nûhq¤n³ +°°в9°°аEX° /± >Y°EX°/±>Y°EX°/±>Y³+³  +°°а°в 9° °а °Ð01!#!5!5'!533333!!¤þsˆþqlþÝåÌ™!!™Ìáþán˜þh˜x#×y–ý¬Tþjy×#1þ‹s¤ž°/°/°Ü±ô°°а/± ô° а°аEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y² 9±ô@'7GWgw‡—§·Ç ]´Öæ]²901!#5!"'#332>53sŠ`ÿ{T‰‰myLzV-Šìþý8þjýÂ}‹Fu—R¢ÿìÿé¶/%¾°&/°'/°&°Ð°/°'°ܲ9± ô´Úê]@ )9IYiy‰™©¹É ]°± ô@&6FVfv†–¦¶Æ ]´Õå]°EX° /± >Y°EX°/±>Y² 9±!ô@!!'!7!G!W!g!w!‡!—!§!·!Ç! ]´Ö!æ!]01466$7&$'7#"&4&'32>tËœNþø¦-‡ú½pGˆÀyÍõA‘ô°b¨‘\Žb3bi¢zT}®;u5‰½ø£Ï’NÁo7d/Fb}Lt@t¤+sC³ +°°Ð°° а°ܰEX°/±>Y°EX°/±>Y°± ô°± ô01!!55!#!!3sü¸Hþ¸HyýÕEþ»+yuuþGDýéýèE¤ W° /° /°ܱ ô° °а/±ô°EX° /± >Y°EX°/±>Y°EX°/±>Y° ±ô°ааа Ð01##!##5!¤»‰þ䊺¤¤û\¤û\¤uÿ鲤”°/°/°Ü± ô°°а/± ô°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y±ô@'7GWgw‡—§·Ç ]´Öæ]² 9°±ô°аааÐ01%3267#".5##65#5!#ÑF3#)R-VC)ì+‹Ó¤ÓÏ58 q:V7ZþsþdÉ“Í{{þu¤¢'³+³ +³+° ° а /°°а/01&&#"!"&'53265!2¤?)‡þrC#;-…’D#'yúËþ…syŽ5}ÿø¼+%48İ9/°:/°9°Ð°/°:°ܱ ô°в9° °+а±2ô@22&262F2V2f2v2†2–2¦2¶2Æ2 ]´Õ2å2]°°5а°6а6/°EX°/±>Y³85+³&!+³/+°° а /°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°/°,а,/014>32254.#"'6632#5#".2>55&&#"!5!Eu’M% '7BV…@7=¢s=u\9u¨=fL+DkG'5D%v–HïýD¼øEc=K%1 #-m)/;\Býøo:P2!/6PCL-:þouÿîþ-%)²°*/°+/°Ü°*° а /°± ô´Úê]@ )9IYiy‰™©¹É ]° ± ô@&6FVfv†–¦¶Æ ]´Õå]°EX°/±>Y³)&+³!+°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01#".54>324.#"32>!5!þ=i‘RTŽj;;jŽTR‘i=‰)F\56\E'o7\F'týé¤V’f97fZX‘i77i‘X=gI''Ig=}–'Hfýšuÿì¼/-dz $+³ +´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]@fv†–¦¶Æ]@ &6FV]´Õå]°$±ô°EX°)/±)>Y°EX°/±>Y°EX°/±>Y°±ô°)±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°а Ð013!>54.#"!535&54>32¼n}Óþ¤CZ8'V…^Z…V)6XCþ¤Óyn?{¶ww¶}?å‘þð]ru#g{‡?R¨‰VV‰¨R?‡{gþÝurV•qÕ¢bb¢ÕÿÛÿ麺5<K°L/°M/°<ܱ ô²<9°L°а/² <9°<°)а°=а±C ô@CC&C6CFCVCfCvC†C–C¦C¶CÆC ]´ÕCåC]°EX°/±>Y°EX°#/±#>Y°EX°/±>Y°EX°3/±3>Y³ )+²9° °а/°±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 9°3±,ô@,,',7,G,W,g,w,‡,—,§,·,Ç, ]´Ö,æ,]°°9а ±@ô°,°FÐ01%#"&54>3254&#"'>326632!3267#"&4&#"&&#"32>5Á +=N1u}9]x@0FG)^#VFFANp„E\k3þTNN/Hu#}fLP@GBP‰ -V{<;!=/ª#C8#žwPuI#`LsH;T+='ENNEp¤ºJ¦”:A%lieÍ£Š…¨e`f6V5H)ÿÕÿéѺ$/ü°0/°1/°0°а/°1°ܱ ô´Úê]@ )9IYiy‰™©¹É ]° а /°±% ô@%%&%6%F%V%f%v%†%–%¦% ]´¶%Æ%]´Õ%å%]°а/°EX°/±>Y°EX°/±>Y°±+ô´Ù+é+]@++(+8+H+X+h+x+ˆ+˜+¨+¸+È+ ]² +9°± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]² 901'7&54>327#"&'4'32>%&&#"+\EE´mq´A˜^IE´oq¶B•^+ýÉ/TRƒ\/ýB'9/RRƒZ/wJtšj·IKDywLy™m²HJDwÏjTþ<1:8b‡PkMÄ1::f‡Ñÿé¶”³+³ +° °а/° ± ô@&6FVfv†–¦¶Æ ]´Õå]°EX°/±>Y°EX° /± >Y°EX°/±>Y±ô@'7GWgw‡—§·Ç ]´Öæ]013#4>533267#"&/ººþ¢9VgV9‘;VhVY°EX°/±>Y°EX°/±>Y01!33#13R3ºººªüV»¤/³ +³+01!#!5!¤qüͤ¿p¤^°EX°/±>Y³+01!#7!¤þãþÓhÛj¦oðüÕ!ý®ºþu¤+ —³+°°а° аEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³ +°±ô°а°а/°°аа±ô´Ùé]@(8HXhxˆ˜¨¸È ]01!!"&'53265#534632&&#"¤þsþrC#;-…ÓÓÇÉ/A?+ƒƒ¤uüÁþ…syŽ?uÀÇu‘ÿì¸'#".#"'632327#".#"'632327¸rÅJXED3RdrÅJZED1RdrÅJXED3RdrÅJZED1RÏÈ-7-‰;Å/8-þMÈ-7-‰;Å/7.ÿÅã!°EX°/±>Y°EX°/±>Y±ô01!!3ãûⲺøþªþªû\ûè–' °/° /°/°/01%MþºFMõ}Pþ¼DPøåOGJPúøOGJPú–˜% °/° /°/°/01'7'7'7'7˜þ¸NøøN/þ¼PøøPÝþ¹MúúNþ¸þ¹MúúN¤º @°EX°/±>Y°EX°/±>Y°EX°/±>Y°±ô°ааа а Ð01!#53#53#53¤»»þ‹ººþ‹ºººººººÿÿÿÅãÉ&"AuÿÿÿÅãs&"×sÿÿÿßÿéÇs&0×sÿòÿé¤/* ³ +³# +@  & 6 F V f v † – ¦ ¶ Æ ]´Õ å ]°#± ô°#°а°'в(#9°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°&/±&>Y³!"+°±ô°±$ô°%в(9014.#"32> !25!!!!!!5¦ !90/;! !;/09! ”þà JHãþ‹þåuþH‹{Ï“RR“Ï{{Ì”RR”ÌýÙ¢¤LP†uþ-uþu…PLÿÛÿ麺"*ü°+/°,/°Ü±#ô² #9°+°а/²#9°°"а±' ô@''&'6'F'V'f'v'†'–'¦'¶'Æ' ]´Õ'å']°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX° /± >Y³"+² 9² 9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°%а ±)ô@))')7)G)W)g)w)‡)—)§)·)Ç) ]´Ö)æ)]013267#"'# !26632'4&#"#"32NN/BDº²1+ªþé¤/oTdq9“7RR:ŽŽ¢¦”8G)ÕÉÉèéÂb`h ¼Ty—–žJwþ‰þ‡¨¤ ³+015!¤¨llÿ¤¨ ³+01!5!û¢^¨l7é¤ t³ +³ +°±ô°а± ô°аEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y° ±ô°±ô°° аа°Ð01!54>3"3!54>3"3¤þÀ)PwPËËýÑþÂ'PwPÉÉéÚE{\8uß»ÚE{\8ußìm k³+³ +°°а± ô° °а± ô°°ܰEX°/±>Y°EX° /± >Y³+°± ô°°а°а °аÐ01!#5255#%!#5255#?(PwPËË/>'PwPÉÉÚE{\7tß»ÚE{\7tߪéé ;³ +°±ô°аEX° /± >Y°EX°/±>Y° ±ô°±ô01!54>3"3éþÁ)PwOÊÊéÚE{\8uߺìú 0³+°°а± ô°EX°/±>Y³+°± ô01!#5255#º@)PwPËËÚE{\7tß ¤° 5³+°°а°аEX°/±>Y³+³ +°±ô01#53#53%!5!/ººººuü\¤öºü]ºÝuÿîÿ𶸰EX°/±>Y°EX°/±>Y01 ¶þþãbþžþžbÓþãåþbþžþžÿÿÿáþuÁ"ZŒÿÿÿ츌":Œsÿå¤7°/°EX°/±>Y01'¤ü¼^Føúí<ÿé¬/5™°EX°/±>Y°EX°&/±&>Y³+³+°°Ð°± ô´Ù é ]@  ( 8 H X h x ˆ ˜ ¨ ¸ È ]°&±ô@'7GWgw‡—§·Ç ]´Öæ]°°+а°-а°4Ð013>32&&#"!!!!3267#".'#53&45447#¦<`‰Z‹»3y„\d‰þô ÿ‹d\„y3»‹Z‰`>¤ššZbªJ°¼{›°°q/-q²®ž{!¼±J}¬bq/1Ç–\' °/°/01%\Nþ¹GNøåOGJPúH–Ý% °/°/01'7'7Ýþ»P÷÷PÝþ¹MúúN^+¿°/°/°°а/°а± ô°а°ܱ ô°EX° /± >Y°EX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô°±ô°а ±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°ааа°аа°Ð01!!53#534632&&#"!3!!^û¢ÓÓÓÇÈ/B@+ƒƒ/Óþ¤þZuºuÀÇu‘üѺýF^+²°/°/°°а/°а°ܱ ô°± ô°аEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô°±ô°а°ааа ±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°аа°Ð01!!53#5346323!&&#"3#^û¢ÓÓÓÇÈg‡;Óþ¤L>ƒƒÓÓuºuÀÇûm3 ‘uýFººéK³+°± ô±ô°°а° а° а° а /°°а°а/°EX° /± >Y01'#755'37'7éí nîîîîn íííœððn Ùpîîpþ' u/; °/°/01#53/ººº.þŽn» A³+°°а± ô°°ܰEX°/±>Y°EX° /± >Y±ô°±ô01%!#5255#.@)PwPËË»ÚE{\7tßþŽm» y³+³ +°°а± ô° °а°ܰEX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y° ±ô°±ô°° аа°Ð015!#5255#%!#5255#?(PwPËË/>'PwPÉÉ»ÚE{\7tß»ÚE{\7tßÿìÿÛ\/'3?K…³ +³" (+³. +³: @+³F 4+@  & 6 F V f v † – ¦ ¶ Æ ]´Õ å ]´¶"Æ"]@""&"6"F"V"f"v"†"–"¦" ]´Õ"å"]°"°а/´Úê]@ )9IYiy‰™©¹É ]´Ú4ê4]@ 44)494I4Y4i4y4‰4™4©4¹4É4 ]´Ú@ê@]@ @@)@9@I@Y@i@y@‰@™@©@¹@É@ ]°F°Mܰ/°1/°I/°EX°/±>Y°EX°/±>Y³++³ +°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°1±%ô@%%'%7%G%W%g%w%‡%—%§%·%Ç% ]´Ö%æ%]°°7а%°=а+°CÐ01'4&#"326%4632#"&4&#"326%4632#"&%4&#"326%4632#"&˜ýÈf=þÝ/311113/þØbfgbbgfbb/321123/þ×bgfbbfgbÏ/411114/þ×bfgbbgfbüúß)#ô@VV@?VV?i““ih””ý@VV@?VV?i““ih””h@VV@?VV?i““ih””ÿÿÿÅãË&"Ösÿÿ1sË&&ÖsÿÿÿÅãÇ&"‹sÿÿ1sŒ&&Œsÿÿ1sÉ&&AuÿÿºéÇ&*‹sÿÿªüË&*ÖsÿÿºéŒ&*ŒsÿÿºéÉ&*AuÿÿÿßÿéÇÇ&0‹sÿÿÿßÿéÇË&0Ösh?0 °/°EX° /± >Y°EX°/±>Y01#".#"#".54>3232>323“u;9Pd8:9<965Dƒg='NyT$F>9 >?@#“m’/E?•¦  üf+zqR{º×\J–vL…{‹+XN;ÿÿÿßÿéÇÉ&0Auÿÿ1ÿésÇ&6‹sÿÿ1ÿésË&6Ösÿÿ1ÿésÉ&6Auºé¤ D³+°±ô°°аEX°/±>Y°EX°/±>Y±ô°±ô°°а Ð01!!53#5!3éýÑÓÓ]Òu¶yüѪôüX °/°/°/01''ü5òö5)9CÍÏA#N/N³+³ +01#".#"'632327NZœ9H76&g?P\š9H75'f@Íž%+%o/œ%+%qºRéà ³+01!5!éýÑ/Rq¶Fð °/° /³+01#"'7327ðu¨¨uN^qq^ºttL^^u^/³+°/°EX°/±>Y01#53/ºº^»ò´Ë:³ +´Úê]@ )9IYiy‰™©¹É ]³+³+014>32#".732654&#"ò">R//R=##=R//R>"ZP77PP77Pé0Q>##>Q0/R=##=R/7PP78PPòþ/ #³ +°EX°/±>Y°EX°/±>Y01#52553/RX“Ês)“X_uÕ)ªdw°/°/°/°/01#3#3ªºýÑ‹‹»wþ‰wðþ…ü' 4³ +@  & 6 F V f v † – ¦ ¶ Æ ]´Õ å ]°/°/01"&54673ü}5'%2mPþ…}f@\#'-LH`ªôüX °/°/°/01 77üþ×þ×5öòþä DÏËu/°EX°/±>Y°EX°/±>Y01##53-3R3ºººüVªú纺Hé#°/°/°EX°/±>Y°EX°/±>Y01###é(g+º+e+þ/Ñþ/Ñ7þ‹bÿ˜°/°EX°/±>Y01#b¬Thþó ÿÙ‘Í…!5…°6/°7/°ܰ6°а/°±"ô´Ú"ê"]@ "")"9"I"Y"i"y"‰"™"©"¹"É" ]°±, ô@,,&,6,F,V,f,v,†,–,¦,¶,Æ, ]´Õ,å,]° /°/°/°!/³1 +³'+01'#"&''7&&547'763274.#"32>Íu155/sPs=ž\^ž=sNs/1buNu¸\ž;uJ/\ƒRRƒZ//ZƒRRƒ\/7t> \\ž=sNq/15/uNu=œ\¹vNwg6/uþP‡g99g‡PP‡b77b‡ÿFÓ³+°°а°а/°/01#35#3ŠŠŠŠºéºê¤¤ ³+01!5!¤ü\¤¤uéÁ%`³ +° °Ð°/°°а/°°аEX°/±>Y³ +°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01353!57654&#"#432Á!;E-“bþkü/7)sfÙT7B7-5?/I¤Nð/)#%Šè)1ÿþݲ#!“³ +°°Ð°/´Úê]@ )9IYiy‰™©¹É ]°° а /² 9°EX°/±>Y²+°±ô°±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 901#"'732654'ᒆ#"#47632²s\Ìjl):!CjXpi@?Z\iBLEkË{2 8 dBJ{j83\HL#5é…(³ +°° аEX° /± >Y³+°°Ð01!53#52>533…þßZ`JC8$mZé["3Jc6K0þ+ÿå¤7#&«°'/°(/°"ܰа/°'°а/°а± ô°"± ô°а/°"°а°$в%"9²&"9°/°EX°/±>Y°EX°/±>Y°EX°/±>Y³$+³+°°в9°±ô°$°а° а°"а#Ð01'!53#52>533!535#533#3'5¤ü¼^Fþ=þßZ`JC8$mZþá\úôoZZZÃwøúí<ý²["3Jc6K0þ+ü¼ZY°EX°/±>Y°EX°/±>Y³+³0 +°± ô°0°"в$901'353!57654&#"#432!53#52>533¤ü¼^F^!<F-”bþjü/7)sfÙT7BýßþßZ`JC8$mZøúí<ü_8-5@/J¤Nï0)"%‰ç)1["3Jc6K0þ+ÿþÿå¤7!%47°8/°9/°8°а/± ô@&6FVfv†–¦¶Æ ]´Õå]°Ð°/°° а /² 9°9°3ܰ%а%/°3±) ô°-а-/°3°.а)°5в639²739°%/°EX°/±>Y°EX°#/±#>Y°EX°&/±&>Y³5*+³+°°ܰ±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 9°&±(ô°5°/а*°1а(°3а4Ð01#"'732654'ᒆ#"#47632'!535#533#3'5²s\Ìjl):!CjXpi@?Z\iBLòü¼^F\þá\úôoZZZÃwEkË{2 8 dBJ{j83\HL#5úí<úÉZY°EX°/±>Y³ +° ±ô° °а°а±ô01#!#53!2#!3#!2ÏY°EX°/±>Y³+³  +01!##33 4!#326¢þ ô‰‰ôô‹þ—ôô´µ˜þ‹þÝþóþŒþþƒÿìÿé¶\ 0°1/°2/°1°а/°2°ܲ9²9±! ô´Ú!ê!]@ !!)!9!I!Y!i!y!‰!™!©!¹!É! ]°±) ô@))&)6)F)V)f)v)†)–)¦)¶)Æ) ]´Õ)å)]°/°EX°/±>Y²9²9±,ô@,,',7,G,W,g,w,‡,—,§,·,Ç, ]´Ö,æ,]017&&'77#"&5466$7&&'4&'32>é )V/-ufNyP‡`7GˆÀyÍõtËœ)yG·ö‘ô°b¨‘\Žb3Ñ #u-5P{3›»pÏ’NÁ¸i¢zTFn/¶þ˜7d/Fb}Lt@t¤ÿÿÿáþuÁT&Z‹1þ‹¦!ì°"/°#/°Ü°"° а /± ô° в 9°±ô´Úê]@ )9IYiy‰™©¹É ]°°аEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô@'7GWgw‡—§·Ç ]´Öæ]²9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 901#"'#36324.#"32>¦Bx±n–}‰‰}–j°{D‹+RRœwwœRR+Ñm²ƒHcþAŽþ?bE´qR‰d:þ 9g‹ÿÿÿÅã6&"ØsÿÿÿéuÂ&BØÿÿÿÿÅãy&"Ùsÿÿÿéu&BÙÿÿÅþ…o³ +´Úê]@ )9IYiy‰™©¹É ]²9°°ܰ/°EX° /± >Y°EX°/±>Y°EX° /± >Y°EX°/±>Y³+² 901"&5467#!#33o}H{ýüy“²º²1mPþ?ÛÛþ…}f0Kuþ‹úç-LH`¡ý_ÿþþ…üº3Dõ³B +³ +°±ô°° а /°°!а°9Ð@BB&B6BFBVBfBvB†B–B¦B¶BÆB ]´ÕBåB]°/°EX°./±.>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y³=+².9°.±'ô´Ù'é']@''('8'H'X'h'x'ˆ'˜'¨'¸'È' ]°±4ô@44'474G4W4g4w4‡4—4§4·4Ç4 ]´Ö4æ4]°=°:а:/01!3"&5467#5#"&54>3254.#"'66322>55&&#"smP}<$[dd-¹¾X¹`%;56 ;V^!h°L>TÑ}L“uFþV‰`5C{-J‰f>s?#H`Z}f0Kœ-D+Ž…XwECDX38/g3A'Q„\ýü3LV#X -H5;cÿÿÿìÿé¬Ç&$‹sÿÿÿéS&D‹ÿÿÿÿìÿé¬Ë&$ÖsÿÿÿéW&DÖÿÿÿÿìÿ鬌&$Úsÿÿÿé&DÚÿÿÿìÿé¬Ë&$ßsÿÿÿéW&Dßÿÿÿ1ÏÏ&%ßwÿé)&*Ù°+/°,/°Ü± ô°+° а /°°а°а ± ô@&6FVfv†–¦¶Æ ]´Õå]°/°/°(/°EX°/±>Y°EX°'/±'>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±$ô@$$'$7$G$W$g$w$‡$—$§$·$Ç$ ]´Ö$æ$]²$9°±ô°±)ô01!#5#".54>32#5!&&#"327#é‰/u;Zc55cZ;u/ºC‰/l<=`B##B`={\ÉTeV58H´kjµI55Tuý²A::d‡PP‡d:}?þ/Ñÿÿÿ‹Ïìÿþÿé-, °-/°./°ܱô°-° а /°°а°а°а°а ±% ô@%%&%6%F%V%f%v%†%–%¦%¶%Æ% ]´Õ%å%]°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³+°±*ô@**'*7*G*W*g*w*‡*—*§*·*Ç* ]´Ö*æ*]²*9°± ô´Ù é ]@  ( 8 H X h x ˆ ˜ ¨ ¸ È ]² 9°°а°Ð01##5#".54>325#53533&&#"327-ºŠ;Jo°yAAy°oJ;ººŠºþ¼;‹NR}T++T}RžvéüV58H´kjµI55™u»»þmA::d‡PP‡d:}ÿÿ1s6&&Øsÿÿÿüÿé®Â&FØÿÿÿ1sy&&Ùsÿÿÿüÿé®&FÙÿÿÿ1sŒ&&Úsÿÿÿüÿé®&FÚ1þ…{³ +³ +´Úê]@ )9IYiy‰™©¹É ]°° а/°EX°/±>Y°EX°/±>Y°EX°/±>Y³ +°± ô°±ô°Ð01"&5467!!!!!!3}ýBýGýþ¹1lPþ…}f0Kuþ-uþs-LH`ÿüþ…®º'0½³ +´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]² 9°/°EX°/±>Y°EX° /± >Y°EX°/±>Y³(+°±"ô@""'"7"G"W"g"w"‡"—"§"·"Ç" ]´Ö"æ"]°±+ô´Ù+é+]@++(+8+H+X+h+x+ˆ+˜+¨+¸+È+ ]01%3"&5467#".54>32!3267&&#"“mP}++l´ƒHA{°mw²w9üÛº•i¤)`^°BpV:B#H`Z}f)BH²mj³ƒIPÄw”°V@Bƒè™–+PqCÿÿ1sË&&ßsÿÿÿüÿé®W&Fßÿÿÿÿìÿé×Ë&(ÖsÿÿÿþþusW&HÖÿÿÿÿìÿé×y&(Ùsÿÿÿþþus&HÙÿÿÿÿìÿé׌&(Úsÿÿÿþþus&HÚÿÿÿìþ‹×/&(âÿþþusÓ#2°3/°4/°3°а/°4°ܲ9²9°±, ô@,,&,6,F,V,f,v,†,–,¦,¶,Æ, ]´Õ,å,]° а /°±ô°!а°$а/°/°EX°"/±">Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³ +°±/ô@//'/7/G/W/g/w/‡/—/§/·/Ç/ ]´Ö/æ/]²/9°±'ô´Ù'é']@''('8'H'X'h'x'ˆ'˜'¨'¸'È' ]²!'9013#"&'732655#"&54>3253&&#"3267`º Bw¡c‹ÃG`+¢hŽ¥zœÛúAy®mL;ŠŠ;NR}R+¦¦N;^uþ‹û¬`–h7hbJAX‡dlúÙj³ƒI55TÙA::d‰N ¾;Bÿÿ1sË&)Ösÿÿ1sÍ&IÖuÿw/™°/°/°ܰа±ô°° а /± ô° ° а°а°а°а°аEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³+³+°° а° а°а°Ð013##!##5353!53!s¼¼Šýщºº‰/ŠŠýÑHqü)\ý¤×qÑÑÑý¸þúÿws¯°/°/°Ü±ô°° а /± ô° °а °а °в 9°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y³ +°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°а °в901!#4&#"##53533#3 sŠlyL{V-‰ºº‰»»cþX?}ŠFu—Rþ^îp»»pþÌþ…ÿÿNNs&*×sÿÿNNÿ&Õ×ÿÿÿºé6&*ØsÿÿºéÂ&ÕØÿÿÿ¶ðy&*Ùsÿÿ¶ð&ÕÙÿºþ…u‚³ +³ +´Úê]@ )9IYiy‰™©¹É ]²9°/°EX° /± >Y°EX°/±>Y°EX°/±>Y°±ô° ± ô°аа°аÐ01"&5467!53#5!#33u}þÓÓ/ÒÒ1mPþ…}f0Ku/uuûÑu-LH`ºþ…u¤³+³ +´Úê]@ )9IYiy‰™©¹É ]²9°± ô°° в9°/±ô°/°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y°±ô° ± ô°°аÐ01"&5467!53#5!33#53u}þÓÓ]Ò1mPþºººþ…}f0KuºuüÑu-LH`»ÿÿºéŒ&*Úsþu¤g°/°/° ܱ ô°°а/±ô°EX° /± >Y°EX°/±>Y°EX°/±>Y³+°±ô°±ô°аа°аÐ0132>53#"'!53#5!#31H\s=‰ÓÙÓ{…ýÑÓÓ/ÒÒª94JsHœûdøþð u/uuûÑþu¤ $³³ +³" +° ± ô°° а"°&ܰEX°/±>Y°EX°/±>Y°EX° /± >Y°EX° /± >Y°EX°/±>Y°EX°/±>Y°EX°"/±">Y³+°±ô°±ô° ±ô°° а а°аа°аÐ01#53!53#5!3#53"'732>5#5!u»»ºýÑÓÓ\Óu»»þsöci%uVC\6Ó\¼^»úçuºuüÑé»ù\ÊHLR'HfB/uü\´×ÿÿÿþÿésË&+ÖsþuXX,³ +°/°/°/°EX°/±>Y³+°± ô01"'732>5#5!''\öbi$uVD\5Ó\½D5òö5)þuÊHLR'HfB/uü\´×ÄCÍÏA#ÿÿ1þ‹ž&,âÿÿ1þ‹¢&Lâ1¢¤ J³ +°°аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²901!##33¢Ãþƒ¨‰‰Äþ-¢šþø¤þ öþTÿÿ1sÇ&-‹sÿÿºéÉ&M‹uÿÿ1þ‹s&-âÿÿºþ‹é&Mâÿÿ1s&-wÕþêÿÿº¢&Mw\þêÿÿ1s&-Áººÿÿº^&MÁ/ÿ^s O³ +°°а °аEX°/±>Y°EX°/±>Y²9²9²9² 9± ô01!!5737!sü¾ÓÓ‰ÓÓ¹3EEgýÈFFþºé‰³+°±ô±ô°°а° а° а° а°в9°°аEX°/±>Y°EX° /± >Y°±ô² 9² 9° ± ô° ав 9² 901#5!73!535Ó]ÒÒÒýÑÓÓ²ðwýÈFFþww¼Eÿÿ1sÇ&/‹sÿÿ1sS&O‹ÿÿÿ1þ‹s&/âÿÿ1þ‹sº&Oâÿÿ1sË&/ßsÿÿ1sW&Oßÿÿÿs/&Owþt1þus^°/°/°Ü±ô°а/°°а/± ô°EX°/±>Y°EX°/±>Y°EX°/±>Y³ +²9²901%#"'732>7#33sÓÙÓ{V1HA^B) ý߉Á÷Š}øþð`94'BX1uû°ûã1þusº ¡°!/°"/°ܱô°!°а/± ô°в9°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³+°± ô´Ù é ]@  ( 8 H X h x ˆ ˜ ¨ ¸ È ]²90132>54&#"#33 #"'ƒCD\5lyL{V-‰‰cþX½¸ZDú'HfB?}ŠFu—Rþ^¤êþ…ýÁ´×ÿÿÿßÿéÇ6&0Øsÿÿÿìÿé¼Â&PØÿÿÿÿßÿéÇy&0Ùsÿÿÿìÿé¼&PÙÿÿÿÿßÿéÇê&0Ýsÿÿÿìÿé¼v&PÝÿÿÿ1°Ç&3‹sÿÿžT&S‹ÿÿ1þ‹°&3âÿÿþ‹žº&Sâÿÿ1°Ë&3ßsÿÿžX&SßÿÿÿéƒÇ&4‹sÿÿÿöÿé‹T&T‹ÿÿÿéƒË&4Ösÿÿÿöÿé‹X&TÖþƒ/H°³ )+³ +³3 2+°2±ô°°а2°5а)±? ô°3°JܰEX°2/±2>Y°EX°4/±4>Y°EX°./±.>Y°EX° /± >Y°EX°/±>Y² .9²1 .9°.±:ô´Ù:é:]@::(:8:H:X:h:x:ˆ:˜:¨:¸:È: ]01#5255&&'#332>54.'.54>3253#4.#"ƒ7\{FRX“Ê` /tt>`}A:bJ+7]tY°EX° /± >Y°&±-ô´Ù-é-]@--(-8-H-X-h-x-ˆ-˜-¨-¸-È- ]01#5255&&'73 54.'.54>32&&#"‹;b}BRX“ÊzòZ=gÈk53Vo=NšMGw V{ÂN7P¤`+iZ=3Vo=L›NDbA%“X_uÕEY°EX°/±>Y³+°±ô°аа°а° а± ô°аÐ01#3!53#53!#!#!3éÒÒýÑÓÓÓþèu¤uþèÒ`þuuëqÓþ¼¹þGDþ-ÿé®#£³ +°°а°а°а°!аEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³#+°±ô@'7GWgw‡—§·Ç ]´Öæ]°°а#°а±ô°а а!Ð01#3267#".55#53#533!!3/Ó!;T6f‰ sÇ•Rˆ`5ÓÓÓÓ‰þsÓ¾h3ZD'e“­6`‡Phquuþ‹uÿÿÿ1ÿéss&6×sÿÿ1ÿés&V×ÿÿ1ÿés6&6Øsÿÿ1ÿésÃ&VØÿÿ1ÿésy&6Ùsÿÿ1ÿés&VÙÿÿ1ÿés>&6Ûsÿÿ1ÿésË&VÛÿÿ1ÿésê&6Ýsÿÿ1ÿésw&VÝ1þ…s&§³ +³# +³+´Úê]@ )9IYiy‰™©¹É ]²#9°°(ܰ/°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y±ô@'7GWgw‡—§·Ç ]´Öæ]01"&5467#".5332>533ø}!me1‰=mXXo=Ї2mPþ…}f)@F¶oFü¸;„lHHl„;Hü¸´ò+-LH`1þ…þ¤™³ +³ +°°а/°°а±ô°/°EX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y² 9±ô@'7GWgw‡—§·Ç ]´Öæ]01"&5467#5# 332>533þ}>bþþ¨‰myLzV-Š1lPþ…}f0Kéÿ{@ýÀ}‰Fu—R¢ü\-LH`ÿÿÿÁãË&8ÖsÿÿÿåÃX&XÖÿÿÿì¸Ë&:ÖsÿÿÿáþuÁX&ZÖÿÿ1wÉ&;‹uÿÿ/wS&[‹ÿÿÿ1wŽ&;Úuÿÿ/w&[Úÿÿ1wÍ&;ßuÿÿ/wW&[ßÿº¤/³+°±ô°°а° аEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô°аа±ô°а ±ô´Ùé]@(8HXhxˆ˜¨¸È ]01%3!53#534632&&#"ÒýÑÓÓÓÇÉ/A?+ƒƒuuuºuÀËu…‘ÿÿÿÁ¤Ë&Ž‹wÿÿÿÛÿéºV&ž‹ÿÿÿÓÿéÓË&‹wÿÿÿÕÿéÑV&Ÿ‹ÿÿþ‹ƒ/&4âÿÿÿöþ‹‹º&Tâÿÿþ‹¤&5âÿÿþ‹®&Uâ^F/ °/°/01#FTe/þ/Ñ^¤/ 9³ +°/°EX°/±>Y°EX° /± >Y°±ô°ааа Ð01##53#53FTe»»ýºº/þ/Ñþ/»»»ÿÿÿÅã/"wþŒÿÿÿ_s/"…wýÒÿÿÿ_s/#wýÒ‡ÿÿé/#wþЉÿÿÿ[ÿéÇ/"wýÎÿÿÿ[¸/"”wýÎÿÿÿ[¼/"wýÎÿÿÿé¤/&§xÿÅã 0°EX°/±>Y°EX°/±>Y°EX°/±>Y³+01!#!#3ã“{ýüy“²º}ÛÛuþ‹üÕ¡ý_1¢$‡³! +³ +° ± ô± ô² 9´Úê]@ )9IYiy‰™©¹É ]°!°а °&ܰEX°/±>Y°EX°/±>Y³+² 9°±ô°±!ô01#!!24.#!!2>4&#!!26¢òßþ`‰Rž}NËø¶:Zl2ÿ8lV8-¯™þ陯u»ºJƒjËJLaEX/þE1Výô‡{ýþ1¤*³ +°EX°/±>Y°EX°/±>Y°±ô01!!#1sý‰uû\ÿÅã!°EX°/±>Y°EX°/±>Y±ô01!!3ãûⲺøþªþªû\ûè1s =³ +° °аEX°/±>Y°EX°/±>Y³+°±ô°± ô01!!!!!!!sü¾BýGýþ¹uþ-uþ1w U°/°/°Ü°°а/°в9°± ô°± ô°EX°/±>Y°EX°/±>Y°±ô°± ô01!!5!#!!3wüºýåu1ýw)uu/þÀµuûÑE1s `° /° /°Ü±ô° °а/± ô°а° аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y³ +01!#!#3!3sŠýщ‰/Š\ý¤ý¸HÿßÿéÇ/+é°,/°-/°ܰ,°а/°±ô´Úê]@ )9IYiy‰™©¹É ]°±" ô@""&"6"F"V"f"v"†" ]@ –"¦"¶"Æ"]´Õ"å"]°EX°/±>Y°EX° /± >Y³+°±ô´Ùé]@(8HXhxˆ˜¨¸È ]° ±'ô@''''7'G'W'g'w'‡'—'§'·'Ç' ]´Ö'æ']01!!%#".54>324.#"32>å×þ)â6v¿‰‰¿w55y¿‡‡¿v8Š1\‡Vk‹T!!T‹kjŒT Çu9ƒôºqqºôƒƒô¼qq¼ôƒÏ’Md¢ÆcbÇŸeeŸÇºé =³ +°EX°/±>Y°EX°/±>Y±ô°±ô°а а° а Ð01!!53#5!#3éýÑÓÓ/ÒÒu/uuûÑ1ž J³ +°°аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²901!##33ž¨þNЉ‰/µþšþý…{ýÆÿÅã1°EX°/±>Y°EX°/±>Y°EX°/±>Y²901!#3Pþƒþ…“²º²ûsúç1s m° /°/°Ü±ô° °а/± ô² 9°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²9²9² 901!###33sŠçb扲îð²?ý_¡ûÁýVª1s b° /° /°Ü° °а/± ô°±ô°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y²9²901!##33sªýñ‰Á÷ŠPû°ûã¤~°/°/°°Ð°/± ô°°ܱ ô°а° а° а° аEX° /± >Y°EX°/±>Y³+°°Ü°±ô°°аа ±ô° ° ܰаÐ013!53!!#!#!!y²yü\+ýNy¤yýº×þ)-¸¸þÓ¤»0þÐþÞuÿßÿéÇ/'â°(/°)/°Ü°(° а /°±ô´Úê]@ )9IYiy‰™©¹É ]° ± ô@&6FVfv†–¦ ]´¶Æ]´Õå]°EX°/±>Y°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>324.#"32>Ç6v¿‰‰¿w55y¿‡‡¿v8Š1\‡Vk‹T!!T‹kjŒT ‹ƒôºqqºôƒƒô¼qq¼ôƒÏ’Md¢ÆcbÇŸeeŸÇ1sK°/° /°Ü±ô°°а/± ô°EX°/±>Y°EX°/±>Y°EX°/±>Y°±ô01!#!#!sŠýщB¤û\1¢ r°/°/°Ü°°а/± ô°± ô´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°°аEX°/±>Y°EX°/±>Y³+°±ô01#!#!24&#!!26¢ìÕþÙ‰®×쉪ŽþÙ'Žª¤½¸ýÑ»º‡yþy+sC³ +°°Ð°° а°ܰEX°/±>Y°EX°/±>Y°± ô°± ô01!!55!#!!3sü¸Hþ¸HyýÕEþ»+yuuþGDýéýèE¤k°/° а /° ܲ@ ]°ܲ@]± ô° ±ô° ± ô°°ܰEX°/±>Y°EX°/±>Y°±ô°±ô°а а° а Ð01#!3!53!#!¤uþèÒýÑÓþèu¤`DûÑuu/þ¼¹ÿì¸g³+²9°EX° /± >Y°EX°/±>Y°EX°/±>Y°±ô°±ô°аа° а аав 9°аÐ01#3!53#5!##5!¸jþÉÒýÑÓþÉjplãálp¤ýþBuu¾quuþìuÿì¼"+‘³# +³+³ +°°а°дÚê]@ )9IYiy‰™©¹É ]°°Ð@###F#V#f#v#†#–#¦#¶#Æ# ]´Õ#å#]°°&аEX°/±>Y°EX°/±>Y01#5.54>7534.'66%¼=o›^Š^™o;;o™^Š^›o=‰'GkC‡•ýB‘‡CiG%b¨P ¬® P}¨bc¨O ¢¢ RªcF}b@ ý%ÇÇÛ B`}ÿéºz°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô°в9°аа а а± ô°ав9°аааа °аÐ01!!533!53#5!##5!#3ºþŽXÍÏXþþêmumËÅiuqþðu¬þTuuuuþ^¢uuýíýä1sU³ +³+³+°°а°аEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y01#&533>53s¨´Š¶¦‰-RCŠAR/Š'Íÿþ¼DÍðþ5ufN_ü¡Nfu5òÿÿºéŽ"‰Œuÿÿÿ츎#Œu”ÿÿÿéª/"Ÿwÿÿÿé/&£wÿÿ þ‹s/&¥wÿÿºÿéé/&§wÿÿÿé¤/&²xÿ骺)̳ +@&6FVfv†–¦¶Æ ]´Õå]°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°%/±%>Y±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]²%9²9²"%90132>7.#"4>323##".‹;aC<\G44G\Y°EX°/±>Y°EX°/±>Y³$!+°±ô@'7GWgw‡—§·Ç ]´Öæ]²9²!$9° ±,ô´Ù,é,]@,,(,8,H,X,h,x,ˆ,˜,¨,¸,È, ]01"&'#4>32'2654&##532654.#"îc‘@‰BpœZ`˜h8um…”Bt¢b¢ª¦ZZ‘‡@fJ5gQ2<“01þATi9;^}@h %)¦{R‰d:utu“uŽl%PA+ DfFý-A8þ‹{¤>³+² 9°EX°/±>Y°EX° /± >Y°EX°/±>Y² 901#367{9VwMŠþsž=w‹¤wþüñkþ´JÏü´Ç¬Ù'ÿéy/'7³. +³ +³ (+@&6FVfv†–¦¶Æ ]´Õå]²9´Ú(ê(]@ (()(9(I(Y(i(y(‰(™(©(¹(É( ]@..&.6.F.V.f.v.†.–.¦.¶.Æ. ]´Õ.å.]°°9ܰEX°/±>Y°EX° /± >Y² 9°±%ô´Ù%é%]@%%(%8%H%X%h%x%ˆ% ]@ ˜%¨%¸%È%]° ±3ô´33]@'373G3W3g3w3‡3—3§3·3Ç3 ]´Ö3æ3]01#".5467.54>32&&#"4&'32>NR{‘{RCX¢”……¢CoNNnFD)LRb fa›s>>s›avî\37B)+TC)!)b!;ýr½GG½u9nY58Xnÿéº0¿³ ++°+°Ð°/@&6FVfv†–¦¶Æ ]´Õå]°°а/°EX°/±>Y°EX°&/±&>Y³+°± ô´Ù é ]@  ( 8 H X h x ˆ ˜ ¨ ¸ È ]°&±ô@'7GWgw‡—§·Ç ]´Öæ]².9014>32&&#"33#"3267#".5467&& Bw¡a™É=f)švŽ£@bBÎÎDdD#¶”{¤/`?Ï dª}Hq\c^¤?iG'ddFFTXJ3)t+7PZLHBdc'JkCHwwþu¤(‚°)/°*/°"ܱ ô´Úê]@ )9IYiy‰™©¹É ]°)° а /² "9± ô@&6FVfv†–¦¶Æ ]´Õå]°%/°EX°/±>Y±ô014.'.54>7!5!'66!;X7T½žfd®èƒþ;ê¸þÙÍmHs“JG„b;tuY°EX°/±>Y°EX°/±>Y°EX°/±>Y²9°± ô´Ù é ]@  ( 8 H X h x ˆ ˜ ¨ ¸ È ]°Ð016632#4&#"#4&#"'6632/ƒhš ŠVZhŠ-#"!9GmNf¸ÀüI·t ’ýìì+/k X)ÿé/)¤°*/°+/°Ü°*° а /°±ô° ±ô°$а°%аEX°/±>Y°EX°/±>Y³%+°±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01#".54>322>7!"!.1g£qsŸi//iŸss¡i/þTNlDýÀ!DjNNjD!@!Dj‹•ø²cc²ø•”ø´dd²úý?N‰½ll½‰N\Iƒ³hh³ƒIºÿéé¤]³ +°EX° /± >Y°EX°/±>Y° ± ô°±ô@'7GWgw‡—§·Ç ]´Öæ]² 901%#".5#5!327é9+-R>%Ó]j1 :V7\yý+q1¢¤ J³ +°°аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²901!##33¢Ãþƒ¨‰‰Äþ-¢šþø¤þ öþTÿáÁ/]°EX°/±>Y°EX°/±>Y°EX°/±>Y²9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01!#'&&#"'632þ¶þ°¢ 93DZ/``VŽ'ø/üѾŽ-Av#=cûq1þ‹˜¤!¬°"/°#/°ܱô²9°"°а/± ô° аEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y² 9² 9°±ô@'7GWgw‡—§·Ç ]´Öæ]°в 901%#"&'#332>53327#"&u‰b9þ+ý›jw)NsGý-/m Y{¤ 1°EX°/±>Y°EX°/±>Y°EX°/±>Y²901#367{#²ž‹þƒ¤/w¤ðþ!Õ¤üáÅÙþu‹/:ó 8+³' .+²8'9@&6FVfv†–¦¶Æ ]´Õå]²89°/±ô´Ú.ê.]@ ..).9.I.Y.i.y.‰.™.©.¹.É. ]°'°<ܰ*/°EX°/±>Y³"3+³+²9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01&&54>32&&#"33#"'6654.'.546osDq“PN¤?+FzFu™‹ööL}X/Fs“LG„b;tuY°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>324.#"32>¼E´om´EE´mo´E‰/\ƒRRƒZ//ZƒRRƒ\/Ïm²HH²mj·II·jP‡f::f‡PP‡b88b‡1þ‹¤º&ΰ'/°(/°Ü°'° а /± ô°± ô´Úê]@ )9IYiy‰™©¹É ]°°аEX°/±>Y°EX°/±>Y°EX°/±>Y±"ô@""'"7"G"W"g"w"‡"—"§"·"Ç" ]´Ö"æ"]²"9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]01#"'#4>324.#"32>¤By°n–{‰1iŸoiªx@‰)RyN=kL+<‡NT}T+Ñm²HaþAF\°‰TGƒµjP‡d:)ZŽdúA8:b‡þu‹º+¯°,/°-/°,°Ð°/°-°ܰа/°± ô@&6FVfv†–¦¶Æ ]´Õå]°±" ô´Ú"ê"]@ "")"9"I"Y"i"y"‰"™"©"¹"É" ]°/°EX°/±>Y± ô´Ù é ]@  ( 8 H X h x ˆ ˜ ¨ ¸ È ]014>32&&#"'6654.'.H´mÍ;`+¢hRƒ[1Hs“JG„b;tuY°EX° /± >Y°±ô°а ±ô@'7GWgw‡—§·Ç ]´Öæ]°°)Ð01#".54>3!!"32>54.'‰+TD)By¦df¦wAIƒµj#ýÛª¶+RrJJuT+#BZ9/Nix>f¦yBH²mj®{BuÀ N‡b:3X}JY°EX°/±>Y°±ô°аа±ô@'7GWgw‡—§·Ç ]´Öæ]01!5!!3267#".5þs¤þsj#(R-R>%/uuý qk:V71ÿ餶•°/°/°°а/± ô°°ܱ ô´Úê]@ )9IYiy‰™©¹É ]°EX°/±>Y°EX°/±>Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]01".5332>54&'7Ó^šn<‰-Lg9\}L#%+…)+5q°0``>ýÂ=bD#N{“Dh½\5`Û{^¿™aÿìþ‹¾º!-·³ +³  +³ %+@&6FVfv†–¦¶Æ ]´Õå]° °а °"дÚ%ê%]@ %%)%9%I%Y%i%y%‰%™%©%¹%É% ]°°/ܰEX°/±>Y°EX° /± >Y°±*ô´Ù*é*]@**(*8*H*X*h*x*ˆ*˜*¨*¸*È* ]012#.54674>6654.#"TR…^5=o›`Š^™o;d\RBG‘‡-L‡—)?R'#ºGµlbª}P þc P¨bƒåF^5¯lɃ+N: üªÉP‡d:-2ÿøþu¤¼ <°/°EX°/±>Y°EX°/±>Y²9²9²9² 901 #73 þÉþǤþyJ-¢þ^þu+ýëƒiEýÁ'ýjý®1þ‹s^K³ +³+³+°°а°а/°EX° /± >Y°EX°/±>Y°EX°/±>Y01#&533>53s¨´Š¶¦‰-RCŠAR/ŠÑÍÿþcÍÑþ-5ufNúüNfu5Óÿòÿé¶¶4Ö³ +³+³- "+²9@&6FVfv†–¦¶Æ ]´Õå]´Ú"ê"]@ "")"9"I"Y"i"y"‰"™"©"¹"É" ]°-°6ܰEX° /± >Y°EX°(/±(>Y°EX°/±>Y°EX°2/±2>Y² 9°±ô@'7GWgw‡—§·Ç ]´Öæ]°Ð01%#".54>73265332654.'7#"&ÓrPHd@ ‡9F=VŠX=F; ‡! @dJPs¢RgDw¨d>‹/5-u}3¬¦¤”Qþ¯”¤¦¬3}u-5/‹>d¨wDgÿÿºÿéé&§Œÿÿ1ÿé¤&²Œÿÿÿìÿé¼/"­wÿÿ1ÿé¤/&²wÿÿÿòÿé¶/&¶wÿÿ1sŽ&ÏŒuÿwÿés#è°$/°%/°$°!а!/± ô°а%° ܲ! 9²! 9±ô°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°±ô²9²9°±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°"а#Ð01!#3 #"'73254&#"##‰þ»cþX%>R-T&#jlyL{V-‰ºuþþ…þ7V:m qp}ŠFu—Rþ^¤ÿÿ1¤É&Í‹uÿìÿé¬/.·°//°0/°ܰа/°/° а /°± ô°а ±$ô°!а°.а./°EX°/±>Y°EX°/±>Y³"#+²9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±,ô@,,',7,G,W,g,w,‡,—,§,·,Ç, ]´Ö,æ,]01#".54>3253#4.#"!!32¬3tt°[‘pO36w¿‰y«*uu5ZzE`†U+Fýº#&7GW5ô`V§db4[~–§Xƒô¼qVX˜þTFzZ3Tа[uX«G'B0'ÿéƒ/?Ó³ +³* )+°)±ô° °а)°,а ±6 ô°*°AܰEX°)/±)>Y°EX°+/±+>Y°EX°%/±%>Y°EX° /± >Y°EX°/±>Y²%9±ô@'7GWgw‡—§·Ç ]´Öæ]²(%9°%±1ô´Ù1é1]@11(181H1X1h1x1ˆ1˜1¨1¸1È1 ]01#"&'#332>54.'.54>3253#4.#"ƒDr”Pn¸6tt>`}A:bJ+7]tY°EX°/±>Y±ô°±ô°а а° а Ð01!!53#5!#3éýÑÓÓ/ÒÒu/uuûÑÿÿºéŒ&*ŒsÿþÿésL³+°EX°/±>Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]01#"&'732>53sÓÙ®ì/w+ª}\s=Šòøþï·¶-¢ƒJsH'ÿuÿéœ$º³ #+³ +³+´Úê]@ )9IYiy‰™©¹É ]°° а°&ܰEX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³ +° ±ô² 9°±!ô@!!'!7!G!W!g!w!‡!—!§!·!Ç! ]´Ö!æ!]014&##32632####"&'7325l\LL\lþìJ¡³³£Ñ» :L+(6 ^q…þ%ýм¼»¶¤ü+7V: s qJ1œŸ³ +³ +³+´Úê]@ )9IYiy‰™©¹É ]°°а° а °а°ܰEX° /± >Y°EX°/±>Y°EX° /± >Y°EX°/±>Y³+°±ô°° а°Ð014&##32633332###l\LL\lý‰»‰J¡³³£Ñ»q…þôýÐ0ýм¼»¶uý‹ÿws¡°/°/°°а/± ô°а° ܲ 9± ô°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°±ô² 9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°аÐ01!#3 #4&#"##‰þ»cþXŠlyL{V-‰ºuþþ…ýÁ?}ŠFu—Rþ^¤ÿÿ1žÉ&Ô‹uÿÿÿáÿéÁ{&ÝÙu1þÁs S³ +³+³ +°/°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y±ô° Ð01!!#!3!3sþ¤Šþ¤‰/ŠþÁ?û\¤ÿÅã 0°EX°/±>Y°EX°/±>Y°EX°/±>Y³+01!#!#3ã“{ýüy“²º}ÛÛuþ‹üÕ¡ý_1¢s°/°/° ܱ ô´Úê]@ )9IYiy‰™©¹É ]°°а/± ô° аEX°/±>Y°EX°/±>Y³ +°±ô°±ô014&#!!26!2#!!!ªŽþÙ'Žªý¡'Õìì×þRBýGq…þõ¼¼»¶u1¢$‡³! +³ +° ± ô± ô² 9´Úê]@ )9IYiy‰™©¹É ]°!°а °&ܰEX°/±>Y°EX°/±>Y³+² 9°±ô°±!ô01#!!24.#!!2>4&#!!26¢òßþ`‰Rž}NËø¶:Zl2ÿ8lV8-¯™þ陯u»ºJƒjËJLaEX/þE1Výô‡{ýþ1¤*³ +°EX°/±>Y°EX°/±>Y°±ô01!!#1sý‰uû\þÁ¤R³ +³ +³ +³ +° °ܰ /°/°EX°/±>Y°EX° /± >Y±ô°аа±ô015>5!3#!#!#9X<ý»{ýR{u1P9¼ëu1q¼#áBû\þL?þÁ°þòÑš9/1s =³ +° °аEX°/±>Y°EX°/±>Y³+°±ô°± ô01!!!!!!!sü¾BýGýþ¹uþ-uþÿÁã³+°°а° аEX°/±>Y°EX° /± >Y°EX° /± >Y°EX°/±>Y°EX°/±>Y°EX°/±>Y²9²9² 9²901!'#333#7þú?þÁ•7Š7•þÁ?þú7dý–á8ý¼Dý¼DýÈýjdýúÿé˜/>ä³- ++³7 +°7± ô±ô°-° а /´Úê]@ )9IYiy‰™©¹É ]°-°)а)/²:+9°7°@ܰEX°2/±2>Y°EX°/±>Y³+°±ô@'7GWgw‡—§·Ç ]´Öæ]°2±#ô´Ù#é#]@##(#8#H#X#h#x#ˆ#˜#¨#¸#È# ]²-29²:901#".'732>54.#52>54'&#"#3>32˜Fu™T^¤}N… ]\‹;hN-2aŽ\C€d>IItAy*(6}uJX`0T’k>„|EiG$hVd83f–c–ML(Fb:Pe9u6YCnBC2)&pLœ˜1B)1\†Up’ Y°EX°/±>Y°EX°/±>Y°EX°/±>Y²9²90133##1‰øÁŠýòªûãúçPû°ÿÿ1sy&ÒÙs1ž J³ +°°аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²901!##33ž¨þNЉ‰/µþšþý…{ýÆÿçÿés‹°/°/°ܱô°°а/±ô°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX° /± >Y°±ô² 9° ±ô@'7GWgw‡—§·Ç ]´Öæ]01#!#"'7325sŠþ[%>R-T'#júç¤ü+7V:m qJ1s m° /°/°Ü±ô° °а/± ô² 9°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²9²9² 901!###33sŠçb扲îð²?ý_¡ûÁýVª1s `° /° /°Ü±ô° °а/± ô°а° аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y³ +01!#!#3!3sŠýщ‰/Š\ý¤ý¸HÿßÿéÇ/'â°(/°)/°Ü°(° а /°±ô´Úê]@ )9IYiy‰™©¹É ]° ± ô@&6FVfv†–¦ ]´¶Æ]´Õå]°EX°/±>Y°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>324.#"32>Ç6v¿‰‰¿w55y¿‡‡¿v8Š1\‡Vk‹T!!T‹kjŒT ‹ƒôºqqºôƒƒô¼qq¼ôƒÏ’Md¢ÆcbÇŸeeŸÇ1sK°/° /°Ü±ô°°а/± ô°EX°/±>Y°EX°/±>Y°EX°/±>Y°±ô01!#!#!sŠýщB¤û\1¢ r°/°/°Ü°°а/± ô°± ô´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°°аEX°/±>Y°EX°/±>Y³+°±ô01#!#!24&#!!26¢ìÕþÙ‰®×쉪ŽþÙ'Žª¤½¸ýÑ»º‡yþyÿìÿì¬/%ã°&/°'/°ܰа/°&°а/°± ô°а± ô@&6FVfv†–¦¶Æ ]´Õå]°°%а%/°EX°/±>Y°EX° /± >Y°EX°/±>Y² 9° ±ô´Ùé]¶(]@8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>3253#4.#"32¬3è°‰¾y55y¾‰y¬)uu5Z{Dj‹T##T‹jô`V¨Ânºôƒƒô¼qVX˜þTE{Z3d¢ÆcbÇe%¤k°/° а /° ܲ@ ]°ܲ@]± ô° ±ô° ± ô°°ܰEX°/±>Y°EX°/±>Y°±ô°±ô°а а° а Ð01#!3!53!#!¤uþèÒýÑÓþèu¤`DûÑuu/þ¼¹ÿáÿéÁZ°EX°/±>Y°EX°/±>Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]²901#"'7326773Áþ'ŽV``/ZD39þ`¢PJûpb>#wB-¿üÐ0ÿì¼"+‘³# +³+³ +°°а°дÚê]@ )9IYiy‰™©¹É ]°°Ð@###F#V#f#v#†#–#¦#¶#Æ# ]´Õ#å#]°°&аEX°/±>Y°EX°/±>Y01#5.54>7534.'66%¼=o›^Š^™o;;o™^Š^›o=‰'GkC‡•ýB‘‡CiG%b¨P ¬® P}¨bc¨O ¢¢ RªcF}b@ ý%ÇÇÛ B`}ÿéºz°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô°в9°аа а а± ô°ав9°аааа °аÐ01!!533!53#5!##5!#3ºþŽXÍÏXþþêmumËÅiuqþðu¬þTuuuuþ^¢uuýíýä1þÁ O³ +³ +³ +°° ܰ/°EX°/±>Y°EX° /± >Y°EX°/±>Y±ô°аÐ01%#!3!3{ü‰/ŠuþL?û\¤û\1s^°/°/°°Ð°/± ô°° ܱ ô°в 9°EX°/±>Y°EX° /± >Y°EX° /± >Y³+² 901332>53## 1‰myLzV-ŠŠbþþ¨ýÀ}‰Ft˜R¢úç^ÿ{¤ |° /°а/°Ü²ï]²@]±ô°°ܲï]²@]± ô°± ô°° ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô° а Ð013!3!3!Љü\‰û\¤úçû\þÁo³ +³+³ +° ± ô° °а °ܰ /°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y±ô°аа а Ð0113!3!33#‰Š‰{{û\¤û\¤û\þL?¢ v°/°/°° а /± ô°а°ܱ ô´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°EX°/±>Y°EX° /± >Y³+°± ô° ±ô01!32#!#4&##326u²´ÇǶþÇìo´´oýм¼»¶¤üÍ…þ¤ ‡³ +³ +³ +´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°°а°ܰEX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y³+° ±ô01332#!4&##3263#‰‡¢²²¤þòÛl]‰‰]l@‰‰ýм¼»¶q…þ%úç1¢l°/°/° ܱ ô´Úê]@ )9IYiy‰™©¹É ]°°а/± ô° аEX°/±>Y°EX°/±>Y³ +°±ô014&#!!26!2#!3ªŽþÙ'Žªý¡'Õìì×þR‰q…þõ¼¼»¶ÿøÿé¸/.¾°//°0/°/°а/± ô°Ð°/°0°#ܱ ô° а°а°.а./².#9°EX°/±>Y°EX°*/±*>Y³  +°*±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]²*90132>7667!5!.#"#36632#"'&'o`ô5WG7&#ýºF+U†`EzZ5uu*«y‰¿w63Op‘[°tt3…þÙ0B'G«Xu[°ŠT3ZzF¬˜XVq¼ôƒX§–~[4bd§1ÿé¨/"Þ³ +³ +³ +° °а° дÚê]@ )9IYiy‰™©¹É ]°°$ܰEX°/±>Y°EX°/±>Y°EX° /± >Y°EX° /± >Y³ +° ±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]0133! ! ##%2>54.#"1‰¬ !þßþì ¬‰V/< Y°EX° /± >Y°EX°/±>Y³+°° а /°±ô01.5463!###3!!"}R‹e9ì×®ŠÊþƒ®›¦$þܦ58\ƒRº»úç/ýѤ‡y{ÿþÿésº&7í°8/°9/°8°Ð°/°9°ܱ ô°в9° °,а±5 ô@55&565F5V5f5v5†5–5¦5¶5Æ5 ]´Õ5å5]°EX°/±>Y°EX°/±>Y°EX°$/±$>Y³0+°±ô´Ùé]@(8HXhxˆ˜¨¸È ]²$9°$±'ô@''''7'G'W'g'w'‡'—'§'·'Ç' ]´Ö'æ']°0°-а-/01'4>3254.#"'6632#5#"&2>55&&#"X¹`%;56 ;V^!h°L>TÑ}L“uFŠ$[dd-¹¾wV‰`5C{-J‰f>süXwECDX38/g3A'Q„\ýžœ-D+Ž3LV#X -H5;cÿé¤/ : °;/°Y°EX°/±>Y°EX°8/±8>Y³. +°8±ô@'7GWgw‡—§·Ç ]´Öæ]°±$ô´Ù$é$]@$$($8$H$X$h$x$ˆ$˜$¨$¸$È$ ]±ô±ô²)890132>54&#"'4>323267#".#">32#"–¬—FwV/¨š¦–?sž`->1-)9)G+t3':13#=kP-HXd1b¨{FF{¨bë¿1]O ¿¿/–ø²d!R)7C´q-F1;u®ub¬}HH1¢¤&©³# +³ +´Úê]@ )9IYiy‰™©¹É ]² 9°/´Úê]@ )9IYiy‰™©¹É ]± ô²9°#°аEX°/±>Y°EX°/±>Y³!+²!9°±ô°±#ô01#!!24.#!!2>4&#!!26¢ÇºþÑD…hBFf}\¶.CR'þ¸H)TD)-†tþ›et† ‡ƒ¤5^LHbqJ+5 þô 3þ‘RLþÇN1¤¤*³ +°EX°/±>Y°EX°/±>Y°±ô01!!#1sý‰¤uüÑþÁ¤¤R³ +³ +³ +³ +° °ܰ /°/°EX°/±>Y°EX° /± >Y±ô°аа±ô015>55!3#!#!#/V@'ý»{ýR{u!5D!¦ëu Xœß‘ÁüÑþL?þÁ"tË sºÿüÿ鮺"{°EX°/±>Y°EX° /± >Y³"+° ±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]013267#".54>32'&&#"‰º•i¤)`FÂŽl´ƒHA{°mw²w9‘°BpV:¢”°V@BbgH²mj³ƒIPÄwu™–+PqCÿ𴤳+°° а°аEX°/±>Y°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y² 9² 9² 9² 901333##'#þ♊™þâ“Ù1Š1Ù“ ˜þw‰þw‰þhýô¢Hþ¦ZHþ^ÿþÿéº.ų +°°Ð°/´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]° °а/°°0ܰEX°*/±*>Y°EX° /± >Y³+²9° ±ô@'7GWgw‡—§·Ç ]´Öæ]°*±#ô´Ù#é#]@##(#8#H#X#h#x#ˆ#˜#¨#¸#È# ]01#"&'732654.##532654&#"'6632s_b\qH}ªd Ï?`/¤{“·#DdDœœƒ£Žvš)f=É™a¡wB¤DwwHCkJ'cdBHLZP7+t]3JXTFFdd'Gi1s¤ b° /° /° °Ð°/± ô° °ܱô°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y²9²90133##1‰øÁŠýòª¤ýðü\üîÿÿ1s&òÙ1¢¤ J³ +°°аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²901!##33¢Ãþƒ¨‰‰Äþ-¢šþø¤þ öþTÿçÿés¤‹°/°/°ܱô°°а/±ô°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX° /± >Y°±ô² 9° ±ô@'7GWgw‡—§·Ç ]´Öæ]01#!#"'7325sŠþ[%>R-T'#j¤ü\/ý 7V:m qÕ1s¤ m° /°/°Ü±ô° °а/± ô² 9°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y²9²9² 901!###33sŠåb色ðî²ãþãý¤þæ1s¤ `° /° /°Ü±ô° °а/± ô°а° аEX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y³ +01!#!#3!3sŠýщ‰/Š¢þ^¤þsÿìÿ鼺'â°(/°)/°Ü°(° а /°± ô´Úê]@ )9IYiy‰™©¹É ]° ± ô@&6FVfv†–¦ ]´¶Æ]´Õå]°EX°/±>Y°EX°/±>Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±#ô@##'#7#G#W#g#w#‡#—#§#·#Ç# ]´Ö#æ#]01#".54>324.#"32>¼E´om´EE´mo´E‰/\ƒRRƒZ//ZƒRRƒ\/Ïm²HH²mj·II·jP‡f::f‡PP‡b88b‡1s¤K°/° /°Ü±ô°°а/± ô°EX°/±>Y°EX°/±>Y°EX°/±>Y°±ô01!#!#!sŠýщB/üѤ1þ‹¤º$ì°%/°&/°Ü°%° а /± ô° в 9°± ô´Úê]@ )9IYiy‰™©¹É ]° °аEX° /± >Y°EX°/±>Y°EX° /± >Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]² 9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]² 901#"&'#36324.#"32>¤D{®lJ‹<‰‰’l®{D‰+V}RN‡<<‡NR}V+Ñm²H65þ7VlGƒµjN‰d::Aþ A8:d‡ÿéº(×°)/°*/°ܰа/°)°а/°± ô°а± ô@  & 6 F V f v † – ¦ ¶ Æ ]´Õ å ]°EX°/±>Y°EX° /± >Y°EX°/±>Y² 9° ±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±%ô@%%'%7%G%W%g%w%‡%—%§%·%Ç% ]´Ö%æ%]01%#".54>3253#4.#"3267;Ím¶HBz±l+ZP@{{-Nl>T}T+1]ƒRh¢+°\kH²mjµI)9'‡þ‹>fJ):d‡PP‡b:PD¤¤k°/° а /° ܲ@ ]°ܲ@]± ô° ±ô° ± ô°°ܰEX°/±>Y°EX°/±>Y°±ô°±ô°а а° а Ð01#!3!53!#!¤uþèÒýÑÓþèu¤ìCýFuuºþ½¸ÿáþuÁ¤#°EX°/±>Y°EX°/±>Y³ +01#"'7326773Áþ'ŽV``/ZD39þ`¢PJ¤ûpb=#vB-¿üÑ/ÿãþ‹Á $/2°0/°а/°Ü²€]²Ð]²0]°±ô°° а°а±/ô°а°*ܲ€*]²Ð*]²0*]²*9±ô°/°"а°1ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°#/±#>Y°EX° /± >Y°EX° /± >Y°±ô´Ùé]@(8HXhxˆ˜¨¸È ]° ±ô@'7GWgw‡—§·Ç ]´Öæ]² 9²9²9²" 9°'а°-Ð01&#"327#"&546323632#"'#32654&#"9TJIIJT95XŽŽX5Š5XŽŽX5ŠŠ9TJIIJT9ç_¬Éɪ^}VüìëþVµþKVþëìüVþL1^ªÉɬ_ÿ캤w°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô²9°аа а а± ô°ав9°аааа °аÐ01!!533!53#5!#7#5!#3ºþR¸¶Kþ„‘ö‡Vª¬^ƒƒöyþòyy`P{{þþ{{þ°þ 1þÁ¤ O³ +³ +³ +°° ܰ/°EX°/±>Y°EX° /± >Y°EX°/±>Y±ô°аÐ01%#!3!3{ü‰/ŠyþH?¤üÑ/üÕ1s¤^°/°/°°Ð°/± ô°° ܱ ô°в 9°EX°/±>Y°EX° /± >Y°EX° /± >Y³+² 901332>553## 1‰myLzV-ŠŠbþþ¨¤þ×}‰Eu˜R‹ü\ÿ{¤¤ |° /°а/°Ü²ï]²@]±ô°°ܲï]²@]± ô°± ô°° ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y±ô° а Ð013!3!3!Љü\‰¤üÑ/ü\¤üÑþÁ¤u³ +³+³ +° ± ô° °а °ܰ /°EX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y±ô°аа а /° а /0113!3!33#‰Š‰{{¤üÑ/üÑ/üÕþH?¢¤ v°/°/°° а /± ô°а°ܱ ô´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°EX°/±>Y°EX° /± >Y³+°± ô° ±ô01!32#!#4&##326uÝ¢®® þ˜ìi\ßß\i¤þ‹…‘’‡/ýêMTþ»V¤¤‡³ +³ +³ +°°дÚê]@ )9IYiy‰™©¹É ]°°ܰEX°/±>Y°EX° /± >Y°EX°/±>Y°EX° /± >Y³+° ±ô013#32#!34&##326‰‰ýn š¡¡˜þÕ‰R\T¢¢T\¤ü\/…‘’‡¤ýuMTþ»V1¢¤ o°/°/°°а/± ô°Ð°°ܱ ô´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]°EX° /± >Y°EX°/±>Y³+°±ô01!2#!34&#!!26ºeºÉǺþ‰_†tþ›et†/…‘’‡¤ýuMTþ»V#ÿ餺 {°EX° /± >Y°EX°/±>Y³+° ±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±ô@'7GWgw‡—§·Ç ]´Öæ]01!&&#"'6632#"&'73267!ý´”h¢+`;Ím¶HH¶mÍ;`+¢hš¸ýþ…ªRDB\lGµlm²Hk\BDP¶Ž1ÿ餺޳ +³ +³ +° °а° дÚê]@ )9IYiy‰™©¹É ]°°ܰEX°/±>Y°EX°/±>Y°EX° /± >Y°EX° /± >Y³ +° ±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]0133! ! ##%2#"1‰½þéþø½‰\ŽŽ¤þh®þþ¯þhXywþ‰þ‡ÿôs¤ ‘°/°/°°а/°°ܱ ô°° а /°± ô@&6FVfv†–¦¶Æ ]´Õå]° °аEX°/±>Y°EX°/±>Y°EX° /± >Y³+°° а±ô01&&5463!###3!!"Z¦²ÇºðŠßþ¬Â—…udþœu…u…‰’‡ü\uþ‹‹NTFVÿÿÿüÿé®&ïŒÿþus'¯°(/°)/°(°а/± ô°а)° ܲ 9² 9±ô°°#а°%аEX°/±>Y°EX° /± >Y°EX°$/±$>Y³+³+°°Ð²$9° ±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°&Ð013533#3 #"'73254&#"##q¢‰»»cþX%>R-T&#jlyL{V-‰¢^»»uþÑþ…ý7V:m qå}ŠFu—Rþ^éÿÿ1¤T&í‹ÿéº {°EX°/±>Y°EX° /± >Y³+° ±ô@'7GWgw‡—§·Ç ]´Öæ]°±ô´Ùé]@(8HXhxˆ˜¨¸È ]013267#".54>32&&#"!‹¸šh¢+`;Ím¶HH¶mÍ;`+¢h”¶¢Ž¶PDB\kH²mlµGl\BDRª…uÿöÿ鋺2Ù°3/°4/°Ü± ô´Úê]@ )9IYiy‰™©¹É ]°3°а/±) ô@))&)6)F)V)f)v)†)–)¦) ]´¶)Æ)]´Õ)å)]°EX°/±>Y°EX°/±>Y± ô@  ' 7 G W g w ‡ — § · Ç ]´Ö æ ]°±$ô´Ù$é$]@$$($8$H$X$h$x$ˆ$˜$¨$¸$È$ ]01#"&'73 54.'.54>32&&#"‹RŸLü\=gÈk53Vo=NšMGw V{ÂN7P¤`+iZ=3Vo=L›NRl@JY°EX° /± >Y°EX°/±>Y±ô° ±ô°° а Ð01#53!53#5!3/ºººýÑÓÓ]Ò^»úçuºuüÑÿÿºé&ÕŒþué>³+²9°/± ô°EX°/±>Y°EX°/±>Y³ +°±ô01#53"'732>5#5!麺þsöbi$uVD\5Ó\½^»ù\ÊHLR'HfB/uü\´×ÿuÿé°¤$•³ +³! +³ +°!°дÚê]@ )9IYiy‰™©¹É ]°°&ܰEX°/±>Y°EX°/±>Y°EX° /± >Y°EX°/±>Y³+°±ô°±!ô² !901#"&'7325!32#!4&##326º :L+(6 ^Íw™¢¢—þþ²\TyyT\/ý 7V: s qÕþ‹…‘’‡/ýêMTþ»V1°¤Ÿ³ +³ +³ +°°а°дÚê]@ )9IYiy‰™©¹É ]°°а °ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³+°°а°а±ô01333332#!#4&##3261‰»‰w™¢¢—þþ»m\TyyT\¤þ‹uþ‹…‘’‡ºþFMTþ»Vÿs¯°/°/°°а/± ô°а° ܲ 9±ô°°а°аEX°/±>Y°EX° /± >Y°EX° /± >Y°EX°/±>Y³+°°Ð² 9° ±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°Ð013533#3 #4&#"##q¢‰»»cþXŠlyL{V-‰¢^»»uþÑþ…ýÁ?}ŠFu—Rþ^éÿÿ1¢T&ô‹ÿÿÿáþuÁ&ýÙ1þÁs¤ S³ +³+³ +°/°EX°/±>Y°EX° /± >Y°EX°/±>Y°EX°/±>Y±ô° Ð01!!#!3!3sþ¤Šþ¤‰/ŠþÁ?¤üÑ/1¤ÓA°/° /°ܱ ô°°а/± ô°/°EX°/±>Y°EX°/±>Y°±ô013!#!/uý‰þÓþÑû\1¤^A°/° /°ܱ ô°°а/± ô°/°EX°/±>Y°EX°/±>Y°±ô013!#!/uý‰þ^þÑüѤÿÿ1¢Ž&#Úuÿÿ1ÿ餎&CÚuÿÿ1ÏŽ&%ÚuÿÿÿþÿésŽ&EÚuÿÿ1sŽ&'Úuÿÿº¤Ž&GÚuÿÿ1sŽ&.Úuÿÿ¤&NÚÿÿ1¢Ž&1Úuÿÿ1þ‹¤&QÚÿÿÿ郎&4Úuÿÿÿöÿé‹&TÚÿÿ¤Ž&5Úuÿÿÿ鮎&UÚuÿÿÿÁãÍ&8AyÿÿÿåÃX&XAÿÿÿÁãÉ&8‹uÿÿÿåÃT&X‹ÿÿÿÁãŽ&8ŒuÿÿÿåÃ&XŒÿÿÿì¸Í&:AyÿÿÿáþuÁX&ZA¤¤ ³+01!5!¤ü\¤¤uF ³ +³ +³ +³ +´Ú ê ]@  ) 9 I Y i y ‰ ™ © ¹ É ]´Úê]@ )9IYiy‰™©¹É ]°°а/°°а°ܰEX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y°EX°/±>Y³ +²9² 9°±ô´Ùé]@(8HXhxˆ˜¨¸È ]°±ô°Ð01!##33254#" ! !!þªË‰Á´‰JttywÿþþþþüüT¬ü²À¿¿Ào//þÑþÑçu¤¤ ³+01!5!¤ü\¤¤uÿÓÑP °/°EX°/±>Y°EX°/±>Y01%'ÑPþRþNNPN°þPNDF/:EIT_"³Y +³? F+³I +³' 0+°'°Ð°F°а/°I°а°а/°I°аF° а?°+а+/´Ú0ê0]@ 00)090I0Y0i0y0‰0™0©0¹0É0 ]°?°6а6/°0°;а°JÐ@YY&Y6YFYVYfYvY†Y–Y¦Y¶YÆY ]´ÕYåY]°Y°PаP/°°Uа'°aܳC+³$3+³F+³T+°° аF°а$°аT°а°*аF°,аT°7а°>а°Gа3°Mа°UаC°\Ð01#"&55##"&546335#"&54632354632##324&#"3264&##326%5#4&#"33#"3265oNNjènNNnnNb`NnnNNlælNNooN``No[9))7`)99)^5))9þäæZ7))99)`b)99))9NnnN``NnnNNlælNNooN``NooNNlæl )99)`7ýÏ)7`)99ãææ )99))7þf7))99)ÿÓÑÇ /°EX° /± >Y°EX° /± >Y³+°°а°Ð01!5!!5!'¢þÕ+ý‹þÕ+¤PþRþNNVqqqý‰N°þPN%\dz+³ +°°а °Ð01%#"'&##53233!5!\¢×{ªf´¤¤Ù{)V+d´¢þp%‘‘q”CˆC”ÅqJV 1³ +°EX°/±>Y°EX°/±>Y°±ô°±ô01!!#3''7'77VýsþïýäääP}}N}}N}}P}‹ýuýrûÅŸM~~M}}P}}P}\/ F° /° /°ܰ °а/± ô°± ô°EX°/±>Y³ +°°а °а±ô01%!!5#5!!5!\ÿý¢þmnÁÁÁnÀÀ¼ÿþb¢(š°)/°*/°Ü± ô´Úê]@ )9IYiy‰™©¹É ]°)°$а$/±# ô²($9°EX°%/±%>Y°EX°/±>Y±ô@'7GWgw‡—§·Ç ]´Öæ]²"%9°%±'ô01#".'732>54.'7#!#bI¬cPuVICcyERj=(Li?J{\3þŠPþoœÝÓb¬}J1X}L;hL+=iT?yeGIVu‘`Npã oÿãÿÙT}³ +°/³+³ +°°Ð01#!!2>5!5!TT–Êuþ‹¿Nþ¼DN¿u\ yEþJ%pɘXÀLBEN¾Fx \oH\/@°/° /°Ü°°а/± ô°± ô°EX°/±>Y°ܰ±ô°°аÐ01!!3!53\üìn6p/ÀÀH^Ñ ³+015!^H‰‰þ‹‹³+°/°EX°/±>Y013#ŠŠ‹øþ‹^ѳ+°EX°/±>Y³+01!!#Ñý¹ŠщüCþ‹Ñ³+°EX°/±>Y³+015!#ŠH‰ûº½H^‹³+°/³+013!!ŠGý/‹üF‰H‹³+°/³+015!3ŠH‰ºû½þ‹^‹%³+°°а/°EX°/±>Y³+013!!#ŠGý¹Š‹üF‰üCþ‹‹%³+°°а/°EX°/±>Y³+01#!5!3ŠþsŠþ‹½‰ºþ‹^Ñ"³+°EX°/±>Y³+°°Ð015!!#^ý¹ŠH‰‰üC½H^‹³+°/³+°°Ð015!3!ŠGH‰ºüF‰þ‹^‹ 7³+°°а° а/°EX° /± >Y³+°°а°Ð015!3!!#ŠGý¹ŠH‰ºüF‰üC½^‹³+³+01!5!5^û¢^û¢‹‰‰þŒŠŠÓþ‹Ñ‹@°/° /°°а/± ô° °ܱ ô°/°/°EX°/±>Y°EX°/±>Y01#;#\‰‰ì‰‰þ‹øþ‹^‹ >³+³ +°±ô°а ° ܰEX°/±>Y³ +³+°°Ð01!#!!#^ý¹Šu\ÓŠüþŒt‰ëÓþ‹^Ñ I° /° /°ܱ ô° °а/± ô°° аEX°/±>Y°EX°/±>Y³+³ +01!###!^þs‰ì‰uщüCHý¸ÑuÓþ‹^‹ F° /° /° °а/± ô° ° ܱ ô°EX°/±>Y°EX° /± >Y³+³+01#!!#\‰‹þs‰û‰‰ëŠüþŒþ‹‹ ;³+³  +°± ô°°аEX° /± >Y³+³+°°Ð01535#5!3#ÓÓ\»ŠŠë‰þŒütþ‹ÑÑ I° /° /° °а/± ô°Ð° °ܱ ô°EX°/±>Y°EX°/±>Y³ +³+01!####5\u‰ì‰ÓÑþ‹ý/Hý¸½‰þ‹Ñ‹ B³ +³ +° °а± ô°EX°/±>Y°EX°/±>Y³+³ +01!5!###5Hý¸щì‰Ó‰ûŒütŠ^‹ 4³+³ +°± ô°а ° ܰ/³ +³+°°Ð01!3!#3þ‹ŠGÓÓu‰ý‰éŒÓH^‹ 5° /° /° ܱ ô° °а/± ô°°а/°/³ +³+01!333!Hþ‹‰ì‰HtÏý»EüH‹Ó^‹ 2° /° /° °Ð°/± ô° ° ܱ ô°/°/³+³ +013!3!Ó‰ýê‰þûŒŠu‰ý‰‹ .³+³+°± ô°° а /°/³+°°Ð015#5!3!#5Šþ‹¢é‰üwþ‹ŒHÑ‹ 5° /° /° °а/± ô°а ° ܱ ô°/°/³+³ +0153333!Ó‰ì‰þ‹H‰ºý»Eý1þŒÑ‹ .³+³ +°± ô°° а/°/³ +³+015333!5Ó‰ì‰ý/‰üwëtûŠþ‹^‹ 1³+°°а° а/°EX° /± >Y³+³+013!!#ŠGý¹Š‰ý‰ëŠüþŒÓþ‹^‹ L° /° /° °а/± ô° °ܱ ô°° а/°/°EX°/±>Y°EX° /± >Y³+01#;!!#\‰‰ì‰þs‰þ‹üF‰üCÓþ‹^‹ X°/°/°°а/± ô°°ܱ ô°° а°а/°/°EX°/±>Y°EX° /± >Y³  +³+01#33!!#\‰‰ì‰þs‰þ‹üw‰ý‰ëŠüþŒþ‹‹ 1³+°°а°а/°EX°/±>Y³ +³+015!3#!5ŠŠþs‰üwëütŠþ‹Ñ‹ L° /° /° °а/± ô°°а ° ܱ ô°/°/°EX°/±>Y°EX° /± >Y³+01##53;#\‰ÓӉ쉉þ‹½‰ºøþ‹Ñ‹ T³+³ +°± ô°°а°а° а/° /°EX°/±>Y°EX°/±>Y³ +³+01533##53#Ó‰‰ÓH‰‰‰üwëütŠtøþ‹^‹ (³+°EX°/±>Y³ +³+°°Ð015!!#!5^ý¹ŠÑû¢ŠŠüþþ‰‰þ‹^Ñ L° /° /° °а/± ô° ° ܱ ô°EX°/±>Y°EX° /± >Y³+°°а°Ð01##5!!#\‰Ó^þs‰Ñûº½‰‰üCFþ‹^‹ N³+³ +°± ô°°аEX°/±>Y°EX° /± >Y³+³+°° а° Ð01##5!5!#\‰Ó^û¢^þs‰ütŠt‰‰þŒŠüþŒ^‹ ³+°/³ +³+°°Ð015!3!!5ŠGû¢‰ý‰ëŠŠH^‹ 8° /° /° °а/± ô° ° ܱ ô°/°/³+°°а° Ð0153333!Ó‰ì‰H‰ºû½CüF‰^‹ :³+³ +°± ô°°а/°/³  +³+°°а° Ð0153333!!5Ó‰ì‰û¢‰üw‰ý‰ëŠŠþ‹^‹=³+°° а° а/°EX° /± >Y³ +³+°°а ° Ð015!3!!#!5ŠGý¹Šþs‰ý‰ëŠüþŠþ‹^‹[°/°/°ܱ ô°°а° а /± ô° °а/°/°EX°/±>Y°EX° /± >Y³+°° а° Ð01!#3##53^þs‰‰þ‹‰ÓÓщüCüFºø½‰ºþ‹^‹ x³+³ +°± ô°°а°а° а°а °а/° /°EX°/±>Y°EX°/±>Y³ +³+°° а°а°а °Ð01533##5%3!!#Ó‰‰ÓF‰þq‰‰üwëütŠë‰ý‰ëŠüþŒÿîÿ°EX°/±>Y°EX°/±>Y01 ¶þþåÓþååÿÏVì °/°/01 7Vüüþ¶^¤šý5þ;þqsÿò´ªS°/°/°ܰ°а/± ô°± ô°EX°/±>Y°EX°/±>Y³ +°°а ° а± ô01#!#5 3!´ëþçá`þ þžÙÇkþ¤\kãþbþžþÅ;ÿò´ª °EX°/±>Y°EX°/±>Y01#!#5!´ëþçááþ¤þô\þ¤\kãþ þôÿÙ 0³ +°/³  +³+° ° а °а°а°Ð01%!!#5!!5!#53þ¾Oþ¼DO¾y»+ý_þs¹ººåÀLBEN¾ÀmmmýdoH g³ +³ +³ +³ +°°а°аEX°/±>Y°EX°/±>Y³+³ +°±ô°± ô°°а°Ð01!!!#'!!##5#53533ü47•ø%þþ‘²l³³l²þmúúüî¸ûÉ+±±n²²JÿÓ^Ñ "³ +°/°/°EX° /± >Y³+01!!#3^ýÑyNþNþ‡/üZnnšþ‡NþNþ…ýø¢ ÿÙ{}³ +° /³+³ +01!!3!'7'7!".5 %þJEy \u¿NDþ¼N¿þ‹uÊ–T}o\ xF¾Nþ»þ¾LÀX˜ÉpJÿÙ\0³ +° /³+³+°° а° а°а°Ð01!5!#53'7!!#!'7\þp¸¸þ¬þ»N¾þ+½{¾Nmýdo9þ¾LÀœmþ@¾NÿÓÑ "³ +° /°/°EX°/±>Y³ +01!#3'!5!7nnþðþP{ýÏ1þ…P¢þ1þNyn{NhD$HTÁ°U/°V/°U°а/°V°!ܱ' ô´Ú'ê']@ '')'9'I'Y'i'y'‰'™'©'¹'É' ]°!°-а-/°±9 ô@99&969F9V9f9v9†9–9¦9¶9Æ9 ]´Õ9å9]°!°GаG/°R/°EX°//±/>Y°EX°5/±5>Y³E +° °а/°5±ô°а/°E°=а=/01#"'&#"#"'&547632327632&5476677&#"'&#"3276323276%h$Nc^-GJ-)HJ"{wyNZš9V+7 "VV2“m’13&š1 $ \^‘ˆhs>3k\F1\Y°EX°/±>Y°EX°/±>Y°±ô°)±ô´Ùé]@(8HXhxˆ˜¨¸È ]°°а Ð013!>54.#"!535&54>32¼n}Óþ¤CZ8'V…^Z…V)6XCþ¤Óyn?{¶ww¶}?å‘þð]ru#g{‡?R¨‰VV‰¨R?‡{gþÝurV•qÕ¢bb¢Õb;;N'U; |‰4š Î Û Û ó;N; vr &è  N &è j "„ h¦  0( 0( 8þX &è Copyright (c) Mark Simonson 2009-2010. All rights reserved.Anonymous Pro MinusRegularMarkSimonson: Anonymous Pro Minus: 2010Version 1.003AnonymousProMinusAnonymous Pro Minus is a trademark of Mark Simonson.Mark Simonsonhttp://www.ms-studio.comCopyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus. This Font Software is licensed under the SIL Open Font License, Version 1.1. Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus. This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.Copyright (c) Mark Simonson 2009-2010. All rights reserved.Anonymous Pro MinusRegularMarkSimonson: Anonymous Pro Minus: 2010Version 1.003AnonymousProMinusAnonymous Pro Minus is a trademark of Mark Simonson.Mark Simonsonhttp://www.ms-studio.comCopyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus. This Font Software is licensed under the SIL Open Font License, Version 1.1. Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus. This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.ÿE{p  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§©ª«­®¯°±²³´µ¶·¸¹º»¼¾¿ÀÁÂÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÛÜÝÞßàá½è òóñõôöéðëíêìî    ýþÿ !"#øù$%&'()*+,-./0123456789:;<=>?@ABCâãDEFGHIJKLMNOPQRSTUVWXYZ[\ûüäå]^_`abcdefghijklmnopqrstuvæçwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ      !"#$%&'()*+,-./0123456789:ï;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw.nullDeltauni00A0Europeriodcenteredmacron commaaccentuni00ADAmacronamacronAbreveabreveAogonekaogonek Ccircumflex ccircumflex Cdotaccent cdotaccentDcarondcaronDcroatdcroatEmacronemacronEbreveebreve Edotaccent edotaccentEogonekeogonekEcaronecaron Gcircumflex gcircumflex Gdotaccent gdotaccent Gcommaaccent gcommaaccent Hcircumflex hcircumflexHbarhbarItildeitildeImacronimacronIbreveibreveIogonekiogonek IdotaccentIJij Jcircumflex jcircumflex Kcommaaccent kcommaaccent kgreenlandicLacutelacute Lcommaaccent lcommaaccentLcaronlcaronLdotldotNacutenacute Ncommaaccent ncommaaccentNcaronncaron napostropheEngengOmacronomacronObreveobreve Ohungarumlaut ohungarumlautRacuteracute Rcommaaccent rcommaaccentRcaronrcaronSacutesacute Scircumflex scircumflex Tcommaaccent tcommaaccentTcarontcaronTbartbarUtildeutildeUmacronumacronUbreveubreveUringuring Uhungarumlaut uhungarumlautUogonekuogonek Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentlongsAEacuteaeacute Oslashacute oslashacute Scommaaccent scommaaccentuni021Auni021Btonos dieresistonos Alphatonos EpsilontonosEtatonos Iotatonos Omicrontonos Upsilontonos OmegatonosiotadieresistonosAlphaBetaGammauni0394EpsilonZetaEtaThetaIotaKappaLambdaMuNuXiOmicronPiRhoSigmaTauUpsilonPhiChiPsi IotadieresisUpsilondieresis alphatonos epsilontonosetatonos iotatonosupsilondieresistonosalphabetagammadeltaepsilonzetaetathetaiotakappalambdauni03BCnuxiomicronrhosigma1sigmatauupsilonphichipsiomega iotadieresisupsilondieresis omicrontonos upsilontonos omegatonos afii10023 afii10051 afii10052 afii10053 afii10054 afii10055 afii10056 afii10057 afii10058 afii10059 afii10060 afii10061 afii10062 afii10145 afii10017 afii10018 afii10019 afii10020 afii10021 afii10022 afii10024 afii10025 afii10026 afii10027 afii10028 afii10029 afii10030 afii10031 afii10032 afii10033 afii10034 afii10035 afii10036 afii10037 afii10038 afii10039 afii10040 afii10041 afii10042 afii10043 afii10044 afii10045 afii10046 afii10047 afii10048 afii10049 afii10065 afii10066 afii10067 afii10068 afii10069 afii10070 afii10072 afii10073 afii10074 afii10075 afii10076 afii10077 afii10078 afii10079 afii10080 afii10081 afii10082 afii10083 afii10084 afii10085 afii10086 afii10087 afii10088 afii10089 afii10090 afii10091 afii10092 afii10093 afii10094 afii10095 afii10096 afii10097 afii10071 afii10099 afii10100 afii10101 afii10102 afii10103 afii10104 afii10105 afii10106 afii10107 afii10108 afii10109 afii10110 afii10193 afii10050 afii10098uni1E02uni1E03uni1E0Auni1E0Buni1E1Euni1E1Funi1E40uni1E41uni1E56uni1E57uni1E60uni1E61uni1E6Auni1E6BWgravewgraveWacutewacute Wdieresis wdieresisYgraveygrave afii00208 afii61352uni2303uni2318uni2324 optionkeyerasetotherightuni237duni2388uni23ceuni2423SF100000SF110000SF010000SF030000SF020000SF040000SF080000SF090000SF060000SF070000SF050000SF430000SF240000SF510000SF520000SF390000SF220000SF210000SF250000SF500000SF490000SF380000SF280000SF270000SF260000SF360000SF370000SF420000SF190000SF200000SF230000SF470000SF480000SF410000SF450000SF460000SF400000SF540000SF530000SF440000 blackdiamond checkmarkshift shiftlock verticaltabcopybackendtabinserttab appleopenuni03A9  ÿÿimagick-3.6.0/tests/OFL.txt0000644000000000000000000001065714145213431014154 0ustar rootrootCopyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), with Reserved Font Name Anonymous Pro Minus. This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. imagick-3.6.0/util/Float32Info.php0000644000000000000000000000134114145213431015333 0ustar rootrootsign = $sign; $this->exponent = $exponent; $this->mantissa = $mantissa; } public function getSign() { return $this->sign; } public function getExponent() { return $this->exponent; } public function getMantissa() { return $this->mantissa; } } imagick-3.6.0/util/FloatInfo.php0000644000000000000000000000134214145213431015167 0ustar rootrootsign = $sign; $this->exponent = $exponent; $this->mantissa = $mantissa; } public function getSign() { return $this->sign; } public function getExponent() { return $this->exponent; } public function getMantissa() { return $this->mantissa; } } imagick-3.6.0/util/functions.php0000644000000000000000000001475014145213431015325 0ustar rootroot= 8) { $sign = '1'; } $exponentString = substr($float64, 0, 3); $exponentValue = hexdec($exponentString) & 0x7ff; $exponent = sprintf("%b", $exponentValue); $exponent = str_pad($exponent, 11, '0', STR_PAD_LEFT); $mantissa = substr($float64, 2); $mantissa = hexdec($mantissa) & 0xfffffffffffff; $mantissa = sprintf("%b", $mantissa); $mantissa = str_pad($mantissa, 52, '0', STR_PAD_LEFT); return new FloatInfo( $sign, $exponent, $mantissa ); } /** * Convert a floating point number to a Float32Info object, * which contains string representations of the float's sign, * exponent and mantissa * * @param float $num * @return Float32Info */ function float_info_32(float $num) { $float32 = floathex32($num); $chars = str_split($float32); // 3 bits from this $byte1 = hexdec($chars[0]); // 4 bits from this $byte2 = hexdec($chars[1]); // 1 bit from this $byte3 = hexdec($chars[2]); $sign = '0'; if ($byte1 >= 8) { $sign = '1'; } $exponent3Bits = ($byte1 & 0x7); $exponent4Bits = $byte2; $exponent1Bit = ($byte3 & 0x8) >> 3; $exponent = ($exponent3Bits << 5) | ($exponent4Bits << 1) | $exponent1Bit; $exponent = sprintf("%b", $exponent); $exponent = str_pad($exponent, 8, '0', STR_PAD_LEFT); $mantissa = substr($float32, 2, 6); $mantissa = hexdec($mantissa) & 0x7fffff; $mantissa = sprintf("%b", $mantissa); $mantissa = str_pad($mantissa, 23, '0', STR_PAD_LEFT); return new Float32Info( $sign, $exponent, $mantissa ); } /** * Produce a debug string that shows the Sign, Exponent and Mantissa for * two floating point numbers, using 64bit precision * * * @param float $value1 * @param float $value2 * @return string * * Example result * ┌──────┬─────────────┬──────────────────────────────────────────────────────┠* │ Sign │ Exponent │ Mantissa │ * │ 0 │ 01111111011 │ 1001100110011001100110011001100110011001100110011010 │ * │ 0 │ 10000011001 │ 0111110101111000010000000100000000000000000000000000 │ * └──────┴─────────────┴──────────────────────────────────────────────────────┘ * */ function float_compare(float $value1, float $value2) { $float_info_1 = float_info($value1); $float_info_2 = float_info($value2); //Sign bit: 1 bit //Exponent: 11 bits //Significand precision: 53 bits (52 explicitly stored) $output = "┌──────┬─────────────┬──────────────────────────────────────────────────────â”\n"; $output .= "│ Sign │ Exponent │ Mantissa │\n"; $format_string = "│ %s │ %s │ %s │\n"; $output .= sprintf($format_string, $float_info_1->getSign(), $float_info_1->getExponent(), $float_info_1->getMantissa()); $output .= sprintf($format_string, $float_info_2->getSign(), $float_info_2->getExponent(), $float_info_2->getMantissa()); $output .= "└──────┴─────────────┴──────────────────────────────────────────────────────┘\n"; return $output; } /** * Produce a debug string that shows the Sign, Exponent and Mantissa for * two floating point numbers, using 32bit precision * * @param float $value1 * @param float $value2 * @return string * * Example result * ┌──────┬──────────┬─────────────────────────┠* │ Sign │ Exponent │ Mantissa │ * │ 0 │ 01111011 │ 10011001100110011001101 │ * │ 0 │ 10011001 │ 01111101011110000100000 │ * └──────┴──────────┴─────────────────────────┘ * */ function float_compare_32(float $value1, float $value2) { $float_info_1 = float_info_32($value1); $float_info_2 = float_info_32($value2); $output = "┌──────┬──────────┬─────────────────────────â”\n"; $output .= "│ Sign │ Exponent │ Mantissa │\n"; $format_string = "│ %s │ %s │ %s │\n"; $output .= sprintf($format_string, $float_info_1->getSign(), $float_info_1->getExponent(), $float_info_1->getMantissa()); $output .= sprintf($format_string, $float_info_2->getSign(), $float_info_2->getExponent(), $float_info_2->getMantissa()); $output .= "└──────┴──────────┴─────────────────────────┘\n"; return $output; } imagick-3.6.0/util/fixup_arginfo.php0000644000000000000000000000765714145213431016165 0ustar rootroot= 80000 ZEND_ARG_TYPE_INFO($1, $2, $3, $4) #else ZEND_ARG_INFO($1, $2) #endif"; $search[] = "#ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX\((\w*), 0, (\w*), IMAGICK_QUANTUM_TYPE, 0\)#iu"; $replace[] = " #if MAGICKCORE_HDRI_ENABLE ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX($1, 0, $2, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX($1, 0, $2, IS_LONG, 0) #endif "; //ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) #define ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args) $search[] = "#ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX\((\w*), (\w*), (\w*), (\w*), (\w*)\)#iu"; $replace[] = " #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX($1, $2, $3, $4, $5) #else ZEND_BEGIN_ARG_INFO_EX($1, 0, $2, $3) #endif "; //#define ZEND_ARG_TYPE_MASK(pass_by_ref, name, type_mask, default_value) \ $search[] = "#.*ZEND_ARG_TYPE_MASK\(([\w|\|]*), ([\w|\|]*), ([\w|\|]*), ([\w\|\"]*)\)#iu"; $replace[] = " #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_MASK($1, $2, $3, $4) #else ZEND_ARG_INFO($1, $2) #endif "; //ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type) //ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args) $search[] = "#.*ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX\(([\w|\|]*), ([\w|\|]*), ([\w|\|]*), ([\w|\|]*)\)#iu"; $replace[] = " #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX($1, $2, $3, $4) #else ZEND_BEGIN_ARG_INFO_EX($1, 0, $2, $3) #endif "; //ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) $search[] = "#ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX\((\w*), (\w*), (\w*), (\w*), (\w*)\)#iu"; $replace[] = " #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX($1, $2, $3, $4, $5) #else ZEND_BEGIN_ARG_INFO_EX($1, 0, $2, $3) #endif "; //ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) \ $search[] = "#.*ZEND_ARG_OBJ_INFO\((\w*), (\w*), resource, (\w*)\)#iu"; $replace[] = " #if PHP_VERSION_ID >= 80000 \tZEND_ARG_OBJ_INFO($1, $2, resource, $3) #else \tZEND_ARG_INFO($1, $2) #endif "; // ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null") $search[] = "#.*ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE\((\w*), (\w*), (\w*), (\w*), ([\w\"]*)\)#iu"; $replace[] = " #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE($1, $2, $3, $4, $5) #else ZEND_ARG_INFO($1, $2) #endif "; //#if PHP_VERSION_ID >= 80000 //ZEND_ARG_TYPE_MASK(0, files, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_NULL, NULL) //#else // ZEND_ARG_INFO(0, files) //#endif foreach ($input_lines as $input_line) { $input_line = rtrim($input_line); $input_line = preg_replace($search, $replace, $input_line); $output_lines[] = $input_line; } file_put_contents($filename, implode("\n", $output_lines)); echo "File has now been fixedup.\n"; imagick-3.6.0/config.m40000644000000000000000000000705614145213431013337 0ustar rootrootPHP_ARG_WITH(imagick, whether to enable the imagick extension, [ --with-imagick[=DIR] Enables the imagick extension. DIR is the prefix to ImageMagick installation directory.], no) if test $PHP_IMAGICK != "no"; then # # Find ImageMagick # if test "$ext_shared" != "yes" && test "$ext_shared" != "shared"; then define('PHP_IMAGICK_STATIC', 1) PHP_IMAGICK_STATIC=yes fi m4_include(ifdef('PHP_IMAGICK_STATIC',PHP_EXT_BUILDDIR(imagick)[/],)[imagemagick.m4]) # This line checks that ImageMagick is available, and # meets our minimum supported version. TODO change to 6.7.0 IM_FIND_IMAGEMAGICK([6.2.4], [$PHP_IMAGICK]) # # PHP minimum version # AC_MSG_CHECKING([PHP version is at least 5.3.2]) if test -z "${PHP_VERSION_ID}"; then if test -z "${PHP_CONFIG}"; then AC_MSG_ERROR([php-config not found]) fi if test -z "${AWK}"; then AC_MSG_ERROR([awk not found]) fi PHP_IMAGICK_FOUND_VERSION=`${PHP_CONFIG} --version` PHP_IMAGICK_FOUND_VERNUM=`echo "${PHP_IMAGICK_FOUND_VERSION}" | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 100 + [$]2) * 100 + [$]3;}'` else PHP_IMAGICK_FOUND_VERNUM="${PHP_VERSION_ID}" PHP_IMAGICK_FOUND_VERSION="${PHP_VERSION}" fi if test "$PHP_IMAGICK_FOUND_VERNUM" -ge "50302"; then AC_MSG_RESULT(yes. found $PHP_IMAGICK_FOUND_VERSION) else AC_MSG_ERROR(no. found $PHP_IMAGICK_FOUND_VERSION) fi # # Set libs and CFLAGS for building # echo "libs" echo $IM_IMAGEMAGICK_LIBS echo "" echo $IMAGICK_SHARED_LIBADD PHP_EVAL_LIBLINE($IM_IMAGEMAGICK_LIBS, IMAGICK_SHARED_LIBADD) PHP_EVAL_INCLINE($IM_IMAGEMAGICK_CFLAGS) old_LIBS=$LIBS LIBS="$LIBS $IM_IMAGEMAGICK_LIBS" PHP_CHECK_FUNC(MagickGetVersion) LIBS=$old_LIBS AC_MSG_CHECKING(omp_pause_resource_all usability) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[ omp_pause_resource_all(omp_pause_hard); ]])],[ AC_MSG_RESULT(yes) AC_MSG_CHECKING([Which flavour of OpenMP to link]) if test "${GCC}" = "yes"; then # Open64 (passes for GCC but uses different OpenMP implementation) if test "x$GOMP_LIBS" = x ; then if $CC --version 2>&1 | grep Open64 > /dev/null ; then PHP_CHECK_FUNC(omp_pause_resource_all, openmp) if test "x$ac_cv_func_omp_pause_resource_all" = "xyes"; then PHP_ADD_LIBRARY(openmp,, IMAGICK_SHARED_LIBADD) AC_MSG_RESULT([Open64 flavoured OpenMP]) fi fi fi # Clang (passes for GCC but uses different OpenMP implementation) if test "x$LIB_OMP" = x ; then if $CC --version 2>&1 | grep clang > /dev/null ; then PHP_CHECK_FUNC(omp_pause_resource_all, omp) if test "x$ac_cv_func_omp_pause_resource_all" = "xyes"; then PHP_ADD_LIBRARY(omp,, IMAGICK_SHARED_LIBADD) AC_MSG_RESULT([Clang flavoured OpenMP]) fi fi fi # GCC if test "x$ac_cv_func_omp_pause_resource_all" = x ; then PHP_CHECK_FUNC(omp_pause_resource_all, gomp) if test "x$ac_cv_func_omp_pause_resource_all" = "xyes"; then PHP_ADD_LIBRARY(gomp,, IMAGICK_SHARED_LIBADD) AC_MSG_RESULT([GCC flavoured OpenMP]) fi fi fi ],[ AC_MSG_RESULT(no) ]) PHP_SUBST(IMAGICK_SHARED_LIBADD) AC_DEFINE(HAVE_IMAGICK,1,[ ]) PHP_NEW_EXTENSION(imagick, imagick_file.c imagick_class.c imagickdraw_class.c imagickpixel_class.c imagickpixeliterator_class.c imagick_helpers.c imagick.c imagickkernel_class.c shim_im6_to_im7.c, $ext_shared,, $IM_IMAGEMAGICK_CFLAGS) PHP_INSTALL_HEADERS([ext/imagick], [php_imagick_shared.h]) fi imagick-3.6.0/imagemagick.m40000644000000000000000000001663114145213431014327 0ustar rootroot######################################################### # Locate ImageMagick configuration program # ImageMagick has the config program: # bin/Wand-config # bin/MagickWand-config # # Sets # IM_WAND_BINARY # IM_IMAGEMAGICK_PREFIX # IM_IMAGEMAGICK_VERSION # IM_IMAGEMAGICK_VERSION_MASK # IM_USE_PKG_CONFIG # # Usage: # IM_FIND_IMAGEMAGICK (MINIMUM_VERSION, EXTRA_SEARCH_PREFIX) # # Note: # IM_PREFIX - the directory reported by `MagickWand-config --prefix` # IM_IMAGEMAGICK_PREFIX - the user specified location to use # ######################################################### dnl dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD) dnl dnl Use this macro, if you need to add libraries and or library search dnl paths to the PHP build system which are only given in compiler dnl notation. dnl AC_DEFUN([IM_EVAL_LIBLINE_DEFER],[ for ac_i in $1; do case $ac_i in -pthread[)] if test "$ext_shared" = "yes"; then $2="[$]$2 -pthread" else PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"]) fi ;; -l*[)] ac_ii=`echo $ac_i|cut -c 3-` PHP_ADD_LIBRARY_DEFER($ac_ii,1,$2) ;; -L*[)] ac_ii=`echo $ac_i|cut -c 3-` PHP_ADD_LIBPATH_DEFER($ac_ii,$2) ;; esac done ]) AC_DEFUN([IM_FIND_IMAGEMAGICK],[ # # Variables passed in # IM_MINIMUM_VERSION=$1 IM_EXTRA_SEARCH_PREFIX=$2 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then AC_MSG_RESULT([pkg-config not found]) AC_MSG_ERROR([Please reinstall the pkg-config distribution]) fi if test -z "$AWK"; then AC_MSG_ERROR([awk not found]) fi AC_MSG_CHECKING(ImageMagick MagickWand API configuration program) if test "$IM_EXTRA_SEARCH_PREFIX" != "yes"; then for i in "$IM_EXTRA_SEARCH_PREFIX" /usr/local /usr /usr/sbin /opt /opt/local /opt/homebrew; do AC_MSG_CHECKING([Testing ${i}/bin/MagickWand-config]) if test -r "${i}/bin/MagickWand-config"; then IM_WAND_BINARY="${i}/bin/MagickWand-config" IM_IMAGEMAGICK_PREFIX=$i AC_MSG_RESULT([It exists]) break fi AC_MSG_RESULT([Doesn't exist]) AC_MSG_CHECKING([Testing ${i}/bin/Wand-config]) if test -r "${i}/bin/Wand-config"; then IM_WAND_BINARY="${i}/bin/Wand-config" IM_IMAGEMAGICK_PREFIX=$i AC_MSG_RESULT([It exists]) break fi AC_MSG_RESULT([Doesn't exist]) done else for i in /usr/local /usr /usr/sbin /opt /opt/local /opt/homebrew; do AC_MSG_CHECKING([Testing ${i}/bin/MagickWand-config]) if test -r "${i}/bin/MagickWand-config"; then IM_WAND_BINARY="${i}/bin/MagickWand-config" IM_IMAGEMAGICK_PREFIX=$i AC_MSG_RESULT([It exists]) break fi if test -r "${i}/bin/Wand-config"; then IM_WAND_BINARY="${i}/bin/Wand-config" IM_IMAGEMAGICK_PREFIX=$i AC_MSG_RESULT([It exists]) break fi AC_MSG_RESULT([Doesn't exist]) done fi IM_USE_PKG_CONFIG=0 if test "x" = "x$IM_WAND_BINARY"; then if eval '$PKG_CONFIG --exists MagickWand'; then IM_USE_PKG_CONFIG=1 IM_WAND_BINARY=$PKG_CONFIG else AC_MSG_ERROR(not found. Please provide a path to MagickWand-config or Wand-config program.) fi fi AC_MSG_RESULT([found in $IM_WAND_BINARY]) # This is used later for cflags and libs export PKG_CONFIG_PATH="${IM_IMAGEMAGICK_PREFIX}/${PHP_LIBDIR}/pkgconfig" # Check version # if test "$IM_USE_PKG_CONFIG" = "1"; then IM_IMAGEMAGICK_VERSION=`$IM_WAND_BINARY --modversion MagickWand` else IM_IMAGEMAGICK_VERSION=`$IM_WAND_BINARY --version` fi IM_IMAGEMAGICK_VERSION_MASK=`echo $IM_IMAGEMAGICK_VERSION | $AWK 'BEGIN { FS = "."; } { printf "%d", ($[1] * 1000 + $[2]) * 1000 + $[3];}'` IM_MIMIMUM_VERSION_MASK=`echo $IM_MINIMUM_VERSION | $AWK 'BEGIN { FS = "."; } { printf "%d", ($[1] * 1000 + $[2]) * 1000 + $[3];}'` AC_MSG_CHECKING(if ImageMagick version is at least $IM_MINIMUM_VERSION) if test "$IM_IMAGEMAGICK_VERSION_MASK" -ge $IM_MIMIMUM_VERSION_MASK; then AC_MSG_RESULT(found version $IM_IMAGEMAGICK_VERSION) else AC_MSG_ERROR(no. You need at least ImageMagick version $IM_MINIMUM_VERSION to use this extension.) fi # Potential locations for the header # include/wand/magick-wand.h # include/ImageMagick/wand/MagickWand.h # include/ImageMagick-6/wand/MagickWand.h # include/ImageMagick-7/MagickWand/MagickWand.h AC_MSG_CHECKING(for MagickWand.h or magick-wand.h header) if test "$IM_USE_PKG_CONFIG" = "1"; then IM_PREFIX=`$IM_WAND_BINARY --variable prefix MagickWand` else IM_PREFIX=`$IM_WAND_BINARY --prefix` fi IM_MAJOR_VERSION=`echo $IM_IMAGEMAGICK_VERSION | $AWK 'BEGIN { FS = "."; } {print $[1]}'` # Try the header formats from newest to oldest if test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then IM_INCLUDE_FORMAT="MagickWand/MagickWand.h" IM_HEADER_STYLE="SEVEN" AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header]) AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h]) elif test -r "${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h"; then IM_INCLUDE_FORMAT="wand/MagickWand.h" IM_HEADER_STYLE="SIX" AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SIX], [1], [ImageMagick 6.x style header]) AC_MSG_RESULT([user location ${IM_IMAGEMAGICK_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h]) elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h"; then IM_INCLUDE_FORMAT="MagickWand/MagickWand.h" IM_HEADER_STYLE="SEVEN" AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SEVEN], [1], [ImageMagick 7.x style header]) AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/MagickWand/MagickWand.h]) elif test -r "${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h"; then IM_INCLUDE_FORMAT="wand/MagickWand.h" IM_HEADER_STYLE="SIX" AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SIX], [1], [ImageMagick 6.x style header]) AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick-${IM_MAJOR_VERSION}/wand/MagickWand.h]) elif test -r "${IM_PREFIX}/include/ImageMagick/wand/MagickWand.h"; then IM_INCLUDE_FORMAT="wand/MagickWand.h" IM_HEADER_STYLE="SIX" AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_SIX], [1], [ImageMagick 6.x style header]) AC_MSG_RESULT([${IM_PREFIX}/include/ImageMagick/wand/MagickWand.h]) elif test -r "${IM_PREFIX}/include/ImageMagick/wand/magick-wand.h"; then IM_INCLUDE_FORMAT="wand/magick-wand.h" IM_HEADER_STYLE="OLD" AC_DEFINE([IM_MAGICKWAND_HEADER_STYLE_OLD], [1], [ImageMagick old style header]) AC_MSG_RESULT([${IM_PREFIX}/include/wand/magick-wand.h]) else AC_MSG_ERROR([Unable to find MagickWand.h or magick-wand.h header]) fi # # The cflags and libs # if test "$IM_USE_PKG_CONFIG" = "1"; then IM_IMAGEMAGICK_LIBS=`$IM_WAND_BINARY --libs MagickWand` IM_IMAGEMAGICK_CFLAGS=`$IM_WAND_BINARY --cflags MagickWand` else IM_IMAGEMAGICK_LIBS=`$IM_WAND_BINARY --libs` IM_IMAGEMAGICK_CFLAGS=`$IM_WAND_BINARY --cflags` fi export IM_IMAGEMAGICK_PREFIX export IM_WAND_BINARY export IM_IMAGEMAGICK_VERSION export IM_IMAGEMAGICK_VERSION_MASK export IM_INCLUDE_FORMAT export IM_HEADER_STYLE export IM_USE_PKG_CONFIG export IM_IMAGEMAGICK_LIBS export IM_IMAGEMAGICK_CFLAGS ]) imagick-3.6.0/config.w320000644000000000000000000000267414145213431013433 0ustar rootrootARG_WITH("imagick", "ImageMagick support", "no"); if (PHP_IMAGICK != "no") { var conf_ok = false; if (CHECK_HEADER_ADD_INCLUDE("MagickWand/MagickWand.h", "CFLAGS_IMAGICK", PHP_PHP_BUILD + "\\include\\imagemagick;" + PHP_IMAGICK) && CHECK_LIB("CORE_RL_MagickWand_.lib", "imagick", PHP_PHP_BUILD + "\\lib\\imagemagick;" + PHP_IMAGICK) && CHECK_LIB("CORE_RL_MagickCore_.lib", "imagick", PHP_PHP_BUILD + "\\lib\\imagemagick;" + PHP_IMAGICK)) { ADD_FLAG("CFLAGS_IMAGICK", "/D IM_MAGICKWAND_HEADER_STYLE_SEVEN /D IMAGICK_USE_NEW_HEADER /D _MAGICKMOD_ /D _VISUALC_ /D NeedFunctionPrototypes /D _LIB"); conf_ok = true; } else if (CHECK_HEADER_ADD_INCLUDE("wand/MagickWand.h", "CFLAGS_IMAGICK", PHP_PHP_BUILD + "\\include\\imagemagick;" + PHP_IMAGICK) && CHECK_LIB("CORE_RL_wand_.lib", "imagick", PHP_PHP_BUILD + "\\lib\\imagemagick;" + PHP_IMAGICK) && CHECK_LIB("CORE_RL_magick_.lib", "imagick", PHP_PHP_BUILD + "\\lib\\imagemagick;" + PHP_IMAGICK)) { ADD_FLAG("CFLAGS_IMAGICK", "/D IMAGICK_USE_NEW_HEADER /D _MAGICKMOD_ /D _VISUALC_ /D NeedFunctionPrototypes /D _LIB"); conf_ok = true; } if (conf_ok) { EXTENSION('imagick', 'imagick_class.c imagickdraw_class.c imagickpixel_class.c imagickpixeliterator_class.c imagick_helpers.c imagick_file.c imagick.c imagickkernel_class.c shim_im6_to_im7.c'); AC_DEFINE('HAVE_IMAGICK', 1); AC_DEFINE('IMAGICK_EXPORTS', 1); } else { WARNING("imagick not enabled; libraries and headers not found"); } } imagick-3.6.0/CREDITS0000644000000000000000000000004714145213431012641 0ustar rootrootImagick Mikko Koppanen, Scott MacVicar imagick-3.6.0/imagick.c0000644000000000000000000011754314145213431013403 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" #include "php_imagick_shared.h" #if PHP_VERSION_ID >= 70000 #include "ext/standard/php_smart_string.h" #else #include "ext/standard/php_smart_str.h" #endif /* For the countable interface */ #include "ext/spl/spl_iterators.h" #include "shim_php7_to_php8.h" #if HAVE_OMP_PAUSE_RESOURCE_ALL #include #endif ZEND_DECLARE_MODULE_GLOBALS(imagick) #ifdef IMAGICK_WITH_KERNEL #if PHP_VERSION_ID >= 80000 HashTable* php_imagickkernel_get_debug_info(zend_object *obj, int *is_temp TSRMLS_DC); /* {{{ */ #else HashTable* php_imagickkernel_get_debug_info(zval *obj, int *is_temp TSRMLS_DC); /* {{{ */ #endif #endif #if MAGICKCORE_HDRI_ENABLE #define IMAGICK_QUANTUM_TYPE IS_DOUBLE #else #define IMAGICK_QUANTUM_TYPE IS_LONG #endif zend_class_entry *php_imagick_sc_entry; zend_class_entry *php_imagick_exception_class_entry; zend_class_entry *php_imagickdraw_sc_entry; zend_class_entry *php_imagickdraw_exception_class_entry; zend_class_entry *php_imagickpixel_sc_entry; zend_class_entry *php_imagickpixel_exception_class_entry; zend_class_entry *php_imagickpixeliterator_sc_entry; zend_class_entry *php_imagickpixeliterator_exception_class_entry; #ifdef IMAGICK_WITH_KERNEL zend_class_entry *php_imagickkernel_sc_entry; zend_class_entry *php_imagickkernel_exception_class_entry; #endif #if defined(ZTS) && defined(PHP_WIN32) static MUTEX_T imagick_mutex; static THREAD_T imagick_thread_id; #endif /* Handlers */ static zend_object_handlers imagick_object_handlers; static zend_object_handlers imagickdraw_object_handlers; static zend_object_handlers imagickpixel_object_handlers; static zend_object_handlers imagickpixeliterator_object_handlers; #ifdef IMAGICK_WITH_KERNEL static zend_object_handlers imagickkernel_object_handlers; #endif /* External API */ PHP_IMAGICK_API zend_class_entry *php_imagick_get_class_entry() { return php_imagick_sc_entry; } PHP_IMAGICK_API zend_class_entry *php_imagickdraw_get_class_entry() { return php_imagickdraw_sc_entry; } PHP_IMAGICK_API zend_class_entry *php_imagickpixel_get_class_entry() { return php_imagickpixel_sc_entry; } static zend_function_entry php_imagick_functions[] = { { NULL, NULL, NULL, 0, 0 } }; #include "ImagickDraw_arginfo.h" const zend_function_entry *php_imagickdraw_class_methods = class_ImagickDraw_methods; #include "ImagickPixelIterator_arginfo.h" const zend_function_entry *php_imagickpixeliterator_class_methods = class_ImagickPixelIterator_methods; #include "ImagickPixel_arginfo.h" const zend_function_entry *php_imagickpixel_class_methods = class_ImagickPixel_methods; #include "Imagick_arginfo.h" const zend_function_entry *php_imagick_class_methods = class_Imagick_methods; #ifdef IMAGICK_WITH_KERNEL #include "ImagickKernel_arginfo.h" const zend_function_entry *php_imagickkernel_class_methods = class_ImagickKernel_methods; #endif static void php_imagick_object_free_storage(IM_ZEND_OBJECT *object TSRMLS_DC) { php_imagick_object *intern = php_imagick_fetch_object(object); if (!intern) { return; } if (intern->progress_monitor_name) { //TODO - is this meant to be free by us? efree(intern->progress_monitor_name); } if (intern->magick_wand != NULL) { intern->magick_wand = DestroyMagickWand(intern->magick_wand); } zend_object_std_dtor(&intern->zo TSRMLS_CC); #if PHP_VERSION_ID < 70000 efree(intern); #endif } static void php_imagickdraw_object_free_storage(IM_ZEND_OBJECT *object TSRMLS_DC) { php_imagickdraw_object *intern = php_imagickdraw_fetch_object(object); if (!intern) { return; } if (intern->drawing_wand != NULL) { intern->drawing_wand = DestroyDrawingWand(intern->drawing_wand); } zend_object_std_dtor(&intern->zo TSRMLS_CC); #if PHP_VERSION_ID < 70000 efree(intern); #endif } static void php_imagickpixeliterator_object_free_storage(IM_ZEND_OBJECT *object TSRMLS_DC) { php_imagickpixeliterator_object *intern = php_imagickpixeliterator_fetch_object(object); if (!intern) { return; } if (intern->pixel_iterator != NULL) { intern->pixel_iterator = DestroyPixelIterator(intern->pixel_iterator); } zend_object_std_dtor(&intern->zo TSRMLS_CC); #if PHP_VERSION_ID < 70000 efree(intern); #endif } static void php_imagickpixel_object_free_storage(IM_ZEND_OBJECT *object TSRMLS_DC) { php_imagickpixel_object *intern = php_imagickpixel_fetch_object(object); if (!intern) { return; } if (!intern->initialized_via_iterator && intern->pixel_wand) intern->pixel_wand = DestroyPixelWand(intern->pixel_wand); zend_object_std_dtor(&intern->zo TSRMLS_CC); #if PHP_VERSION_ID < 70000 efree(intern); #endif } #ifdef IMAGICK_WITH_KERNEL static void php_imagickkernel_object_free_storage(IM_ZEND_OBJECT *object TSRMLS_DC) { php_imagickkernel_object *intern = php_imagickkernel_fetch_object(object); if (!intern) { return; } if (intern->kernel_info != NULL) { // This segfaults in PHP 5.6 //intern->kernel_info = DestroyKernelInfo(intern->kernel_info); intern->kernel_info = NULL; } zend_object_std_dtor(&intern->zo TSRMLS_CC); #if PHP_VERSION_ID < 70000 efree(intern); #endif } #endif #if PHP_VERSION_ID < 50399 # define object_properties_init(zo, class_type) { \ zval *tmp; \ zend_hash_copy((*zo).properties, \ &class_type->default_properties, \ (copy_ctor_func_t) zval_add_ref, \ (void *) &tmp, \ sizeof(zval *)); \ } #endif #if PHP_VERSION_ID >= 70000 static zend_object * php_imagick_object_new_ex(zend_class_entry *class_type, php_imagick_object **ptr, zend_bool init_wand TSRMLS_DC) #else static zend_object_value php_imagick_object_new_ex(zend_class_entry *class_type, php_imagick_object **ptr, zend_bool init_wand TSRMLS_DC) #endif { php_imagick_object *intern; /* Allocate memory for it */ #if PHP_VERSION_ID >= 70000 intern = ecalloc(1, sizeof(php_imagick_object) + zend_object_properties_size(class_type)); #else zend_object_value retval; intern = (php_imagick_object *) emalloc(sizeof(php_imagick_object)); memset(&intern->zo, 0, sizeof(zend_object)); #endif #if defined(ZTS) && defined(PHP_WIN32) /* If its our thread then we already have the lock so no need to lock again */ if (imagick_thread_id != tsrm_thread_id()) { tsrm_mutex_lock(imagick_mutex); imagick_thread_id = tsrm_thread_id(); } #endif if (ptr) { *ptr = intern; } /* Set the magickwand */ if (init_wand) { intern->magick_wand = NewMagickWand(); if (!intern->magick_wand) { zend_error(E_ERROR, "Failed to create Imagick object, could not set magick_wand"); } } else { intern->magick_wand = NULL; } intern->next_out_of_bound = 0; intern->progress_monitor_name = NULL; zend_object_std_init(&intern->zo, class_type TSRMLS_CC); object_properties_init(&intern->zo, class_type); #if PHP_VERSION_ID >= 70000 intern->zo.handlers = &imagick_object_handlers; return &intern->zo; #else retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagick_object_free_storage, NULL TSRMLS_CC); retval.handlers = (zend_object_handlers *) &imagick_object_handlers; return retval; #endif } #if PHP_VERSION_ID >= 70000 static zend_object * php_imagick_object_new(zend_class_entry *class_type TSRMLS_DC) #else static zend_object_value php_imagick_object_new(zend_class_entry *class_type TSRMLS_DC) #endif { return php_imagick_object_new_ex(class_type, NULL, 1 TSRMLS_CC); } #if PHP_VERSION_ID >= 70000 static zend_object * php_imagickdraw_object_new_ex(zend_class_entry *class_type, php_imagickdraw_object **ptr, zend_bool init_wand TSRMLS_DC) #else static zend_object_value php_imagickdraw_object_new_ex(zend_class_entry *class_type, php_imagickdraw_object **ptr, zend_bool init_wand TSRMLS_DC) #endif { php_imagickdraw_object *intern; #if PHP_VERSION_ID >= 70000 /* Allocate memory for it */ intern = ecalloc(1, sizeof(php_imagickdraw_object) + zend_object_properties_size(class_type)); zend_object_std_init(&intern->zo, class_type TSRMLS_CC); object_properties_init(&intern->zo, class_type); intern->zo.handlers = &imagickdraw_object_handlers; #else zend_object_value retval; intern = (php_imagickdraw_object *) emalloc(sizeof(php_imagickdraw_object)); memset(&intern->zo, 0, sizeof(zend_object)); #endif if (ptr) { *ptr = intern; } /* Set the DrawingWand */ if (init_wand) { intern->drawing_wand = NewDrawingWand(); if (!intern->drawing_wand) { zend_error(E_ERROR, "Failed to create ImagickDraw object"); } } else { intern->drawing_wand = NULL; } #if PHP_VERSION_ID >= 70000 intern->zo.handlers = &imagickdraw_object_handlers; return &intern->zo; #else /* ALLOC_HASHTABLE(intern->zo.properties); */ zend_object_std_init(&intern->zo, class_type TSRMLS_CC); object_properties_init(&intern->zo, class_type); retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagickdraw_object_free_storage, NULL TSRMLS_CC); retval.handlers = (zend_object_handlers *) &imagickdraw_object_handlers; return retval; #endif } #if PHP_VERSION_ID >= 70000 static zend_object * php_imagickdraw_object_new(zend_class_entry *class_type TSRMLS_DC) #else static zend_object_value php_imagickdraw_object_new(zend_class_entry *class_type TSRMLS_DC) #endif { return php_imagickdraw_object_new_ex(class_type, NULL, 1 TSRMLS_CC); } #if PHP_VERSION_ID >= 70000 static zend_object * php_imagickpixeliterator_object_new(zend_class_entry *class_type TSRMLS_DC) #else static zend_object_value php_imagickpixeliterator_object_new(zend_class_entry *class_type TSRMLS_DC) #endif { php_imagickpixeliterator_object *intern; /* Allocate memory for it */ #if PHP_VERSION_ID >= 70000 intern = ecalloc(1, sizeof(php_imagickpixeliterator_object) + zend_object_properties_size(class_type)); #else zend_object_value retval; intern = (php_imagickpixeliterator_object *) emalloc(sizeof(php_imagickpixeliterator_object)); memset(&intern->zo, 0, sizeof(zend_object)); #endif /* We cant initialize yet */ intern->pixel_iterator = NULL; intern->initialized = 0; #if MagickLibVersion <= 0x628 intern->rows = 0; intern->iterator_position = 0; #endif zend_object_std_init(&intern->zo, class_type TSRMLS_CC); object_properties_init(&intern->zo, class_type); #if PHP_VERSION_ID >= 70000 intern->zo.handlers = &imagickpixeliterator_object_handlers; return &intern->zo; #else retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagickpixeliterator_object_free_storage, NULL TSRMLS_CC); retval.handlers = (zend_object_handlers *) &imagickpixeliterator_object_handlers; return retval; #endif } #if PHP_VERSION_ID >= 70000 static zend_object * php_imagickpixel_object_new_ex(zend_class_entry *class_type, php_imagickpixel_object **ptr TSRMLS_DC) #else static zend_object_value php_imagickpixel_object_new_ex(zend_class_entry *class_type, php_imagickpixel_object **ptr TSRMLS_DC) #endif { php_imagickpixel_object *intern; #if PHP_VERSION_ID >= 70000 /* Allocate memory for it */ intern = ecalloc(1, sizeof(php_imagickpixel_object) + zend_object_properties_size(class_type)); #else zend_object_value retval; intern = (php_imagickpixel_object *) emalloc(sizeof(php_imagickpixel_object)); memset(&intern->zo, 0, sizeof(zend_object)); #endif if (ptr) { *ptr = intern; } /* Set the pixeliterator */ intern->pixel_wand = NULL; intern->initialized_via_iterator = 0; zend_object_std_init(&intern->zo, class_type TSRMLS_CC); object_properties_init(&intern->zo, class_type); #if PHP_VERSION_ID >= 70000 intern->zo.handlers = &imagickpixel_object_handlers; return &intern->zo; #else retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagickpixel_object_free_storage, NULL TSRMLS_CC); retval.handlers = (zend_object_handlers *) &imagickpixel_object_handlers; return retval; #endif } #if PHP_VERSION_ID >= 70000 static zend_object * php_imagickpixel_object_new(zend_class_entry *class_type TSRMLS_DC) #else static zend_object_value php_imagickpixel_object_new(zend_class_entry *class_type TSRMLS_DC) #endif { return php_imagickpixel_object_new_ex(class_type, NULL TSRMLS_CC); } #ifdef IMAGICK_WITH_KERNEL #if PHP_VERSION_ID >= 70000 static zend_object * php_imagickkernel_object_new_ex(zend_class_entry *class_type, php_imagickkernel_object **ptr TSRMLS_DC) #else static zend_object_value php_imagickkernel_object_new_ex(zend_class_entry *class_type, php_imagickkernel_object **ptr TSRMLS_DC) #endif { php_imagickkernel_object *intern; /* Allocate memory for it */ #if PHP_VERSION_ID >= 70000 intern = ecalloc(1, sizeof(php_imagickkernel_object) + zend_object_properties_size(class_type)); #else zend_object_value retval; intern = (php_imagickkernel_object *) emalloc(sizeof(php_imagickkernel_object)); memset(&intern->zo, 0, sizeof(zend_object)); #endif if (ptr) { *ptr = intern; } /* Set the kernel */ intern->kernel_info = NULL; /* ALLOC_HASHTABLE(intern->zo.properties); */ zend_object_std_init(&intern->zo, class_type TSRMLS_CC); object_properties_init(&intern->zo, class_type); #if PHP_VERSION_ID >= 70000 intern->zo.handlers = &imagickkernel_object_handlers; return &intern->zo; #else retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagickkernel_object_free_storage, NULL TSRMLS_CC); retval.handlers = (zend_object_handlers *) &imagickkernel_object_handlers; return retval; #endif } #endif #undef object_properties_init #ifdef IMAGICK_WITH_KERNEL #if PHP_VERSION_ID >= 70000 static zend_object * php_imagickkernel_object_new(zend_class_entry *class_type TSRMLS_DC) #else static zend_object_value php_imagickkernel_object_new(zend_class_entry *class_type TSRMLS_DC) #endif { return php_imagickkernel_object_new_ex(class_type, NULL TSRMLS_CC); } #endif PHP_INI_BEGIN() STD_PHP_INI_ENTRY("imagick.locale_fix", "0", PHP_INI_ALL, OnUpdateBool, locale_fix, zend_imagick_globals, imagick_globals) STD_PHP_INI_ENTRY("imagick.skip_version_check", "0", PHP_INI_ALL, OnUpdateBool, skip_version_check, zend_imagick_globals, imagick_globals) STD_PHP_INI_ENTRY("imagick.progress_monitor", "0", PHP_INI_SYSTEM, OnUpdateBool, progress_monitor, zend_imagick_globals, imagick_globals) STD_PHP_INI_ENTRY("imagick.set_single_thread", "1", PHP_INI_SYSTEM, OnUpdateBool, set_single_thread, zend_imagick_globals, imagick_globals) STD_PHP_INI_ENTRY("imagick.shutdown_sleep_count", "10", PHP_INI_ALL, OnUpdateLong, shutdown_sleep_count, zend_imagick_globals, imagick_globals) STD_PHP_INI_ENTRY("imagick.allow_zero_dimension_images", "0", PHP_INI_ALL, OnUpdateBool, allow_zero_dimension_images, zend_imagick_globals, imagick_globals) PHP_INI_END() static void php_imagick_init_globals(zend_imagick_globals *imagick_globals) { imagick_globals->locale_fix = 0; imagick_globals->progress_monitor = 0; imagick_globals->skip_version_check = 0; imagick_globals->set_single_thread = 1; imagick_globals->allow_zero_dimension_images = 0; // 10 is magick number, that seems to be enough. imagick_globals->shutdown_sleep_count = 10; } #if PHP_VERSION_ID >= 80000 static int php_imagick_count_elements(zend_object *object, im_long *count) /* {{{ */ { php_imagick_object *intern= php_imagick_fetch_object(object); #else static int php_imagick_count_elements(zval *object, im_long *count TSRMLS_DC) /* {{{ */ { php_imagick_object *intern= Z_IMAGICK_P(object); #endif if (intern->magick_wand) { *count = MagickGetNumberImages(intern->magick_wand); return SUCCESS; } return FAILURE; } #if PHP_VERSION_ID >= 80000 static zval *php_imagick_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) { int ret; php_imagick_object *intern; zval *retval = NULL; const zend_object_handlers *std_hnd; std_hnd = zend_get_std_object_handlers(); ret = std_hnd->has_property(object, member, type, cache_slot TSRMLS_CC); if (ret) { //TODO - this would allow better immutability //ZVAL_COPY_VALUE(retval, std_hnd->read_property(object, member, type, cache_slot, rv TSRMLS_CC)); retval = std_hnd->read_property(object, member, type, cache_slot, rv TSRMLS_CC); } else { intern = php_imagick_fetch_object(object); /* Do we have any images? */ if (MagickGetNumberImages(intern->magick_wand)) { //TODO - this seems redundant /* Is this overloaded? */ if (!strcmp(ZSTR_VAL(member), "width") || !strcmp(ZSTR_VAL(member), "height") || !strcmp(ZSTR_VAL(member), "format")) { if (!strcmp(ZSTR_VAL(member), "width")) { retval = rv; ZVAL_LONG(retval, MagickGetImageWidth(intern->magick_wand)); } else if (!strcmp(ZSTR_VAL(member), "height")) { retval = rv; ZVAL_LONG(retval, MagickGetImageHeight(intern->magick_wand)); } else if (!strcmp(ZSTR_VAL(member), "format")) { char *format = MagickGetImageFormat(intern->magick_wand); if (format) { retval = rv; ZVAL_STRING(retval, format); php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); IMAGICK_FREE_MAGICK_MEMORY(format); } else { retval = rv; ZVAL_STRING(retval, ""); } } } } } if (!retval) { //TODO - why is the error silent - it would be a small BC break //to enable the warning. I think it would be the correct thing to do though. //zend_error(E_NOTICE,"Undefined property: \Imagick::$%s", Z_STRVAL_P(member)); retval = &EG(uninitialized_zval); } return retval; } #else // PHP_VERSION_ID >= 80000 #if PHP_VERSION_ID >= 70000 static zval *php_imagick_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv TSRMLS_DC) { int ret; php_imagick_object *intern; zval *retval = NULL; zval tmp_member; const zend_object_handlers *std_hnd; ZVAL_DEREF(member); if (Z_TYPE_P(member) != IS_STRING) { tmp_member = *member; zval_copy_ctor(&tmp_member); convert_to_string(&tmp_member); member = &tmp_member; } std_hnd = zend_get_std_object_handlers(); ret = std_hnd->has_property(object, member, type, cache_slot TSRMLS_CC); if (ret) { //TODO - this would allow better immutability //ZVAL_COPY_VALUE(retval, std_hnd->read_property(object, member, type, cache_slot, rv TSRMLS_CC)); retval = std_hnd->read_property(object, member, type, cache_slot, rv TSRMLS_CC); } else { intern = Z_IMAGICK_P(object); /* Do we have any images? */ if (MagickGetNumberImages(intern->magick_wand)) { //TODO - this seems redundant /* Is this overloaded? */ if (!strcmp(Z_STRVAL_P(member), "width") || !strcmp(Z_STRVAL_P(member), "height") || !strcmp(Z_STRVAL_P(member), "format")) { if (!strcmp(Z_STRVAL_P(member), "width")) { retval = rv; ZVAL_LONG(retval, MagickGetImageWidth(intern->magick_wand)); } else if (!strcmp(Z_STRVAL_P(member), "height")) { retval = rv; ZVAL_LONG(retval, MagickGetImageHeight(intern->magick_wand)); } else if (!strcmp(Z_STRVAL_P(member), "format")) { char *format = MagickGetImageFormat(intern->magick_wand); if (format) { retval = rv; ZVAL_STRING(retval, format); php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); IMAGICK_FREE_MAGICK_MEMORY(format); } else { retval = rv; ZVAL_STRING(retval, ""); } } } } } if (!retval) { //TODO - why is the error silent - it would be a small BC break //to enable the warning. I think it would be the correct thing to do though. //zend_error(E_NOTICE,"Undefined property: \Imagick::$%s", Z_STRVAL_P(member)); retval = &EG(uninitialized_zval); } if (member == &tmp_member) { zval_dtor(member); } return retval; } #else #if PHP_VERSION_ID < 50399 static zval *php_imagick_read_property(zval *object, zval *member, int type TSRMLS_DC) #else static zval *php_imagick_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) #endif { int ret; php_imagick_object *intern; zval *retval = NULL, tmp_member; zend_object_handlers *std_hnd; if (Z_TYPE_P(member) != IS_STRING) { tmp_member = *member; zval_copy_ctor(&tmp_member); convert_to_string(&tmp_member); member = &tmp_member; } std_hnd = zend_get_std_object_handlers(); #if PHP_VERSION_ID < 50399 ret = std_hnd->has_property(object, member, 2 TSRMLS_CC); #else ret = std_hnd->has_property(object, member, 2, key TSRMLS_CC); #endif if (ret) { std_hnd = zend_get_std_object_handlers(); #if PHP_VERSION_ID < 50399 retval = std_hnd->read_property(object, member, type TSRMLS_CC); #else retval = std_hnd->read_property(object, member, type, key TSRMLS_CC); #endif } else { intern = (php_imagick_object *) zend_object_store_get_object(object TSRMLS_CC); /* Do we have any images? */ if (MagickGetNumberImages(intern->magick_wand)) { /* Is this overloaded? */ if (!strcmp(Z_STRVAL_P(member), "width") || !strcmp(Z_STRVAL_P(member), "height") || !strcmp(Z_STRVAL_P(member), "format")) { MAKE_STD_ZVAL(retval); #ifdef Z_SET_REFCOUNT_P Z_SET_REFCOUNT_P(retval, 0); #else retval->refcount = 0; #endif if (!strcmp(Z_STRVAL_P(member), "width")) { ZVAL_LONG(retval, MagickGetImageWidth(intern->magick_wand)); } else if (!strcmp(Z_STRVAL_P(member), "height")) { ZVAL_LONG(retval, MagickGetImageHeight(intern->magick_wand)); } else if (!strcmp(Z_STRVAL_P(member), "format")) { char *format = MagickGetImageFormat(intern->magick_wand); if (format) { ZVAL_STRING(retval, format, 1); php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); IMAGICK_FREE_MAGICK_MEMORY(format); } else { ZVAL_STRING(retval, "", 1); } } } } } if (member == &tmp_member) { zval_dtor(member); } if (!retval) { retval = EG(uninitialized_zval_ptr); } return retval; } #endif #endif #if PHP_VERSION_ID >= 80000 static zend_object * php_imagick_clone_imagick_object(zend_object *this_ptr) #elif PHP_VERSION_ID >= 70000 static zend_object * php_imagick_clone_imagick_object(zval *this_ptr TSRMLS_DC) #else static zend_object_value php_imagick_clone_imagick_object(zval *this_ptr TSRMLS_DC) #endif { MagickWand *wand_copy = NULL; php_imagick_object *new_obj = NULL; #if PHP_VERSION_ID >= 80000 php_imagick_object *old_obj = php_imagick_fetch_object(this_ptr); zend_object * new_zo = php_imagick_object_new_ex(old_obj->zo.ce, &new_obj, 0 TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #elif PHP_VERSION_ID >= 70000 php_imagick_object *old_obj = Z_IMAGICK_P(this_ptr); zend_object * new_zo = php_imagick_object_new_ex(old_obj->zo.ce, &new_obj, 0 TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #else php_imagick_object *old_obj = (php_imagick_object *) zend_object_store_get_object(this_ptr TSRMLS_CC); zend_object_value new_zo = php_imagick_object_new_ex(old_obj->zo.ce, &new_obj, 0 TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, new_zo, &old_obj->zo, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC); #endif wand_copy = CloneMagickWand(old_obj->magick_wand); if (!wand_copy) { zend_error(E_ERROR, "Failed to clone Imagick object"); } else { php_imagick_replace_magickwand(new_obj, wand_copy); new_obj->next_out_of_bound = old_obj->next_out_of_bound; if (old_obj->progress_monitor_name) { new_obj->progress_monitor_name = estrdup(old_obj->progress_monitor_name); } } return new_zo; } #if PHP_VERSION_ID >= 80000 static zend_object * php_imagick_clone_imagickdraw_object(zend_object *this_ptr) #elif PHP_VERSION_ID >= 70000 static zend_object * php_imagick_clone_imagickdraw_object(zval *this_ptr TSRMLS_DC) #else static zend_object_value php_imagick_clone_imagickdraw_object(zval *this_ptr TSRMLS_DC) #endif { DrawingWand *wand_copy = NULL; php_imagickdraw_object *new_obj = NULL; #if PHP_VERSION_ID >= 80000 php_imagickdraw_object *old_obj = php_imagickdraw_fetch_object(this_ptr); zend_object * new_zo = php_imagickdraw_object_new_ex(old_obj->zo.ce, &new_obj, 0 TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #elif PHP_VERSION_ID >= 70000 php_imagickdraw_object *old_obj = Z_IMAGICKDRAW_P(this_ptr); zend_object * new_zo = php_imagickdraw_object_new_ex(old_obj->zo.ce, &new_obj, 0 TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #else php_imagickdraw_object *old_obj = (php_imagickdraw_object *) zend_object_store_get_object(this_ptr TSRMLS_CC); zend_object_value new_zo = php_imagickdraw_object_new_ex(old_obj->zo.ce, &new_obj, 0 TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, new_zo, &old_obj->zo, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC); #endif wand_copy = CloneDrawingWand(old_obj->drawing_wand); if (!wand_copy) { zend_error(E_ERROR, "Failed to clone ImagickDraw object"); } else { php_imagick_replace_drawingwand(new_obj, wand_copy); } return new_zo; } #if PHP_VERSION_ID >= 80000 static zend_object * php_imagick_clone_imagickpixel_object(zend_object *this_ptr) #elif PHP_VERSION_ID >= 70000 static zend_object * php_imagick_clone_imagickpixel_object(zval *this_ptr TSRMLS_DC) #else static zend_object_value php_imagick_clone_imagickpixel_object(zval *this_ptr TSRMLS_DC) #endif { PixelWand *wand_copy = NULL; php_imagickpixel_object *new_obj = NULL; #if PHP_VERSION_ID >= 80000 zend_object *new_zo; php_imagickpixel_object *old_obj = php_imagickpixel_fetch_object(this_ptr); new_zo = php_imagickpixel_object_new_ex(old_obj->zo.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #elif PHP_VERSION_ID >= 70000 zend_object *new_zo; php_imagickpixel_object *old_obj = Z_IMAGICKPIXEL_P(this_ptr); new_zo = php_imagickpixel_object_new_ex(old_obj->zo.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #else php_imagickpixel_object *old_obj = (php_imagickpixel_object *) zend_object_store_get_object(this_ptr TSRMLS_CC); zend_object_value new_zo = php_imagickpixel_object_new_ex(old_obj->zo.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, new_zo, &old_obj->zo, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC); #endif wand_copy = php_imagick_clone_pixelwand (old_obj->pixel_wand); if (!wand_copy) { zend_error(E_ERROR, "Failed to clone ImagickPixel object"); } else { php_imagick_replace_pixelwand(new_obj, wand_copy); new_obj->initialized_via_iterator = 0; } return new_zo; } #ifdef IMAGICK_WITH_KERNEL #if PHP_VERSION_ID >= 80000 static zend_object * php_imagick_clone_imagickkernel_object(zend_object *this_ptr TSRMLS_DC) #elif PHP_VERSION_ID >= 70000 static zend_object * php_imagick_clone_imagickkernel_object(zval *this_ptr TSRMLS_DC) #else static zend_object_value php_imagick_clone_imagickkernel_object(zval *this_ptr TSRMLS_DC) #endif { KernelInfo *kernel_info_copy = NULL; php_imagickkernel_object *new_obj = NULL; #if PHP_VERSION_ID >= 80000 zend_object *new_zo; php_imagickkernel_object *old_obj = php_imagickkernel_fetch_object(this_ptr); new_zo = php_imagickkernel_object_new_ex(old_obj->zo.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #elif PHP_VERSION_ID >= 70000 zend_object *new_zo; php_imagickkernel_object *old_obj = Z_IMAGICKKERNEL_P(this_ptr); new_zo = php_imagickkernel_object_new_ex(old_obj->zo.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, &old_obj->zo TSRMLS_CC); #else zend_object_value new_zo; php_imagickkernel_object *old_obj = (php_imagickkernel_object *) zend_object_store_get_object(this_ptr TSRMLS_CC); new_zo = php_imagickkernel_object_new_ex(old_obj->zo.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->zo, new_zo, &old_obj->zo, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC); #endif if (old_obj->kernel_info != NULL) { kernel_info_copy = CloneKernelInfo(old_obj->kernel_info); if (!kernel_info_copy) { zend_error(E_ERROR, "Failed to clone ImagickKernel object"); } else { new_obj->kernel_info = kernel_info_copy; } } return new_zo; } #endif static void checkImagickVersion() { //This gets the version that Imagick was compiled against. size_t imagickVersion = MagickLibVersion; //This gets the version of ImageMagick that has been loaded size_t imageMagickLibraryVersion; GetMagickVersion(&imageMagickLibraryVersion); if (imagickVersion == imageMagickLibraryVersion) { return; } zend_error( E_WARNING, "Version warning: Imagick was compiled against ImageMagick version %lu but version %lu is loaded. Imagick will run but may behave surprisingly", (unsigned long)imagickVersion, (unsigned long)imageMagickLibraryVersion ); } PHP_MINIT_FUNCTION(imagick) { zend_class_entry ce; /* Initialize globals */ ZEND_INIT_MODULE_GLOBALS(imagick, php_imagick_init_globals, NULL); // This suppresses an 'unused parameter' warning. (void)type; /* Allocate some memory */ memcpy(&imagick_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); memcpy(&imagickdraw_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); memcpy(&imagickpixeliterator_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); memcpy(&imagickpixel_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); #ifdef IMAGICK_WITH_KERNEL memcpy(&imagickkernel_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); #endif /* Set custom allocators */ MagickWandGenesis(); /* Initialize exceptions (Imagick exception) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICK_EXCEPTION_SC_NAME, NULL); #if PHP_VERSION_ID >= 70000 php_imagick_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); #else php_imagick_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); #endif /* Initialize exceptions (ImagickDraw exception) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKDRAW_EXCEPTION_SC_NAME, NULL); #if PHP_VERSION_ID >= 70000 php_imagickdraw_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); #else php_imagickdraw_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); #endif /* Initialize exceptions (ImagickPixelIterator exception) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKPIXELITERATOR_EXCEPTION_SC_NAME, NULL); #if PHP_VERSION_ID >= 70000 php_imagickpixeliterator_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); #else php_imagickpixeliterator_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); #endif /* Initialize exceptions (ImagickPixel exception) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKPIXEL_EXCEPTION_SC_NAME, NULL); #if PHP_VERSION_ID >= 70000 php_imagickpixel_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); #else php_imagickpixel_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); #endif #ifdef IMAGICK_WITH_KERNEL /* Initialize exceptions (ImagickKernel exception) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKKERNEL_EXCEPTION_SC_NAME, NULL); #if PHP_VERSION_ID >= 70000 php_imagickkernel_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); #else php_imagickkernel_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); #endif #endif /* Initialize the class (Imagick) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICK_SC_NAME, php_imagick_class_methods); ce.create_object = php_imagick_object_new; imagick_object_handlers.clone_obj = php_imagick_clone_imagick_object; imagick_object_handlers.read_property = php_imagick_read_property; imagick_object_handlers.count_elements = php_imagick_count_elements; #if PHP_VERSION_ID >= 70000 imagick_object_handlers.offset = XtOffsetOf(php_imagick_object, zo); imagick_object_handlers.free_obj = php_imagick_object_free_storage; #endif php_imagick_sc_entry = zend_register_internal_class(&ce TSRMLS_CC); zend_class_implements(php_imagick_sc_entry TSRMLS_CC, 2, zend_ce_iterator, im_ce_countable); /* Initialize the class (ImagickDraw) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKDRAW_SC_NAME, php_imagickdraw_class_methods); ce.create_object = php_imagickdraw_object_new; imagickdraw_object_handlers.clone_obj = php_imagick_clone_imagickdraw_object; #if PHP_VERSION_ID >= 70000 imagickdraw_object_handlers.offset = XtOffsetOf(php_imagickdraw_object, zo); imagickdraw_object_handlers.free_obj = php_imagickdraw_object_free_storage; #endif php_imagickdraw_sc_entry = zend_register_internal_class(&ce TSRMLS_CC); /* Initialize the class (ImagickPixelIterator) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKPIXELITERATOR_SC_NAME, php_imagickpixeliterator_class_methods); ce.create_object = php_imagickpixeliterator_object_new; imagickpixeliterator_object_handlers.clone_obj = NULL; #if PHP_VERSION_ID >= 70000 imagickpixeliterator_object_handlers.offset = XtOffsetOf(php_imagickpixeliterator_object, zo); imagickpixeliterator_object_handlers.free_obj = php_imagickpixeliterator_object_free_storage; #endif php_imagickpixeliterator_sc_entry = zend_register_internal_class(&ce TSRMLS_CC); zend_class_implements(php_imagickpixeliterator_sc_entry TSRMLS_CC, 1, zend_ce_iterator); /* Initialize the class (ImagickPixel) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKPIXEL_SC_NAME, php_imagickpixel_class_methods); ce.create_object = php_imagickpixel_object_new; imagickpixel_object_handlers.clone_obj = php_imagick_clone_imagickpixel_object; #if PHP_VERSION_ID >= 70000 imagickpixel_object_handlers.offset = XtOffsetOf(php_imagickpixel_object, zo); imagickpixel_object_handlers.free_obj = php_imagickpixel_object_free_storage; #endif php_imagickpixel_sc_entry = zend_register_internal_class(&ce TSRMLS_CC); #ifdef IMAGICK_WITH_KERNEL /* Initialize the class (ImagickKernel) */ INIT_CLASS_ENTRY(ce, PHP_IMAGICKKERNEL_SC_NAME, php_imagickkernel_class_methods); ce.create_object = php_imagickkernel_object_new; // Disabled until can be compiled under wall correctly imagickkernel_object_handlers.get_debug_info = php_imagickkernel_get_debug_info; imagickkernel_object_handlers.clone_obj = php_imagick_clone_imagickkernel_object; #if PHP_VERSION_ID >= 70000 imagickkernel_object_handlers.offset = XtOffsetOf(php_imagickkernel_object, zo); imagickkernel_object_handlers.free_obj = php_imagickkernel_object_free_storage; #endif php_imagickkernel_sc_entry = zend_register_internal_class(&ce TSRMLS_CC); #endif php_imagick_initialize_constants (TSRMLS_C); #if defined(ZTS) && defined(PHP_WIN32) imagick_mutex = tsrm_mutex_alloc(); #endif REGISTER_INI_ENTRIES(); if (!IMAGICK_G(skip_version_check)) { checkImagickVersion(); } return SUCCESS; } PHP_MINFO_FUNCTION(imagick) { #if PHP_VERSION_ID >= 70000 smart_string formats = {0}; #else smart_str formats = {0}; #endif char **supported_formats, *buffer; unsigned long i; size_t num_formats; size_t version_number; num_formats = 0; supported_formats = MagickQueryFormats("*", &num_formats); spprintf(&buffer, 0, "%ld", (long)num_formats); php_info_print_table_start(); php_info_print_table_header(2, "imagick module", "enabled"); php_info_print_table_row(2, "imagick module version", PHP_IMAGICK_VERSION); #ifdef IMAGICK_WITH_KERNEL php_info_print_table_row(2, "imagick classes", "Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel"); #else php_info_print_table_row(2, "imagick classes", "Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator"); #endif #ifdef MagickVersion php_info_print_table_row(2, "Imagick compiled with ImageMagick version", MagickVersion); #endif php_info_print_table_row(2, "Imagick using ImageMagick library version", MagickGetVersion(&version_number)); php_info_print_table_row(2, "ImageMagick copyright", MagickGetCopyright()); php_info_print_table_row(2, "ImageMagick release date", MagickGetReleaseDate()); php_info_print_table_row(2, "ImageMagick number of supported formats: ", buffer); efree (buffer); if (supported_formats) { for (i = 0; i < num_formats; i++) { #if PHP_VERSION_ID >= 70000 if (i != 0) { smart_string_appends(&formats, ", "); } smart_string_appends(&formats, supported_formats[i]); #else smart_str_appends(&formats, supported_formats[i]); if (i != (num_formats - 1)) { smart_str_appends(&formats, ", "); } #endif IMAGICK_FREE_MAGICK_MEMORY(supported_formats[i]); } #if PHP_VERSION_ID >= 70000 smart_string_0(&formats); php_info_print_table_row(2, "ImageMagick supported formats", formats.c); smart_string_free(&formats); #else smart_str_0(&formats); php_info_print_table_row(2, "ImageMagick supported formats", formats.c); smart_str_free(&formats); #endif IMAGICK_FREE_MAGICK_MEMORY(supported_formats); } php_info_print_table_end(); DISPLAY_INI_ENTRIES(); } PHP_MSHUTDOWN_FUNCTION(imagick) { int i; // This suppresses an 'unused parameter' warning. (void)type; MagickWandTerminus(); #if HAVE_OMP_PAUSE_RESOURCE_ALL omp_pause_resource_all(omp_pause_hard); #else // Sleep for a bit to hopefully allow OpenMP to // shut down the threads it created, and avoid a segfault // This hack won't be needed once everyone is compiling ImageMagick // against a version of OpenMP that has omp_pause_resource_all() for (i = 0; i < 100 && i < IMAGICK_G(shutdown_sleep_count); i += 1) { usleep(1000); } #endif #if defined(ZTS) && defined(PHP_WIN32) tsrm_mutex_free(imagick_mutex); #endif UNREGISTER_INI_ENTRIES(); return SUCCESS; } PHP_RINIT_FUNCTION(imagick) { // This suppresses an 'unused parameter' warning. (void)type; (void)module_number; IMAGICK_G(progress_callback) = NULL; if (IMAGICK_G(set_single_thread)) { MagickSetResourceLimit(ThreadResource, 1); } return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(imagick) { php_imagick_callback* progress_callback = IMAGICK_G(progress_callback); // This suppresses an 'unused parameter' warning. (void)type; (void)module_number; if (progress_callback) { php_imagick_cleanup_progress_callback(progress_callback TSRMLS_CC); efree(progress_callback); IMAGICK_G(progress_callback) = NULL; } #if defined(ZTS) && defined(PHP_WIN32) /* We have the lock so lets release it */ if (imagick_thread_id == tsrm_thread_id()) { imagick_thread_id = (THREAD_T)NULL; tsrm_mutex_unlock(imagick_mutex); } #endif return SUCCESS; } #if ZEND_MODULE_API_NO >= 20050922 static const zend_module_dep imagick_deps[] = { ZEND_MOD_CONFLICTS("gmagick") ZEND_MOD_REQUIRED("standard") ZEND_MOD_REQUIRED("spl") ZEND_MOD_END }; #endif zend_module_entry imagick_module_entry = { #if ZEND_MODULE_API_NO >= 20050922 STANDARD_MODULE_HEADER_EX, NULL, imagick_deps, #else STANDARD_MODULE_HEADER, #endif PHP_IMAGICK_EXTNAME, php_imagick_functions, /* Functions */ PHP_MINIT(imagick), /* MINIT */ PHP_MSHUTDOWN(imagick), /* MSHUTDOWN */ PHP_RINIT(imagick), /* RINIT */ PHP_RSHUTDOWN(imagick), PHP_MINFO(imagick), /* MINFO */ PHP_IMAGICK_VERSION, STANDARD_MODULE_PROPERTIES }; #ifdef COMPILE_DL_IMAGICK ZEND_GET_MODULE(imagick) #endif imagick-3.6.0/imagick_class.c0000644000000000000000000132401514145213431014563 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" #include "php_imagick_file.h" #if MagickLibVersion > 0x628 /* {{{ proto bool Imagick::pingImageFile(resource filehandle) Query image information without reading the whole image to memory */ PHP_METHOD(Imagick, pingImageFile) { char *filename = NULL; IM_LEN_TYPE filename_len; php_imagick_object *intern; zval *zstream; php_stream *stream; zend_bool result; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!", &zstream, &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); #if PHP_VERSION_ID >= 70000 php_stream_from_zval(stream, zstream); #else php_stream_from_zval(stream, &zstream); #endif result = php_imagick_stream_handler(intern, stream, ImagickPingImageFile TSRMLS_CC); if (result == 0) { if (!EG(exception)) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to ping image from the filehandle" TSRMLS_CC); } return; } if (filename) { MagickSetImageFilename(intern->magick_wand, filename); MagickSetLastIterator(intern->magick_wand); } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::pingImageBlob(string image ) Query image information without reading the whole image to memory */ PHP_METHOD(Imagick, pingImageBlob) { char *image_string; IM_LEN_TYPE image_string_len; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &image_string, &image_string_len) == FAILURE) { return; } if (image_string_len == 0) { php_imagick_throw_exception(IMAGICK_CLASS, "Empty image string passed" TSRMLS_CC); return; } intern = Z_IMAGICK_P(getThis()); status = MagickPingImageBlob(intern->magick_wand, image_string, image_string_len); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to ping image blob" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::vignetteImage(float blackPoint, float whitePoint, int x, int y ) Adds vignette filter to the image */ PHP_METHOD(Imagick, vignetteImage) { double black_point, white_point; im_long x, y; php_imagick_object *intern; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddll", &black_point, &white_point, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickVignetteImage(intern->magick_wand, black_point, white_point, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to apply vignette filter" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::transposeImage() Creates a vertical mirror image */ PHP_METHOD(Imagick, transposeImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickTransposeImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to transpose image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::transverseImage() Creates a horizontal mirror image */ PHP_METHOD(Imagick, transverseImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickTransverseImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to transverse image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::adaptiveBlurImage(float radius, float sigma[, int channel] ) Adds adaptive blur filter to image */ PHP_METHOD(Imagick, adaptiveBlurImage) { double radius, sigma; php_imagick_object *intern; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &radius, &sigma, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAdaptiveBlurImageChannel(intern->magick_wand, channel, radius, sigma); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to adaptive blur image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::uniqueImageColors() Discards all but one of any pixel color */ PHP_METHOD(Imagick, uniqueImageColors) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickUniqueImageColors(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get unique image colors" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::contrastStretchImage(float black_point, float white_point[, int channel]) Enhances the contrast of a color image */ PHP_METHOD(Imagick, contrastStretchImage) { php_imagick_object *intern; double black_point, white_point; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &black_point, &white_point, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickContrastStretchImageChannel(intern->magick_wand, channel, black_point, white_point); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to contrast strech image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto int Imagick::getImageMatte() Returns true if the image has a matte channel otherwise false */ PHP_METHOD(Imagick, getImageMatte) { php_imagick_object *intern; MagickBooleanType matte; if (zend_parse_parameters_none() == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED ("Imagick", "getImageMatte"); intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; matte = MagickGetImageMatte(intern->magick_wand); if (matte == MagickTrue) { RETURN_TRUE; } else { RETURN_FALSE; } } /* }}} */ #endif //#if MagickLibVersion < 0x700 #endif /* {{{ proto bool Imagick::setImageMatte(bool matte) Sets the image matte channel */ PHP_METHOD(Imagick, setImageMatte) { php_imagick_object *intern; zend_bool matte; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &matte) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageMatte(intern->magick_wand, matte); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image matte" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::adaptiveResizeImage(int width, int height[, bool bestfit[, bool legacy]]]) Adaptively resize image with data dependent triangulation If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0. If false, the calculations should produce the same results as ImageMagick CLI does. */ PHP_METHOD(Imagick, adaptiveResizeImage) { php_imagick_object *intern; MagickBooleanType status; im_long width, height, new_width, new_height; zend_bool bestfit = 0; zend_bool legacy = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll|bb", &width, &height, &bestfit, &legacy) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!php_imagick_thumbnail_dimensions(intern->magick_wand, bestfit, width, height, &new_width, &new_height, legacy)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid image geometry" TSRMLS_CC); return; } status = MagickAdaptiveResizeImage(intern->magick_wand, new_width, new_height); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to adaptive resize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::sketchImage(float radius, float sigma, float angle) Simulates a pencil sketch */ PHP_METHOD(Imagick, sketchImage) { double radius, sigma, angle; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &radius, &sigma, &angle) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSketchImage(intern->magick_wand, sigma, radius, angle); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to sketch image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::shadeImage(bool gray, float azimuth, float elevation) Shines a distant light on an image */ PHP_METHOD(Imagick, shadeImage) { php_imagick_object *intern; MagickBooleanType status; double azimuth, elevation; zend_bool gray; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "bdd", &gray, &azimuth, &elevation) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickShadeImage(intern->magick_wand, gray, azimuth, elevation); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to shade image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto int Imagick::getSizeOffset() Returns the size offset associated with the Imagick object */ PHP_METHOD(Imagick, getSizeOffset) { php_imagick_object *intern; ssize_t offset; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickGetSizeOffset(intern->magick_wand, &offset); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get size offset" TSRMLS_CC); return; } RETVAL_LONG(offset); } /* }}} */ /* {{{ proto bool Imagick::setSizeOffset(int columns, int rows, int offset) Sets the size and offset of the Imagick object */ PHP_METHOD(Imagick, setSizeOffset) { php_imagick_object *intern; im_long columns, rows, offset; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &columns, &rows, &offset) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetSizeOffset(intern->magick_wand, columns, rows, offset); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set size offset" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::adaptiveSharpenImage(float radius, float sigma[, int channel]) Adaptively sharpen image with data dependent triangulation */ PHP_METHOD(Imagick, adaptiveSharpenImage) { php_imagick_object *intern; MagickBooleanType status; double radius, sigma; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &radius, &sigma, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAdaptiveSharpenImageChannel(intern->magick_wand, channel, radius, sigma); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to adaptive sharpen image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::randomThresholdImage(float low, float high[, int channel]) Changes the value of individual pixels */ PHP_METHOD(Imagick, randomThresholdImage) { php_imagick_object *intern; double low, high; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &low, &high, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickRandomThresholdImageChannel(intern->magick_wand, channel, low, high); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to random threshold image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto string Imagick::roundCornersImage(float x_rounding, float y_rounding[, float stroke_width = 10[, float displace = 5[, float size_correction = -6]]] ) Rounds image corners */ PHP_METHOD(Imagick, roundCornersImage) { char *old_locale; double x_rounding, y_rounding; DrawingWand *draw; MagickWand *mask_image; PixelWand *color; php_imagick_object *intern; long image_width, image_height; MagickBooleanType status; double stroke_width = 10, displace = 5, correction = -6; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|ddd", &x_rounding, &y_rounding, &stroke_width, &displace, &correction) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; image_width = MagickGetImageWidth(intern->magick_wand); image_height = MagickGetImageHeight(intern->magick_wand); if (!image_width || !image_height) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to round corners on empty image" TSRMLS_CC); return; } status = MagickSetImageMatte(intern->magick_wand, MagickTrue); if (status == MagickFalse) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to set image matte" TSRMLS_CC); return; } /* Here we go.. */ color = NewPixelWand(); if (!color) { php_imagick_throw_exception (IMAGICK_CLASS, "Failed to allocate PixelWand structure" TSRMLS_CC); return; } draw = NewDrawingWand(); if (!draw) { DestroyPixelWand (color); php_imagick_throw_exception (IMAGICK_CLASS, "Failed to allocate DrawingWand structure" TSRMLS_CC); return; } mask_image = NewMagickWand(); if (!mask_image) { DestroyPixelWand (color); DestroyDrawingWand (draw); php_imagick_throw_exception (IMAGICK_CLASS, "Failed to allocate MagickWand structure" TSRMLS_CC); return; } #define exit_cleanup() \ if (color != NULL) color = DestroyPixelWand(color); \ if (draw != NULL) draw = DestroyDrawingWand(draw); \ if (mask_image != NULL) mask_image = DestroyMagickWand(mask_image); status = PixelSetColor(color, "transparent"); if (status == MagickFalse) { exit_cleanup(); php_imagick_throw_exception(IMAGICK_CLASS, "Unable to set pixel color" TSRMLS_CC); return; } status = MagickNewImage(mask_image, image_width, image_height, color); if (status == MagickFalse) { exit_cleanup(); php_imagick_throw_exception(IMAGICK_CLASS, "Unable to allocate mask image" TSRMLS_CC); return; } MagickSetImageBackgroundColor(mask_image, color); status = PixelSetColor(color, "white"); if (status == MagickFalse) { exit_cleanup(); php_imagick_throw_exception(IMAGICK_CLASS, "Unable to set pixel color" TSRMLS_CC); return; } DrawSetFillColor(draw, color); status = PixelSetColor(color, "black"); if (status == MagickFalse) { exit_cleanup(); php_imagick_throw_exception(IMAGICK_CLASS, "Unable to set pixel color" TSRMLS_CC); return; } DrawSetStrokeColor(draw, color); DrawSetStrokeWidth(draw, stroke_width); DrawRoundRectangle(draw, displace, displace, image_width + correction, image_height + correction, x_rounding, y_rounding); old_locale = php_imagick_set_locale (TSRMLS_C); status = MagickDrawImage(mask_image, draw); php_imagick_restore_locale (old_locale); if (old_locale) efree (old_locale); if (status == MagickFalse) { exit_cleanup(); php_imagick_throw_exception(IMAGICK_CLASS, "Unable to draw on image" TSRMLS_CC); return; } #if MagickLibVersion >= 0x700 status = MagickCompositeImage(intern->magick_wand, mask_image, DstInCompositeOp, MagickTrue, 0, 0); #else status = MagickCompositeImage(intern->magick_wand, mask_image, DstInCompositeOp, 0, 0); #endif if (status == MagickFalse) { exit_cleanup(); php_imagick_throw_exception(IMAGICK_CLASS, "Unable to composite image" TSRMLS_CC); return; } exit_cleanup(); RETURN_TRUE; #undef exit_cleanup } /* }}} */ /* {{{ proto int Imagick::getIteratorIndex() Returns the index of the current active image */ PHP_METHOD(Imagick, getIteratorIndex) { MagickBooleanType status; php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickGetIteratorIndex(intern->magick_wand); ZVAL_LONG(return_value, (long)status); return; } /* }}} */ /* {{{ proto bool Imagick::setIteratorIndex(int index) Sets the index of the Imagick object */ PHP_METHOD(Imagick, setIteratorIndex) { const im_long index; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetIteratorIndex(intern->magick_wand, index); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set iterator index" TSRMLS_CC); return; } intern->next_out_of_bound = 0; RETURN_TRUE; } /* }}} */ #if MagickLibVersion < 0x700 /* {{{ proto Imagick Imagick::transformImage(string crop, string geometry ) Comfortability method for crop and resize */ PHP_METHOD(Imagick, transformImage) { char *crop, *geometry; IM_LEN_TYPE crop_len, geometry_len; MagickWand *transformed; php_imagick_object *intern, *intern_return; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &crop, &crop_len, &geometry, &geometry_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; transformed = MagickTransformImage(intern->magick_wand, crop, geometry); if (!transformed) { php_imagick_convert_imagick_exception(intern->magick_wand, "Transforming image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, transformed); return; } #endif //#if MagickLibVersion < 0x700 /* }}} */ #endif #if MagickLibVersion > 0x630 #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::setImageOpacity(float opacity) Sets the image to the specified opacity level */ PHP_METHOD(Imagick, setImageOpacity) { double opacity; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &opacity) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageOpacity(intern->magick_wand, opacity); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image opacity" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion >= 0x700 /* {{{ proto bool Imagick::setImageAlpha(float alpha) Sets the image to the specified alpha level */ PHP_METHOD(Imagick, setImageAlpha) { double alpha; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &alpha) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageAlpha(intern->magick_wand, alpha); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image alpha" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::orderedPosterizeImage(string threshold_map[, int CHANNEL]) Performs an ordered dither */ PHP_METHOD(Imagick, orderedPosterizeImage) { char *map; IM_LEN_TYPE map_len; MagickBooleanType status; php_imagick_object *intern; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &map, &map_len, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickOrderedPosterizeImageChannel(intern->magick_wand, channel, map); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to posterize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion < 0x700 #endif //#if MagickLibVersion > 0x630 #if MagickLibVersion > 0x631 /* {{{ proto bool Imagick::polaroidImage(ImagickDraw properties, double angle ) Simulates a Polaroid picture */ PHP_METHOD(Imagick, polaroidImage) { zval *objvar; php_imagick_object *intern; MagickBooleanType status; php_imagickdraw_object *internd; double angle; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Od", &objvar, php_imagickdraw_sc_entry, &angle) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; internd = Z_IMAGICKDRAW_P(objvar); #if MagickLibVersion >= 0x700 { PixelInterpolateMethod method = BilinearInterpolatePixel; char *caption = "TODO FIXME"; status = MagickPolaroidImage(intern->magick_wand,internd->drawing_wand,caption,angle,method); } #else status = MagickPolaroidImage(intern->magick_wand, internd->drawing_wand, angle); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to polaroid image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto string Imagick::getImageProperty(string name ) Eeturns a value associated with the specified property */ PHP_METHOD(Imagick, getImageProperty) { php_imagick_object *intern; char *name, *value; IM_LEN_TYPE name_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; value = MagickGetImageProperty(intern->magick_wand, name); if (value) { IM_ZVAL_STRING(return_value, (char *)value); IMAGICK_FREE_MAGICK_MEMORY(value); return; } RETURN_FALSE; } /* }}} */ /* {{{ proto bool Imagick::setImageProperty(string name, string value ) returns a value associated with the specified property */ PHP_METHOD(Imagick, setImageProperty) { php_imagick_object *intern; char *name, *value; IM_LEN_TYPE name_len, value_len; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &value, &value_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageProperty(intern->magick_wand, name, value); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image property" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::deleteImageProperty(string name) Deletes an image property. */ PHP_METHOD(Imagick, deleteImageProperty) { php_imagick_object *intern; char *name; IM_LEN_TYPE name_len; MagickBooleanType status; Image *image; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; image = GetImageFromMagickWand(intern->magick_wand); status = DeleteImageProperty(image, name); if (status == MagickFalse) { RETURN_FALSE; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::identifyFormat(string embedText) Replaces any embedded formatting characters with the appropriate image property and returns the interpreted text. See http://www.imagemagick.org/script/escape.php for escape sequences. */ PHP_METHOD(Imagick, identifyFormat) { php_imagick_object *intern; char *embedText; IM_LEN_TYPE embedText_len; char *result; ImageInfo *image_info; Image *image; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &embedText, &embedText_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) { return; } image_info = AcquireImageInfo(); image = GetImageFromMagickWand(intern->magick_wand); #if MagickLibVersion >= 0x700 { //TODO - handle exception info. ExceptionInfo *exception = NULL; result = InterpretImageProperties(image_info, image, embedText, exception); } #else result = InterpretImageProperties(image_info, image, embedText); #endif image_info = DestroyImageInfo(image_info); if (result) { #if PHP_VERSION_ID >= 70000 RETVAL_STRING(result); #else RETVAL_STRING(result, 1); #endif IMAGICK_FREE_MAGICK_MEMORY(result); return; } RETURN_FALSE; } /* }}} */ /* {{{ proto int Imagick::getImageInterpolateMethod() Returns the interpolation method for the sepcified image. */ PHP_METHOD(Imagick, getImageInterpolateMethod) { php_imagick_object *intern; long interpolate; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; interpolate = MagickGetImageInterpolateMethod(intern->magick_wand); RETVAL_LONG(interpolate); } /* }}} */ #if IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD /* {{{ proto bool Imagick::setImageInterpolateMethod(int method) Sets the image interpolate pixel method. */ PHP_METHOD(Imagick, setImageInterpolateMethod) { php_imagick_object *intern; im_long interpolate; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &interpolate) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageInterpolateMethod(intern->magick_wand, interpolate); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set the image interpolate method" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD /* {{{ proto bool Imagick::linearStretchImage(float blackPoint, float whitePoint) Stretches with saturation the image intensity. */ PHP_METHOD(Imagick, linearStretchImage) { php_imagick_object *intern; double blackPoint, whitePoint; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &blackPoint, &whitePoint) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickLinearStretchImage(intern->magick_wand, blackPoint, whitePoint); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to linear strech image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto int Imagick::getImageLength() returns the image length in bytes */ PHP_METHOD(Imagick, getImageLength) { php_imagick_object *intern; MagickSizeType length; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGetImageLength(intern->magick_wand, &length); if (status == MagickFalse) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to acquire image length" TSRMLS_CC); return; } RETVAL_LONG(length); } /* }}} */ /* {{{ proto bool Imagick::extentImage(int width, int height, int x, int y ) Sets the image size */ PHP_METHOD(Imagick, extentImage) { php_imagick_object *intern; MagickBooleanType status; im_long width, height, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &width, &height, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickExtentImage(intern->magick_wand, width, height, x, y); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to extent image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x633 /* {{{ proto Imagick Imagick::getImageOrientation(void) Gets the image orientation */ PHP_METHOD(Imagick, getImageOrientation) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; RETVAL_LONG(MagickGetImageOrientation(intern->magick_wand)); } /* }}} */ /* {{{ proto Imagick Imagick::setImageOrientation(int orientation) Sets the image orientation */ PHP_METHOD(Imagick, setImageOrientation) { php_imagick_object *intern; im_long orientation; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &orientation) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageOrientation(intern->magick_wand, orientation); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image orientation" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion > 0x634 #if MagickLibVersion < 0x700 /* {{{ proto Imagick Imagick::paintFloodfillImage(mixed fill, float fuzz, mixed bordercolor, int x, int y[, int channel]) Sets the image orientation */ PHP_METHOD(Imagick, paintFloodfillImage) { php_imagick_object *intern; zval *fill_param, *border_param; im_long x, y, channel = DefaultChannels; double fuzz; MagickBooleanType status; PixelWand *fill_wand, *border_wand = NULL; zend_bool fill_allocated = 0, border_allocated = 0; IMAGICK_METHOD_DEPRECATED ("Imagick", "paintFloodfillImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zdzll|l", &fill_param, &fuzz, &border_param, &x, &y, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; fill_wand = php_imagick_zval_to_pixelwand (fill_param, IMAGICK_CLASS, &fill_allocated TSRMLS_CC); if (!fill_wand) return; if (Z_TYPE_P(border_param) == IS_NULL) { status = MagickPaintFloodfillImage(intern->magick_wand, channel, fill_wand, fuzz, NULL, x, y); } else { border_wand = php_imagick_zval_to_pixelwand (border_param, IMAGICK_CLASS, &border_allocated TSRMLS_CC); if (!border_wand) { if (fill_allocated) DestroyPixelWand (fill_wand); return; } status = MagickPaintFloodfillImage(intern->magick_wand, channel, fill_wand, fuzz, border_wand, x, y); } if (fill_allocated) DestroyPixelWand (fill_wand); if (border_wand) DestroyPixelWand (border_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to paint floodfill image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion < 0x700 #endif #endif #if MagickLibVersion > 0x635 /* {{{ proto Imagick Imagick::clutImage(Imagick lookup[, int channel] ) Replaces colors in the image from a color lookup table */ PHP_METHOD(Imagick, clutImage) { zval *objvar; php_imagick_object *intern, *lookup; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", &objvar, php_imagick_sc_entry, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; lookup = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (lookup->magick_wand) == 0) return; status = MagickClutImageChannel(intern->magick_wand, channel, lookup->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to replace colors in the image from a color lookup table" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::getImageProperties([string pattern, bool values] ) Returns all the property names that match the specified pattern */ PHP_METHOD(Imagick, getImageProperties) { zend_bool values = 1; char *pattern = "*", **properties, *property; IM_LEN_TYPE pattern_len; unsigned long i; size_t properties_count; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sb", &pattern, &pattern_len, &values) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; properties = MagickGetImageProperties(intern->magick_wand, pattern, &properties_count); if (!properties) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to get image properties" TSRMLS_CC); return; } array_init(return_value); if (values) { for (i = 0; i < properties_count; i++) { property = MagickGetImageProperty(intern->magick_wand, properties[i]); IM_add_assoc_string(return_value, properties[i], property); IMAGICK_FREE_MAGICK_MEMORY(property); } } else { for (i = 0; i < properties_count; i++) { IM_add_next_index_string(return_value, properties[i]); } } IMAGICK_FREE_MAGICK_MEMORY(properties); return; } /* }}} */ /* {{{ proto Imagick Imagick::getImageProfiles([string pattern, bool values] ) Returns all the profile names that match the specified pattern */ PHP_METHOD(Imagick, getImageProfiles) { zend_bool values = 1; char *pattern = "*", **profiles, *profile; IM_LEN_TYPE pattern_len; unsigned long i; php_imagick_object *intern; size_t length, profiles_count; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sb", &pattern, &pattern_len, &values) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; profiles = MagickGetImageProfiles(intern->magick_wand, pattern, &profiles_count); if (!profiles) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to get image profiles" TSRMLS_CC); return; } array_init(return_value); if (values) { for (i = 0; i < profiles_count; i++) { profile = (char *)MagickGetImageProfile(intern->magick_wand, profiles[i], &length); #if PHP_VERSION_ID >= 70000 add_assoc_stringl(return_value, profiles[i], profile, length); #else add_assoc_stringl(return_value, profiles[i], profile, length, 1); #endif IMAGICK_FREE_MAGICK_MEMORY(profile); } } else { for (i = 0; i < profiles_count; i++) { IM_add_next_index_string(return_value, profiles[i]); } } IMAGICK_FREE_MAGICK_MEMORY(profiles); return; } /* }}} */ #endif #if MagickLibVersion > 0x635 /* {{{ proto Imagick Imagick::distortImage(int distortMethod, array arguments, bool bestfit ) Distorts an image using various distortion methods */ PHP_METHOD(Imagick, distortImage) { php_imagick_object *intern; double *arguments; im_long distort_method, elements; zend_bool bestfit; zval *arg_array; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lab", &distort_method, &arg_array, &bestfit) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; arguments = php_imagick_zval_to_double_array(arg_array, &elements TSRMLS_CC); if (!arguments) { php_imagick_throw_exception (IMAGICK_CLASS, "Can't read argument array" TSRMLS_CC); return; } status = MagickDistortImage(intern->magick_wand, distort_method, elements, arguments, bestfit); efree(arguments); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to distort the image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::writeImageFile(resource $handle[, string $format]) Writes image to an open filehandle. Optional parameter format defines the format the file is stored with */ PHP_METHOD(Imagick, writeImageFile) { php_imagick_object *intern; zval *zstream; php_stream *stream; zend_bool result; char *format = NULL; IM_LEN_TYPE format_len; char *orig_name = NULL, *buffer; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!", &zstream, &format, &format_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; // Get the current name if (format) { orig_name = MagickGetImageFilename (intern->magick_wand); spprintf (&buffer, 0, "%s:", format); MagickSetImageFilename (intern->magick_wand, buffer); efree (buffer); } #if PHP_VERSION_ID >= 70000 php_stream_from_zval(stream, zstream); #else php_stream_from_zval(stream, &zstream); #endif result = php_imagick_stream_handler(intern, stream, ImagickWriteImageFile TSRMLS_CC); /* Restore the original name after write */ if (orig_name) { MagickSetImageFilename (intern->magick_wand, orig_name); MagickRelinquishMemory (orig_name); } if (result == 0) { /* php_stream_cast returns warning on some streams but still does not return FAILURE */ if (!EG(exception)) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to write image to the filehandle" TSRMLS_CC); return; } return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::writeImagesFile(resource $handle[, string $format]) Writes images to an open filehandle */ PHP_METHOD(Imagick, writeImagesFile) { php_imagick_object *intern; zval *zstream; php_stream *stream; zend_bool result; char *format = NULL; IM_LEN_TYPE format_len; char *orig_name = NULL, *buffer; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!", &zstream, &format, &format_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; // Get the current name if (format) { orig_name = MagickGetImageFilename (intern->magick_wand); spprintf (&buffer, 0, "%s:", format); MagickSetImageFilename (intern->magick_wand, buffer); efree (buffer); } #if PHP_VERSION_ID >= 70000 php_stream_from_zval(stream, zstream); #else php_stream_from_zval(stream, &zstream); #endif result = php_imagick_stream_handler(intern, stream, ImagickWriteImagesFile TSRMLS_CC); /* Restore the original name after write */ if (orig_name) { MagickSetImageFilename (intern->magick_wand, orig_name); MagickRelinquishMemory (orig_name); } if (result == 0) { if (!EG(exception)) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to write images to the filehandle" TSRMLS_CC); return; } return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::resetImagePage(string page) Resets the page canvas and position */ PHP_METHOD(Imagick, resetImagePage) { php_imagick_object *intern; MagickBooleanType status; char *page; IM_LEN_TYPE page_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &page, &page_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickResetImagePage(intern->magick_wand, page); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to reset image page" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::getImageClipMask() Gets image clip mask */ #if MagickLibVersion < 0x700 PHP_METHOD(Imagick, getImageClipMask) { MagickWand *tmp_wand; php_imagick_object *intern; php_imagick_object *intern_return; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickGetImageClipMask(intern->magick_wand); /* No magick is going to happen */ if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image clip mask" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } #endif /* }}} */ /* {{{ proto bool Imagick::setImageClipMask(Imagick clip_mask) Sets the image clip mask */ #if MagickLibVersion < 0x700 PHP_METHOD(Imagick, setImageClipMask) { php_imagick_object *intern; php_imagick_object *clip_mask; MagickBooleanType status; zval *objvar; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objvar, php_imagick_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; clip_mask = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (clip_mask->magick_wand) == 0) return; status = MagickSetImageClipMask(intern->magick_wand, clip_mask->magick_wand); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image clip mask" TSRMLS_CC); return; } RETURN_TRUE; } #endif /* }}} */ /* {{{ proto bool Imagick::animateImages(string server_name) Animates an image or image sequence */ PHP_METHOD(Imagick, animateImages) { php_imagick_object *intern; MagickBooleanType status; char *server_name; IM_LEN_TYPE server_name_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &server_name, &server_name_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; /* TODO: should this call be there? Not sure */ (void)MagickSetFirstIterator(intern->magick_wand); status = MagickAnimateImages(intern->magick_wand, server_name); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to animate images" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::recolorImage(array matrix) Translate, scale, shear, or rotate image colors */ PHP_METHOD(Imagick, recolorImage) { php_imagick_object *intern; MagickBooleanType status; im_long num_elements; zval *matrix; double *array; unsigned long order; IMAGICK_METHOD_DEPRECATED ("Imagick", "recolorImage"); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &matrix) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; array = php_imagick_zval_to_double_array(matrix, &num_elements TSRMLS_CC); if (!array) { php_imagick_throw_exception (IMAGICK_CLASS, "The map contains disallowed characters" TSRMLS_CC); return; } order = (unsigned long)sqrt(num_elements); if ((order * order) != num_elements) { efree(array); php_imagick_throw_exception(IMAGICK_CLASS, "The color matrix must contain a square number of elements" TSRMLS_CC); return; } status = MagickRecolorImage(intern->magick_wand, order, array); efree(array); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to recolor image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #endif #endif #if MagickLibVersion > 0x636 PHP_METHOD(Imagick, setFont) { php_imagick_object *intern; char *font, *absolute; IM_LEN_TYPE font_len; MagickBooleanType status; php_imagick_rw_result_t rc; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &font, &font_len) == FAILURE) { return; } /* Check that no empty string is passed */ if (font_len == 0) { php_imagick_throw_exception(IMAGICK_CLASS, "Can not set empty font" TSRMLS_CC); return; } intern = Z_IMAGICK_P(getThis()); /* And if it wasn't */ if (!php_imagick_check_font(font, font_len TSRMLS_CC)) { if (!(absolute = expand_filepath(font, NULL TSRMLS_CC))) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to set font" TSRMLS_CC); return; } if ((rc = php_imagick_file_access_check (absolute TSRMLS_CC)) != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, absolute TSRMLS_CC); efree(absolute); return; } status = MagickSetFont(intern->magick_wand, absolute); efree(absolute); } else { status = MagickSetFont(intern->magick_wand, font); } /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set font" TSRMLS_CC); return; } RETURN_TRUE; } PHP_METHOD(Imagick, getFont) { char *font; php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); font = MagickGetFont(intern->magick_wand); if (font) { IM_ZVAL_STRING(return_value, font); IMAGICK_FREE_MAGICK_MEMORY(font); return; } RETURN_FALSE; } PHP_METHOD(Imagick, setPointSize) { php_imagick_object *intern; double point_size; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &point_size) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetPointsize(intern->magick_wand, point_size); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set point size" TSRMLS_CC); return; } RETURN_TRUE; } PHP_METHOD(Imagick, getPointSize) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_DOUBLE(MagickGetPointsize(intern->magick_wand)); } PHP_METHOD(Imagick, mergeImageLayers) { php_imagick_object *intern, *intern_return; im_long layer_method; MagickWand *merged; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &layer_method) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; /* TODO: SHOULD THIS BE HERE? Reset the iterator */ (void)MagickSetFirstIterator(intern->magick_wand); merged = MagickMergeImageLayers(intern->magick_wand, layer_method); /* No magick is going to happen */ if (!merged) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to merge image layers" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, merged); return; } #endif #if MagickLibVersion > 0x637 /* {{{ proto bool Imagick::floodfillPaintImage(mixed fill, float fuzz, mixed bordercolor, int x, int y, bool invert[, int CHANNEL]) Changes the color value of any pixel that matches target */ PHP_METHOD(Imagick, floodfillPaintImage) { php_imagick_object *intern; MagickBooleanType status; zval *fill_param, *border_param; im_long x, y, channel = IM_DEFAULT_CHANNEL; zend_bool invert; double fuzz; PixelWand *fill_wand, *border_wand; zend_bool fill_allocated = 0, border_allocated = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zdzllb|l", &fill_param, &fuzz, &border_param, &x, &y, &invert, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; fill_wand = php_imagick_zval_to_pixelwand (fill_param, IMAGICK_CLASS, &fill_allocated TSRMLS_CC); if (!fill_wand) return; border_wand = php_imagick_zval_to_pixelwand (border_param, IMAGICK_CLASS, &border_allocated TSRMLS_CC); if (!border_wand) { if (fill_allocated) fill_wand = DestroyPixelWand (fill_wand); return; } #if MagickLibVersion >= 0x700 status = MagickFloodfillPaintImageChannel(intern->magick_wand, channel, fill_wand, fuzz, border_wand, x, y, invert); #else status = MagickFloodfillPaintImage(intern->magick_wand, channel, fill_wand, fuzz, border_wand, x, y, invert); #endif if (fill_allocated) fill_wand = DestroyPixelWand (fill_wand); if (border_allocated) border_wand = DestroyPixelWand (border_wand); if (status == MagickFalse) { php_imagick_convert_imagick_exception (intern->magick_wand, "Unable to floodfill paint image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::opaquePaintImage(mixed target, mixed fill, float fuzz, bool invert[, int CHANNEL]) Changes any pixel that matches color with the color defined by fill. */ PHP_METHOD(Imagick, opaquePaintImage) { php_imagick_object *intern; MagickBooleanType status; zval *fill_param, *target_param; zend_bool invert; double fuzz; im_long channel = IM_DEFAULT_CHANNEL; PixelWand *fill_wand, *target_wand; zend_bool fill_allocated = 0, target_allocated = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zzdb|l", &fill_param, &target_param, &fuzz, &invert, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; fill_wand = php_imagick_zval_to_pixelwand (fill_param, IMAGICK_CLASS, &fill_allocated TSRMLS_CC); if (!fill_wand) return; target_wand = php_imagick_zval_to_pixelwand (target_param, IMAGICK_CLASS, &target_allocated TSRMLS_CC); if (!target_wand) { if (fill_allocated) DestroyPixelWand (fill_wand); return; } status = MagickOpaquePaintImageChannel(intern->magick_wand, channel, fill_wand, target_wand, fuzz, invert); if (fill_allocated) DestroyPixelWand (fill_wand); if (target_allocated) DestroyPixelWand (target_wand); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to opaque paint image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::transparentPaintImage(mixed target, float alpha, float fuzz, bool invert) Changes any pixel that matches color with the color defined by fill */ PHP_METHOD(Imagick, transparentPaintImage) { php_imagick_object *intern; MagickBooleanType status; zval *target_param; zend_bool invert; double fuzz, alpha; PixelWand *target_wand; zend_bool target_allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zddb", &target_param, &alpha, &fuzz, &invert) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; target_wand = php_imagick_zval_to_pixelwand (target_param, IMAGICK_CLASS, &target_allocated TSRMLS_CC); if (!target_wand) return; status = MagickTransparentPaintImage(intern->magick_wand, target_wand, alpha, fuzz, invert); if (target_allocated) target_wand = DestroyPixelWand (target_wand); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to paint transparent image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::setImageAlphaChannel(int ALPHACHANNEL ) Activates, deactivates, resets, or sets the alpha channel */ PHP_METHOD(Imagick, setImageAlphaChannel) { php_imagick_object *intern; im_long alpha_channel; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &alpha_channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; // TODO - allegedly only // ActivateAlphaChannel, DeactivateAlphaChannel, OpaqueAlphaChannel, or SetAlphaChannel. // should be allowed? status = MagickSetImageAlphaChannel(intern->magick_wand, alpha_channel); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image alpha channel" TSRMLS_CC); return; } RETURN_TRUE; } #endif #if MagickLibVersion > 0x638 /* {{{ proto Imagick Imagick::liquidRescaleImage(int cols, int rows, float delta_x, float rigidity ) Rescales image with seam carving */ PHP_METHOD(Imagick, liquidRescaleImage) { php_imagick_object *intern; im_long cols, rows; double delta_x, rigidity; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lldd", &cols, &rows, &delta_x, &rigidity) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickLiquidRescaleImage(intern->magick_wand, cols, rows, delta_x, rigidity); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to liquid rescale image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::decipherImage(string passphrase) Converts cipher pixels to plain pixels */ PHP_METHOD(Imagick, decipherImage) { php_imagick_object *intern; MagickBooleanType status; char *passphrase; IM_LEN_TYPE passphrase_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &passphrase, &passphrase_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickDecipherImage(intern->magick_wand, passphrase); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to decipher image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::encipherImage(string passphrase) Converts plain pixels to cipher pixels */ PHP_METHOD(Imagick, encipherImage) { php_imagick_object *intern; MagickBooleanType status; char *passphrase; IM_LEN_TYPE passphrase_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &passphrase, &passphrase_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickEncipherImage(intern->magick_wand, passphrase); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to encipher image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x639 /* {{ proto bool Imagick::setGravity(int GRAVITY) Sets the gravity value */ PHP_METHOD(Imagick, setGravity) { php_imagick_object *intern; im_long gravity; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &gravity) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (MagickSetGravity(intern->magick_wand, gravity) == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set gravity" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{ proto int Imagick::getGravity() Gets the gravity value */ PHP_METHOD(Imagick, getGravity) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_LONG(MagickGetGravity(intern->magick_wand)); } /* }}} */ /* {{ proto Imagick Imagick::getImageChannelRange(int CHANNEL) Gets the image channel's range */ PHP_METHOD(Imagick, getImageChannelRange) { php_imagick_object *intern; im_long channel; double maxima, minima; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (MagickGetImageChannelRange(intern->magick_wand, channel, &minima, &maxima) == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get channel range" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "minima", minima); add_assoc_double(return_value, "maxima", maxima); return; } /* }}} */ /* {{{ proto bool Imagick::getImageAlphaChannel() Returns true if the image has an alpha channel value and false if not, aka the image is RGB rather than RGBA or CMYK rather than CMYKA. */ PHP_METHOD(Imagick, getImageAlphaChannel) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; RETVAL_BOOL(MagickGetImageAlphaChannel(intern->magick_wand)); } /* }}} */ #endif #if MagickLibVersion > 0x642 /* {{{ proto float Imagick::getImageChannelDistortions(Imagick reference, int METRICTYPE[, int CHANNEL]) Compares one or more image channels of an image to a reconstructed image and returns the specified distortion metrics */ PHP_METHOD(Imagick, getImageChannelDistortions) { php_imagick_object *intern; php_imagick_object *intern_reference; zval *reference_param; double distortion; im_long metric, channel = DefaultChannels; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol|l", &reference_param, php_imagick_sc_entry, &metric, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_reference = Z_IMAGICK_P(reference_param); if (php_imagick_ensure_not_empty (intern_reference->magick_wand) == 0) return; status = MagickGetImageChannelDistortion(intern->magick_wand, intern_reference->magick_wand, channel, metric, &distortion); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image channel distortion metrics" TSRMLS_CC); return; } RETVAL_DOUBLE(distortion); } /* }}} */ #endif #if MagickLibVersion > 0x643 /* {{{ proto int Imagick::getImageGravity() Gets the image gravity */ PHP_METHOD(Imagick, getImageGravity) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; RETVAL_LONG(MagickGetImageGravity(intern->magick_wand)); } /* }}} */ /* {{{ proto bool Imagick::setImageGravity(int GRAVITY) Sets the image gravity */ PHP_METHOD(Imagick, setImageGravity) { php_imagick_object *intern; MagickBooleanType status; im_long gravity; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &gravity) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageGravity(intern->magick_wand, gravity); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image gravity" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x645 /* {{ proto Imagick Imagick::importImagePixels(int x, int y, int width, int height, string map, int STORAGE, array pixels) Accepts pixel data and stores it in the image at the location you specify */ PHP_METHOD(Imagick, importImagePixels) { double *double_array; im_long *long_array; unsigned char *char_array; php_imagick_object *intern; MagickBooleanType status; im_long storage, num_elements; im_long x, y, width, height; IM_LEN_TYPE map_len; char *map; zval *pixels; HashTable *array; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llllsla", &x, &y, &width, &height, &map, &map_len, &storage, &pixels) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (x < 0 || y < 0) { php_imagick_throw_exception (IMAGICK_CLASS, "The coordinates must be non-negative" TSRMLS_CC); return; } if (width <= 0 || height <= 0) { php_imagick_throw_exception(IMAGICK_CLASS, "The width and height must be greater than zero" TSRMLS_CC); return; } array = Z_ARRVAL_P(pixels); if (zend_hash_num_elements(array) != ((width * height) * map_len)) { php_imagick_throw_exception(IMAGICK_CLASS, "The map contains incorrect number of elements" TSRMLS_CC); return; } else { if (!php_imagick_validate_map(map TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "The map contains disallowed characters" TSRMLS_CC); return; } } switch (storage) { case FloatPixel: case DoublePixel: /* Use doubles */ storage = DoublePixel; double_array = php_imagick_zval_to_double_array(pixels, &num_elements TSRMLS_CC); if (!double_array) { php_imagick_throw_exception(IMAGICK_CLASS, "The map must contain only numeric values" TSRMLS_CC); return; } status = MagickImportImagePixels(intern->magick_wand, x, y, width, height, map, storage, double_array); efree(double_array); break; case ShortPixel: #if MagickLibVersion < 0x700 case IntegerPixel: #endif case LongPixel: /* Use longs */ storage = LongPixel; long_array = php_imagick_zval_to_long_array(pixels, &num_elements TSRMLS_CC); if (!long_array) { php_imagick_throw_exception(IMAGICK_CLASS, "The map must contain only numeric values" TSRMLS_CC); return; } status = MagickImportImagePixels(intern->magick_wand, x, y, width, height, map, storage, long_array); efree(long_array); break; case CharPixel: char_array = php_imagick_zval_to_char_array(pixels, &num_elements TSRMLS_CC); if (!char_array) { php_imagick_throw_exception(IMAGICK_CLASS, "The character array contains incorrect values" TSRMLS_CC); return; } status = MagickImportImagePixels(intern->magick_wand, x, y, width, height, map, storage, char_array); efree(char_array); break; default: php_imagick_throw_exception(IMAGICK_CLASS, "Unknown storage format" TSRMLS_CC); return; break; } if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to import image pixels" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ PHP_METHOD(Imagick, deskewImage) { php_imagick_object *intern; MagickBooleanType status; double threshold; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &threshold) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickDeskewImage(intern->magick_wand, threshold); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to deskew image" TSRMLS_CC); return; } RETURN_TRUE; } #if PHP_IMAGICK_HAVE_HOUGHLINE /* {{{ proto bool Imagick::houghLineImage(int width, int height, float threshold) Draw hough lines for the image */ PHP_METHOD(Imagick, houghLineImage) { php_imagick_object *intern; MagickBooleanType status; double threshold; im_long width, height; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lld", &width, &height, &threshold) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickHoughLineImage(intern->magick_wand, width, height, threshold); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to Hough line image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif PHP_METHOD(Imagick, segmentImage) { php_imagick_object *intern; MagickBooleanType status; im_long colorspace; zend_bool verbose = 0; double cluster_threshold, smooth_threshold; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ldd|b", &colorspace, &cluster_threshold, &smooth_threshold, &verbose) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSegmentImage(intern->magick_wand, colorspace, verbose, cluster_threshold, smooth_threshold); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to segment image" TSRMLS_CC); return; } RETURN_TRUE; } PHP_METHOD(Imagick, sparseColorImage) { php_imagick_object *intern; MagickBooleanType status; im_long num_elements, sparse_method, channel = IM_DEFAULT_CHANNEL; zval *arguments; double *double_array; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "la|l", &sparse_method, &arguments, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; double_array = php_imagick_zval_to_double_array(arguments, &num_elements TSRMLS_CC); if (!double_array) { php_imagick_throw_exception(IMAGICK_CLASS, "The map must contain only numeric values" TSRMLS_CC); return; } #if MagickLibVersion >= 0x700 status = MagickSparseColorImageChannel(intern->magick_wand, channel, sparse_method, num_elements, double_array); #else status = MagickSparseColorImage(intern->magick_wand, channel, sparse_method, num_elements, double_array); #endif efree(double_array); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to sparse color image" TSRMLS_CC); return; } RETURN_TRUE; } /* {{{ proto bool Imagick::remapImage(Imagick remap, int DITHERMETHOD) replaces the colors of an image with the closest color from a reference image */ PHP_METHOD(Imagick, remapImage) { php_imagick_object *intern; php_imagick_object *intern_remap; MagickBooleanType status; im_long dither_method; zval *remap_param; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &remap_param, php_imagick_sc_entry, &dither_method) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_remap = Z_IMAGICK_P(remap_param); if (php_imagick_ensure_not_empty (intern_remap->magick_wand) == 0) return; status = MagickRemapImage(intern->magick_wand, intern_remap->magick_wand, dither_method); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to remap image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x646 /* {{{ proto bool Imagick::exportImagePixels(int x, int y, int width, int height, string map, INT STORAGE) The types for the PixelStorage types are: CharPixel - unsigned 1 byte integer DoublePixel - 8 byte floating point FloatPixel - 4 byte floating point IntegerPixel - Removed in IM7 unsigned 4 byte integer LongPixel - unsigned 4 byte integer QuantumPixel - Quantum, use the defined type from the IM headers. ShortPixel - unsigned 2 byte integer */ PHP_METHOD(Imagick, exportImagePixels) { php_imagick_object *intern; MagickBooleanType status; im_long x, y, width, height, storage; char *map; int map_size, i = 0; IM_LEN_TYPE map_len; double *double_array; float *float_array; unsigned char *char_array; unsigned short *short_array; unsigned int *long_array; // The long pixel type is implemented in ImageMagick as 'unsigned int' Quantum *quantum_array; #if MagickLibVersion >= 0x700 unsigned long long int *longlong_array; #endif #if INT_MAX != 0x7FFFFFFF #error "INT_MAX is not 0x7FFFFFFF, the code below assumes it is, as does the ImageMagick code" // If this happens, you will need to figure out how to make long_array be an array of // 4 byte unsigned ints #endif if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llllsl", &x, &y, &width, &height, &map, &map_len, &storage) == FAILURE) { return; } if ((x < 0) || (y < 0)) { php_imagick_throw_exception(IMAGICK_CLASS, "The coordinates must be non-negative" TSRMLS_CC); return; } if (width <= 0 || height <= 0) { php_imagick_throw_exception(IMAGICK_CLASS, "The width and height must be greater than zero" TSRMLS_CC); return; } if (!php_imagick_validate_map(map TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "The map contains disallowed characters" TSRMLS_CC); return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; map_size = (map_len * width * height); switch (storage) { case FloatPixel: float_array = emalloc(map_size * sizeof(float)); status = MagickExportImagePixels(intern->magick_wand, x, y, width, height, map, FloatPixel, (void *)float_array); if (status != MagickFalse) { array_init(return_value); for (i = 0; i < map_size; i++) { add_next_index_double(return_value, float_array[i]); } efree(float_array); return; } break; case DoublePixel: double_array = emalloc(map_size * sizeof(double)); status = MagickExportImagePixels(intern->magick_wand, x, y, width, height, map, DoublePixel, (void *)double_array); if (status != MagickFalse) { array_init(return_value); for (i = 0; i < map_size; i++) { add_next_index_double(return_value, double_array[i]); } efree(double_array); return; } break; case ShortPixel: short_array = emalloc(map_size * sizeof(unsigned short)); status = MagickExportImagePixels(intern->magick_wand, x, y, width, height, map, ShortPixel, (void *)short_array); if (status != MagickFalse) { array_init(return_value); for (i = 0; i < map_size; i++) { add_next_index_long(return_value, short_array[i]); } efree(short_array); return; } break; #if MagickLibVersion >= 0x700 case LongLongPixel: longlong_array = emalloc(map_size * sizeof(unsigned long long int)); status = MagickExportImagePixels(intern->magick_wand, x, y, width, height, map, LongLongPixel, (void *)longlong_array); if (status != MagickFalse) { array_init(return_value); for (i = 0; i < map_size; i++) { //TODO - think about this. // on 32bit platforms this will be truncating data // on 64bit platforms where sizeof(longlong) > 64bits, it will be truncating // on 64bit platforms where sizeof(longlong) = 64bits, PHP will be // converting values close to 64bit to be floats... add_next_index_long(return_value, longlong_array[i]); } efree(longlong_array); return; } break; #endif #if MagickLibVersion < 0x700 case IntegerPixel: #endif case LongPixel: long_array = emalloc(map_size * sizeof(unsigned int)); status = MagickExportImagePixels(intern->magick_wand, x, y, width, height, map, LongPixel, (void *)long_array); if (status != MagickFalse) { array_init(return_value); for (i = 0; i < map_size; i++) { add_next_index_long(return_value, long_array[i]); } efree(long_array); return; } break; case CharPixel: char_array = emalloc(map_size * sizeof(char)); status = MagickExportImagePixels(intern->magick_wand, x, y, width, height, map, CharPixel, (void *)char_array); if (status != MagickFalse) { array_init(return_value); for (i = 0; i < map_size; i++) { add_next_index_long(return_value, (int)char_array[i]); } efree(char_array); return; } break; case QuantumPixel: quantum_array = emalloc(map_size * sizeof(Quantum)); status = MagickExportImagePixels(intern->magick_wand, x, y, width, height, map, QuantumPixel, (void *)quantum_array); if (status != MagickFalse) { array_init(return_value); for (i = 0; i < map_size; i++) { #if MAGICKCORE_HDRI_ENABLE add_next_index_double(return_value, quantum_array[i]); #else add_next_index_long(return_value, quantum_array[i]); #endif } efree(quantum_array); return; } break; default: php_imagick_throw_exception(IMAGICK_CLASS, "Unknown pixel type " TSRMLS_CC); return; break; } if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to export image pixels" TSRMLS_CC); return; } return; } /* }}} */ #endif #if MagickLibVersion > 0x648 /* {{{ proto array Imagick::getImageChannelKurtosis([int CHANNEL]) Gets the kurtosis and skewness of one or more image channels */ PHP_METHOD(Imagick, getImageChannelKurtosis) { php_imagick_object *intern; MagickBooleanType status; double kurtosis, skewness; im_long channel = DefaultChannels; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGetImageChannelKurtosis(intern->magick_wand, channel, &kurtosis, &skewness); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image channel kurtosis" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "kurtosis", kurtosis); add_assoc_double(return_value, "skewness", skewness); return; } /* }}} */ /* {{{ proto bool Imagick::functionImage(int FUNCTION, array arguments[, int CHANNEL]) Applies an arithmetic, relational, or logical expression to an image */ PHP_METHOD(Imagick, functionImage) { php_imagick_object *intern; MagickBooleanType status; zval *arguments; im_long func, num_elements, channel = IM_DEFAULT_CHANNEL; double *array; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "la|l", &func, &arguments, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; array = php_imagick_zval_to_double_array(arguments, &num_elements TSRMLS_CC); if (!array) { php_imagick_throw_exception(IMAGICK_CLASS, "The arguments array contains disallowed characters or is empty." TSRMLS_CC); return; } status = MagickFunctionImageChannel(intern->magick_wand, channel, func, num_elements, array); efree(array); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to execute function on the image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x651 /* {{{ proto boolean Imagick::transformImageColorspace(int COLORSPACE) Transform image colorspace */ PHP_METHOD(Imagick, transformImageColorspace) { php_imagick_object *intern; im_long colorspace; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &colorspace) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickTransformImageColorspace(intern->magick_wand, colorspace); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to transform image colorspace" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x652 /* {{{ proto boolean Imagick::haldClutImage(Imagick hald[, int CHANNEL]) Replaces colors in the image from a Hald color lookup table */ PHP_METHOD(Imagick, haldClutImage) { zval *objvar; MagickBooleanType status; php_imagick_object *intern, *hald; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", &objvar, php_imagick_sc_entry, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; hald = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (hald->magick_wand) == 0) return; status = MagickHaldClutImageChannel(intern->magick_wand, channel, hald->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to hald clut image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x655 /* {{{ proto boolean Imagick::autoLevelImage([int CHANNEL]) Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range. */ PHP_METHOD(Imagick, autoLevelImage) { php_imagick_object *intern; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAutoLevelImageChannel(intern->magick_wand, channel); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to autolevel image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto boolean Imagick::blueShiftImage([float $factor = 1.5]) Mutes the colors of the image to simulate a scene at nighttime in the moonlight. */ PHP_METHOD(Imagick, blueShiftImage) { php_imagick_object *intern; MagickBooleanType status; double factor = 1.5; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|d", &factor) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickBlueShiftImage(intern->magick_wand, factor); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to blue shift image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x656 PHP_METHOD(Imagick, setImageArtifact) { php_imagick_object *intern; MagickBooleanType status; char *artifact, *value; IM_LEN_TYPE artifact_len, value_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &artifact, &artifact_len, &value, &value_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageArtifact(intern->magick_wand, artifact, value); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image artifact" TSRMLS_CC); return; } RETURN_TRUE; } PHP_METHOD(Imagick, getImageArtifact) { php_imagick_object *intern; char *artifact, *value; IM_LEN_TYPE artifact_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &artifact, &artifact_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; value = MagickGetImageArtifact(intern->magick_wand, artifact); if (!value) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image artifact" TSRMLS_CC); return; } #if PHP_VERSION_ID >= 70000 RETVAL_STRING(value); #else RETVAL_STRING(value, 1); #endif IMAGICK_FREE_MAGICK_MEMORY(value); return; } /* {{{ proto boolean Imagick::deleteImageArtifact(string $artifact) Delete image artifact */ PHP_METHOD(Imagick, deleteImageArtifact) { php_imagick_object *intern; MagickBooleanType status; char *artifact; IM_LEN_TYPE artifact_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &artifact, &artifact_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickDeleteImageArtifact(intern->magick_wand, artifact); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to delete image artifact" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto integer Imagick::getColorspace() Get the object colorspace property */ PHP_METHOD(Imagick, getColorspace) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETURN_LONG(MagickGetColorspace(intern->magick_wand)); } /* }}} */ /* {{{ proto boolean Imagick::setColorspace([int COLORSPACE]) Set the object colorspace property */ PHP_METHOD(Imagick, setColorspace) { php_imagick_object *intern; im_long colorspace; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &colorspace) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetColorspace(intern->magick_wand, colorspace); RETURN_BOOL(status == MagickTrue); } /* }}} */ /* {{{ proto boolean Imagick::clampImage([int CHANNEL]) Restricts the color range from 0 to the quantum depth. */ PHP_METHOD(Imagick, clampImage) { php_imagick_object *intern; im_long channel = IM_DEFAULT_CHANNEL; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickClampImageChannel(intern->magick_wand, channel); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to clamp image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x667 /* {{{ proto Imagick Imagick::smushImages(boolean stack, int offset) Takes all images from the current image pointer to the end of the image list and smushs them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right. */ PHP_METHOD(Imagick, smushImages) { php_imagick_object *intern, *intern_return; zend_bool stack; im_long offset; MagickWand *retwand; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "bl", &stack, &offset) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; retwand = MagickSmushImages(intern->magick_wand, (stack ? MagickTrue : MagickFalse), offset); if (!retwand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to smush images" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, retwand); return; } /* }}} */ #endif /* {{{ proto Imagick Imagick::__construct([mixed files] ) The Imagick constructor */ #if PHP_VERSION_ID >= 70000 PHP_METHOD(Imagick, __construct) { php_imagick_object *intern; zval *files = NULL; zval *pzval; php_imagick_rw_result_t rc; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!/", &files) == FAILURE) { return; } /* No files given.. or null passed */ if (!files) { return; } intern = Z_IMAGICK_P(getThis()); if (Z_TYPE_P (files) == IS_LONG || Z_TYPE_P (files) == IS_DOUBLE) { convert_to_string (files); } /* A single file was given */ if (Z_TYPE_P(files) == IS_STRING) { struct php_imagick_file_t file = {0}; if (!php_imagick_file_init(&file, Z_STRVAL_P(files), Z_STRLEN_P(files) TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, Z_STRVAL_P(files) TSRMLS_CC); return; } } /* an array of filenames was given */ else if (Z_TYPE_P(files) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(files), pzval) { struct php_imagick_file_t file = {0}; ZVAL_DEREF(pzval); if (!php_imagick_file_init(&file, Z_STRVAL_P(pzval), Z_STRLEN_P(pzval) TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, Z_STRVAL_P(pzval) TSRMLS_CC); return; } } ZEND_HASH_FOREACH_END(); } if (Z_TYPE_P(files) == IS_FALSE || Z_TYPE_P(files) == IS_TRUE) { php_imagick_throw_exception(IMAGICK_CLASS, "Constructor shouldn't be called with a boolean as the filename"); } RETURN_TRUE; } #else PHP_METHOD(Imagick, __construct) { php_imagick_object *intern; zval *files = NULL; HashPosition pos; php_imagick_rw_result_t rc; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!/", &files) == FAILURE) { return; } /* No files given.. or null passed */ if (!files) { return; } intern = Z_IMAGICK_P(getThis()); if (Z_TYPE_P (files) == IS_LONG || Z_TYPE_P (files) == IS_DOUBLE) { convert_to_string (files); } /* A single file was given */ if (Z_TYPE_P(files) == IS_STRING) { struct php_imagick_file_t file = {0}; if (!php_imagick_file_init(&file, Z_STRVAL_P(files), Z_STRLEN_P(files) TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, Z_STRVAL_P(files) TSRMLS_CC); return; } } /* an array of filenames was given */ else if (Z_TYPE_P(files) == IS_ARRAY) { for(zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(files), &pos); zend_hash_has_more_elements_ex(Z_ARRVAL_P(files), &pos) == SUCCESS; zend_hash_move_forward_ex(Z_ARRVAL_P(files), &pos)) { struct php_imagick_file_t file = {0}; zval **ppzval; if (zend_hash_get_current_data_ex(Z_ARRVAL_P(files), (void**)&ppzval, &pos) == FAILURE) { continue; } if (!php_imagick_file_init(&file, Z_STRVAL_PP(ppzval), Z_STRLEN_PP(ppzval) TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, Z_STRVAL_PP(ppzval) TSRMLS_CC); return; } } } if (Z_TYPE_P(files) == IS_BOOL) { php_imagick_throw_exception(IMAGICK_CLASS, "Constructor shouldn't be called with a boolean as the filename" TSRMLS_CC); } RETURN_TRUE; } #endif /* }}} */ /* {{{ proto string Imagick::__toString() Returns the current image as string */ PHP_METHOD(Imagick, __toString) { php_imagick_object *intern; unsigned char *image; char *buffer; size_t image_size; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (MagickGetNumberImages(intern->magick_wand) == 0) { IM_ZVAL_STRING(return_value, ""); return; } buffer = MagickGetImageFormat(intern->magick_wand); if (!buffer) { IM_ZVAL_STRING(return_value, ""); return; } else { IMAGICK_FREE_MAGICK_MEMORY(buffer); } image = MagickGetImageBlob(intern->magick_wand, &image_size); IM_ZVAL_STRINGL(return_value, (char *)image, image_size); IMAGICK_FREE_MAGICK_MEMORY(image); return; } /* }}} */ /* {{{ proto string Imagick::count() Returns the number of images */ PHP_METHOD(Imagick, count) { php_imagick_object *intern; im_long mode = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &mode) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_LONG (MagickGetNumberImages(intern->magick_wand)); } /* }}} */ /* {{{ proto array Imagick::queryFormats([string pattern] ) Returns formats supported by ImageMagick */ PHP_METHOD(Imagick, queryFormats) { char **supported_formats; unsigned long i; char *pattern = "*"; IM_LEN_TYPE pattern_len = 1; size_t num_formats = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &pattern, &pattern_len) == FAILURE) { return; } supported_formats = (char **) MagickQueryFormats(pattern, &num_formats); array_init(return_value); for (i = 0 ; i < num_formats ; i++) { IM_add_next_index_string(return_value, supported_formats[i]); IMAGICK_FREE_MAGICK_MEMORY(supported_formats[i]); } IMAGICK_FREE_MAGICK_MEMORY(supported_formats); return; } /* }}} */ /* {{{ proto array Imagick::queryFonts([string pattern] ) Returns fonts supported by ImageMagick */ PHP_METHOD(Imagick, queryFonts) { char **fonts; unsigned long i; char *pattern = "*"; IM_LEN_TYPE pattern_len = 1; size_t num_fonts; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &pattern, &pattern_len) == FAILURE) { return; } fonts = (char **) MagickQueryFonts(pattern, &num_fonts); array_init(return_value); for (i = 0 ; i < num_fonts ; i++) { IM_add_next_index_string(return_value, fonts[i]); IMAGICK_FREE_MAGICK_MEMORY(fonts[i]); } IMAGICK_FREE_MAGICK_MEMORY(fonts); return; } /* }}} */ /* {{{ proto array Imagick::queryFontMetrics(ImagickDraw draw, string text[, bool multiline] ) Returns a 13 element array representing the font metrics */ PHP_METHOD(Imagick, queryFontMetrics) { zval *objvar, *multiline; zend_bool remove_canvas, query_multiline; php_imagick_object *intern; php_imagickdraw_object *internd; char *text; IM_LEN_TYPE text_len; double *metrics; multiline = NULL; remove_canvas = 0; query_multiline = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|z!", &objvar, php_imagickdraw_sc_entry, &text, &text_len, &multiline) == FAILURE) { return; } /* No parameter passed, this means we should autodetect */ if (!multiline) { if (strchr (text, '\n') != NULL) { query_multiline = 1; } } else { convert_to_boolean(multiline); #if PHP_VERSION_ID >= 70000 if (Z_TYPE_P(multiline) == IS_TRUE) { query_multiline = 1; } #else query_multiline = Z_BVAL_P(multiline); #endif } /* fetch the objects */ intern = Z_IMAGICK_P(getThis()); internd = Z_IMAGICKDRAW_P(objvar); /* If wand is empty, create a 1x1 pixel image to use as a temporary canvas */ if (MagickGetNumberImages(intern->magick_wand) < 1) { PixelWand *pixel_wand; MagickBooleanType status; /* Empty bg color */ pixel_wand = NewPixelWand(); if (!pixel_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to allocate background color for the temporary canvas" TSRMLS_CC); return; } /* 1x1 should be enough to get the metrics */ status = MagickNewImage(intern->magick_wand, 1, 1, pixel_wand); pixel_wand = DestroyPixelWand(pixel_wand); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to allocate temporary canvas" TSRMLS_CC); return; } remove_canvas = 1; } /* Multiline testing */ if (query_multiline) { metrics = MagickQueryMultilineFontMetrics(intern->magick_wand, internd->drawing_wand, text); } else { metrics = MagickQueryFontMetrics(intern->magick_wand, internd->drawing_wand, text); } /* Remove the image from the stack*/ if (remove_canvas) { MagickRemoveImage(intern->magick_wand); } if (!metrics) { php_imagick_convert_imagick_exception(intern->magick_wand, "Failed to query the font metrics" TSRMLS_CC); return; } else { zval *pbounding; #if PHP_VERSION_ID >= 70000 zval bounding; pbounding = &bounding; #else MAKE_STD_ZVAL(pbounding) #endif array_init(return_value); add_assoc_double(return_value, "characterWidth", metrics[0]); add_assoc_double(return_value, "characterHeight", metrics[1]); add_assoc_double(return_value, "ascender", metrics[2]); add_assoc_double(return_value, "descender", metrics[3]); add_assoc_double(return_value, "textWidth", metrics[4]); add_assoc_double(return_value, "textHeight", metrics[5]); add_assoc_double(return_value, "maxHorizontalAdvance", metrics[6]); array_init(pbounding); add_assoc_double(pbounding, "x1", metrics[7]); add_assoc_double(pbounding, "y1", metrics[8]); add_assoc_double(pbounding, "x2", metrics[9]); add_assoc_double(pbounding, "y2", metrics[10]); add_assoc_zval(return_value, "boundingBox", pbounding); add_assoc_double(return_value, "originX", metrics[11]); add_assoc_double(return_value, "originY", metrics[12]); IMAGICK_FREE_MAGICK_MEMORY(metrics); return; } } /* }}} */ /* {{{ proto bool Imagick::valid() Checks if the current item is valid */ PHP_METHOD(Imagick, valid) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (intern->next_out_of_bound) { RETURN_FALSE; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::current() Returns reference to the current imagick object with image pointer at the correct sequence. */ PHP_METHOD(Imagick, current) { if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_ZVAL(getThis(), 1, 0); } /* }}} */ /* {{{ proto bool Imagick::readImage(string filename) Reads image from filename */ PHP_METHOD(Imagick, readImage) { char *filename; IM_LEN_TYPE filename_len; php_imagick_object *intern; struct php_imagick_file_t file = {0}; php_imagick_rw_result_t rc; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (!php_imagick_file_init(&file, filename, filename_len TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, filename TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::readImages(array files ) Reads image from an array of filenames */ #if PHP_VERSION_ID >= 70000 PHP_METHOD(Imagick, readImages) { zval *value; zval *files; php_imagick_object *intern; php_imagick_rw_result_t rc; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &files) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(files), value) { struct php_imagick_file_t file = {0}; ZVAL_DEREF(value); if (!php_imagick_file_init(&file, Z_STRVAL_P(value), Z_STRLEN_P(value) TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, Z_STRVAL_P(value) TSRMLS_CC); return; } } ZEND_HASH_FOREACH_END(); RETURN_TRUE; } #else PHP_METHOD(Imagick, readImages) { zval *files; php_imagick_object *intern; HashPosition pos; php_imagick_rw_result_t rc; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &files) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); for(zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(files), &pos); zend_hash_has_more_elements_ex(Z_ARRVAL_P(files), &pos) == SUCCESS; zend_hash_move_forward_ex(Z_ARRVAL_P(files), &pos)) { struct php_imagick_file_t file = {0}; zval **ppzval; if (zend_hash_get_current_data_ex(Z_ARRVAL_P(files), (void**)&ppzval, &pos) == FAILURE) { continue; } if (!php_imagick_file_init(&file, Z_STRVAL_PP(ppzval), Z_STRLEN_PP(ppzval) TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, Z_STRVAL_PP(ppzval) TSRMLS_CC); return; } } RETURN_TRUE; } #endif /* {{{ proto bool Imagick::pingImage(string filename ) This method can be used to query image width, height, size, and format without reading the whole image in to memory. */ PHP_METHOD(Imagick, pingImage) { char *filename; IM_LEN_TYPE filename_len; php_imagick_object *intern; struct php_imagick_file_t file = {0}; php_imagick_rw_result_t rc; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (!php_imagick_file_init(&file, filename, filename_len TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickPingImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, filename TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::readImageFile(resource filehandle[, string filename]) Reads image from open filehandle */ PHP_METHOD(Imagick, readImageFile) { char *filename = NULL; IM_LEN_TYPE filename_len; php_imagick_object *intern; zval *zstream; zend_bool result; php_stream *stream; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!", &zstream, &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); #if PHP_VERSION_ID >= 70000 php_stream_from_zval(stream, zstream); #else php_stream_from_zval(stream, &zstream); #endif result = php_imagick_stream_handler(intern, stream, ImagickReadImageFile TSRMLS_CC); if (result == 0) { if (!EG(exception)) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to read image from the filehandle" TSRMLS_CC); return; } return; } if (filename) { MagickSetImageFilename(intern->magick_wand, filename); MagickSetLastIterator(intern->magick_wand); } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::displayImage(string serverName ) Displays an image */ PHP_METHOD(Imagick, displayImage) { php_imagick_object *intern; MagickBooleanType status; char *server_name; IM_LEN_TYPE server_name_len; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &server_name, &server_name_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickDisplayImage(intern->magick_wand, server_name); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to display image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::displayImages(string serverName ) displays an image or image sequence */ PHP_METHOD(Imagick, displayImages) { php_imagick_object *intern; MagickBooleanType status; char *server_name; IM_LEN_TYPE server_name_len; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &server_name, &server_name_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickDisplayImages(intern->magick_wand, server_name); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to display images" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::readBlob(string image ) Reads image from a binary string */ PHP_METHOD(Imagick, readImageBlob) { char *image_string; char *filename = NULL; long filename_len; IM_LEN_TYPE image_string_len; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!", &image_string, &image_string_len, &filename, &filename_len) == FAILURE) { return; } if (!image_string_len) { php_imagick_throw_exception(IMAGICK_CLASS, "Zero size image string passed" TSRMLS_CC); return; } intern = Z_IMAGICK_P(getThis()); status = MagickReadImageBlob(intern->magick_wand, image_string, image_string_len); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to read image blob" TSRMLS_CC); return; } /* Even if filename is null we need to give a name here. Otherwise segfaults will happen */ MagickSetImageFilename(intern->magick_wand, filename); MagickSetLastIterator(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::blurImage(float radius, float sigma[, int channel ] ) Adds blur filter to image. Optional third parameter to blur a specific channel. */ PHP_METHOD(Imagick, blurImage) { double radius, sigma; php_imagick_object *intern; MagickBooleanType status; /* Initialize channel type to all channels*/ im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &radius, &sigma, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickBlurImageChannel(intern->magick_wand, channel, radius, sigma); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to blur image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::waveImage(float amplitude, float length ) Adds wave filter to the image. */ PHP_METHOD(Imagick, waveImage) { double amplitude, wave_length; php_imagick_object *intern; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &litude, &wave_length) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 { //TODO allow PixelInterpolateMethod be set PixelInterpolateMethod method = BilinearInterpolatePixel; status = MagickWaveImage(intern->magick_wand, amplitude, wave_length, method); } #else status = MagickWaveImage(intern->magick_wand, amplitude, wave_length); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to wave image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::clear() Clears all resources associated to Imagick object */ PHP_METHOD(Imagick, clear) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (!intern->magick_wand) { RETURN_FALSE; } ClearMagickWand(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::scaleImage(int width, int height[, bool bestfit = false[, bool legacy]] ) Scales the size of an image to the given dimensions. Passing zero as either of the arguments will preserve dimension while scaling. If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0. If false, the calculations should produce the same results as ImageMagick CLI does. */ PHP_METHOD(Imagick, scaleImage) { im_long width, height, new_width, new_height; php_imagick_object *intern; MagickBooleanType status; zend_bool bestfit = 0; zend_bool legacy = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll|bb", &width, &height, &bestfit, &legacy) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!php_imagick_thumbnail_dimensions(intern->magick_wand, bestfit, width, height, &new_width, &new_height, legacy)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid image geometry" TSRMLS_CC); return; } status = MagickScaleImage(intern->magick_wand, new_width, new_height); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to scale image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::cropImage(int width, height, int x, int y ) Extracts a region of the image. */ PHP_METHOD(Imagick, cropImage) { im_long width, height, x, y; php_imagick_object *intern; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &width, &height, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickCropImage(intern->magick_wand, width, height, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to crop image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::spreadImage(float radius ) Special effects method that randomly displaces each pixel in a block defined by the radius parameter. */ PHP_METHOD(Imagick, spreadImage) { double radius; php_imagick_object *intern; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &radius) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 { //TODO allow PixelInterpolateMethod be set PixelInterpolateMethod method = BilinearInterpolatePixel; status = MagickSpreadImage(intern->magick_wand, radius, method); } #else status = MagickSpreadImage(intern->magick_wand, radius); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to spread image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::swirlImage(float degrees ) Swirls the pixels about the center of the image, where degrees indicates the sweep of the arc through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to 360. */ PHP_METHOD(Imagick, swirlImage) { double degrees; php_imagick_object *intern; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", °rees) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 { //TODO allow PixelInterpolateMethod be set PixelInterpolateMethod method = BilinearInterpolatePixel; status = MagickSwirlImage(intern->magick_wand, degrees, method); } #else status = MagickSwirlImage(intern->magick_wand, degrees); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to swirl image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::stripImage() Strips an image of all profiles and comments. */ PHP_METHOD(Imagick, stripImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickStripImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to strip image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::trimImage(double fuzz) Remove edges that are the background color from the image. */ PHP_METHOD(Imagick, trimImage) { double fuzz; php_imagick_object *intern; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &fuzz) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickTrimImage(intern->magick_wand, fuzz); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to trim image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::chopImage(int width, int height, int x, int y) Removes a region of an image and collapses the image to occupy the removed portion */ PHP_METHOD(Imagick, chopImage) { php_imagick_object *intern; im_long width, height, x, y; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &width, &height, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickChopImage(intern->magick_wand, width, height, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to chop image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::clipImage() Clips along the first path from the 8BIM profile, if present. */ PHP_METHOD(Imagick, clipImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickClipImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to clip image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::clipPathImage(string pathname, bool inside) Clips along the named paths from the 8BIM profile, if present. Later operations take effect inside the path. Id may be a number if preceded with #, to work on a numbered path, e.g., "#1" to use the first path. */ PHP_METHOD(Imagick, clipPathImage) { php_imagick_object *intern; char *clip_path; IM_LEN_TYPE clip_path_len; zend_bool inside; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sb", &clip_path, &clip_path_len, &inside) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion > 0x636 status = MagickClipImagePath(intern->magick_wand, clip_path, inside); #else status = MagickClipPathImage(intern->magick_wand, clip_path, inside); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to clip path image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::coalesceImages() Composites a set of images while respecting any page offsets and disposal methods. GIF, MIFF, and MNG animation sequences typically start with an image background and each subsequent image varies in size and offset. returns a new sequence where each image in the sequence is the same size as the first and composited with the next image in the sequence. */ PHP_METHOD(Imagick, coalesceImages) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickCoalesceImages(intern->magick_wand); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Coalesce image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::colorFloodfillImage(ImagickPixel fill, double fuzz, ImagickPixel bordercolor, int x, int y) Changes the color value of any pixel that matches target and is an immediate neighbor. */ PHP_METHOD(Imagick, colorFloodfillImage) { php_imagick_object *intern; zval *fill_param, *border_param; im_long x, y; double fuzz; MagickBooleanType status; PixelWand *fill_wand, *border_wand; zend_bool fill_allocated = 0, border_allocated = 0; IMAGICK_METHOD_DEPRECATED("Imagick", "colorFloodFillImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zdzll", &fill_param, &fuzz, &border_param, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; fill_wand = php_imagick_zval_to_pixelwand (fill_param, IMAGICK_CLASS, &fill_allocated TSRMLS_CC); if (!fill_wand) return; border_wand = php_imagick_zval_to_pixelwand (border_param, IMAGICK_CLASS, &border_allocated TSRMLS_CC); if (!border_wand) { if (fill_allocated) fill_wand = DestroyPixelWand (fill_wand); return; } status = MagickColorFloodfillImage(intern->magick_wand, fill_wand, fuzz, border_wand, x, y); if (fill_allocated) fill_wand = DestroyPixelWand (fill_wand); if (border_allocated) border_wand = DestroyPixelWand (border_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to color floodfill image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion < 0x700 #endif /* {{{ proto Imagick Imagick::combineImages() Combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc. */ PHP_METHOD(Imagick, combineImages) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; // TODO - this is actuall ColorspaceType // https://imagemagick.org/api/magick-image.php#MagickCombineImages im_long channel_type; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickCombineImages(intern->magick_wand, channel_type); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Combine images failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto Imagick Imagick::setImage(Imagick replace ) Replaces the current sequence */ PHP_METHOD(Imagick, setImage) { zval *objvar; MagickBooleanType status; php_imagick_object *intern, *replace; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objvar, php_imagick_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; replace = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (replace->magick_wand) == 0) return; status = MagickSetImage(intern->magick_wand, replace->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set the image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::getImage() Returns a new Imagick object with the current image sequence. */ PHP_METHOD(Imagick, getImage) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickGetImage(intern->magick_wand); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Get image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::addImage(Imagick source ) Adds new image to Imagick object from the current position of the source object. */ PHP_METHOD(Imagick, addImage) { php_imagick_object *intern, *intern_add; zval *add_obj; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &add_obj, php_imagick_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); intern_add = Z_IMAGICK_P(add_obj); if (php_imagick_ensure_not_empty (intern_add->magick_wand) == 0) return; status = MagickAddImage(intern->magick_wand, intern_add->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to add image" TSRMLS_CC); return; } MagickSetLastIterator(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::newImage(int cols, int rows, ImagickPixel background[, string format] ) Creates a new image and associates ImagickPixel value as background color */ PHP_METHOD(Imagick, newImage) { php_imagick_object *intern; zval *param; MagickBooleanType status; im_long columns, rows; char *format = NULL; IM_LEN_TYPE format_len = 0; PixelWand *color_wand; zend_bool allocated; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llz|s", &columns, &rows, ¶m, &format, &format_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickNewImage(intern->magick_wand, columns, rows, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to create new image" TSRMLS_CC); return; } /* If the optional fourth parameter was given set the image format here */ if (format != NULL && format_len > 0) { status = MagickSetImageFormat(intern->magick_wand, format); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set the image format" TSRMLS_CC); return; } } MagickSetLastIterator(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::newPseudoImage(int cols, int rows, string pseudoString ) Creates a new image using pseudo format */ PHP_METHOD(Imagick, newPseudoImage) { php_imagick_object *intern; MagickBooleanType status; im_long columns, rows; char *pseudo_string; IM_LEN_TYPE pseudo_string_len; struct php_imagick_file_t file = {0}; php_imagick_rw_result_t rc; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lls", &columns, &rows, &pseudo_string, &pseudo_string_len) == FAILURE) { return; } if (IMAGICK_G(allow_zero_dimension_images) == 0) { if (columns == 0) { php_error( E_DEPRECATED, "Creating images with zero columns is deprecated. If you think you need to " \ "do this, please open an issue at https://phpimagick.com/issues" ); } if (rows == 0) { php_error( E_DEPRECATED, "Creating images with zero rows is deprecated. If you think you need to " \ "do this, please open an issue at https://phpimagick.com/issues" ); } } /* Allow only pseudo formats in this method */ if (strchr (pseudo_string, ':') == NULL) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid pseudo format string" TSRMLS_CC); return; } intern = Z_IMAGICK_P(getThis()); /* Pseudo image needs a size set manually */ status = MagickSetSize(intern->magick_wand, columns, rows); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to create new pseudo image" TSRMLS_CC); return; } if (!php_imagick_file_init(&file, pseudo_string, pseudo_string_len TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_read_file(intern, &file, ImagickReadImage TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, pseudo_string TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::getImageTotalInkDensity() Gets the image total ink density. */ PHP_METHOD(Imagick, getImageTotalInkDensity) { php_imagick_object *intern; double ink_density; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; ink_density = MagickGetImageTotalInkDensity(intern->magick_wand); RETVAL_DOUBLE(ink_density); } /* }}} */ /* {{{ proto bool Imagick::implodeImage(float radius ) Creates a new image that is a copy of an existing one with the image pixels "implode" by the specified percentage. It allocates the memory necessary for the new Image structure and returns a pointer to the new image. */ PHP_METHOD(Imagick, implodeImage) { php_imagick_object *intern; double radius; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &radius) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 { //TODO allow PixelInterpolateMethod be set PixelInterpolateMethod method = BilinearInterpolatePixel; status = MagickImplodeImage(intern->magick_wand, radius, method); } #else status = MagickImplodeImage(intern->magick_wand, radius); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to implode image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x658 //Only stable as of 658 //http://upstream-tracker.org/compat_reports/imagemagick/6.5.7.7_to_6.5.7.8/abi_compat_report.html /* {{{ proto bool Imagick::inverseFourierTransformImage(Imagick complement, bool magnitude) */ PHP_METHOD(Imagick, inverseFourierTransformImage) { php_imagick_object *intern, *intern_complement; zval *complement_obj; zend_bool magnitude; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ob", &complement_obj, php_imagick_sc_entry, &magnitude) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_complement = Z_IMAGICK_P(complement_obj); status = MagickInverseFourierTransformImage(intern->magick_wand, intern_complement->magick_wand, magnitude); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to inversefouriertransformimage image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif /* {{{ proto bool Imagick::levelImage(float blackPoint, float gamma, float whitePoint[, int channel] ) Adjusts the levels of an image by scaling the colors falling between specified white and black points to the full available quantum range. The parameters provided represent the black, mid, and white points. The black point specifies the darkest color in the image. Colors darker than the black point are set to zero. Mid point specifies a gamma correction to apply to the image. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value. */ PHP_METHOD(Imagick, levelImage) { php_imagick_object *intern; double black_point, gamma, white_point; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd|l", &black_point, &gamma, &white_point, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickLevelImageChannel(intern->magick_wand, channel, black_point, gamma, white_point); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to level image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::magnifyImage() Is a convenience method that scales an image proportionally to twice its original size. */ PHP_METHOD(Imagick, magnifyImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickMagnifyImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to magnify image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::cycleColormapImage(Imagick map, bool dither) Replaces the colors of an image with the closest color from a reference image. */ PHP_METHOD(Imagick, mapImage) { php_imagick_object *intern, *intern_map; zval *map_obj; zend_bool dither; MagickBooleanType status; IMAGICK_METHOD_DEPRECATED ("Imagick", "mapImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ob", &map_obj, php_imagick_sc_entry, &dither) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_map = Z_IMAGICK_P(map_obj); status = MagickMapImage(intern->magick_wand, intern_map->magick_wand, dither); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to map image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion < 0x700 #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::matteFloodfillImage(float alpha,float fuzz,ImagickPixel bordercolor, int x, int y) Changes the transparency value of any pixel that matches target and is an immediate neighbor */ PHP_METHOD(Imagick, matteFloodfillImage) { php_imagick_object *intern; zval *param; im_long x, y; double alpha, fuzz; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; IMAGICK_METHOD_DEPRECATED("Imagick", "matteFloodfillImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddzll", &alpha, &fuzz, ¶m, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickMatteFloodfillImage(intern->magick_wand, alpha, fuzz, color_wand, x, y); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to matte floodfill image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion < 0x700 #endif #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) /* {{{ proto bool Imagick::medianFilterImage(float radius) Applies a digital filter that improves the quality of a noisy image. Each pixel is replaced by the median in a set of neighboring pixels as defined by radius. */ PHP_METHOD(Imagick, medianFilterImage) { php_imagick_object *intern; double radius; MagickBooleanType status; IMAGICK_METHOD_DEPRECATED ("Imagick", "medianFilterImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &radius) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickMedianFilterImage(intern->magick_wand, radius); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to median filter image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #endif /* {{{ proto bool Imagick::negateImage(bool gray[, int channel] ) Negates the colors in the reference image. The Grayscale option means that only grayscale values within the image are negated. */ PHP_METHOD(Imagick, negateImage) { php_imagick_object *intern; zend_bool gray; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b|l", &gray, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickNegateImageChannel(intern->magick_wand, channel, gray); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to negate image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::paintOpaqueImage(ImagickPixel target, ImagickPixel fill, float fuzz[, int channel]) Changes any pixel that matches color with the color defined by fill. Channel argument is supported in ImageMagick 6.2.8+. */ PHP_METHOD(Imagick, paintOpaqueImage) { php_imagick_object *intern; zval *target_param, *fill_param; double fuzz; MagickBooleanType status; im_long channel = DefaultChannels; PixelWand *target_wand, *fill_wand; zend_bool target_allocated = 0, fill_allocated = 0; IMAGICK_METHOD_DEPRECATED ("Imagick", "paintOpaqueImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zzd|l", &target_param, &fill_param, &fuzz, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; target_wand = php_imagick_zval_to_pixelwand (target_param, IMAGICK_CLASS, &target_allocated TSRMLS_CC); if (!target_wand) return; fill_wand = php_imagick_zval_to_pixelwand (fill_param, IMAGICK_CLASS, &fill_allocated TSRMLS_CC); if (!fill_wand) { if (target_allocated) target_wand = DestroyPixelWand (target_wand); return; } #if MagickLibVersion > 0x628 status = MagickPaintOpaqueImageChannel(intern->magick_wand, channel, target_wand, fill_wand, fuzz); #else status = MagickPaintOpaqueImage(intern->magick_wand, target_wand, fill_wand, fuzz); #endif if (fill_allocated) fill_wand = DestroyPixelWand (fill_wand); if (target_allocated) target_wand = DestroyPixelWand (target_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable paint opaque image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion < 0x700 #endif #if MagickLibVersion > 0x628 /* {{{ proto Imagick Imagick::optimizeImageLayers() Compares each image the GIF disposed forms of the previous image in the sequence. From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the animation. */ PHP_METHOD(Imagick, optimizeImageLayers) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickOptimizeImageLayers(intern->magick_wand); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Optimize image layers failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::paintTransparentImage(ImagickPixel target, float alpha, float fuzz) Changes any pixel that matches color with the color defined by fill. */ PHP_METHOD(Imagick, paintTransparentImage) { php_imagick_object *intern; zval *param; double alpha, fuzz; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; IMAGICK_METHOD_DEPRECATED ("Imagick", "paintTransparentImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zdd", ¶m, &alpha, &fuzz) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickPaintTransparentImage(intern->magick_wand, color_wand, alpha, fuzz); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to paint transparent image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion < 0x700 #endif #endif /* {{{ proto Imagick Imagick::previewImages(int preview ) Tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths. This is helpful to quickly pin-point an appropriate parameter for an image processing operation. */ PHP_METHOD(Imagick, previewImages) { php_imagick_object *intern, *intern_return; im_long preview; MagickWand *tmp_wand; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &preview) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickPreviewImages(intern->magick_wand, preview); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Preview images failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::profileImage(string name, string|null profile) Adds or removes a ICC, IPTC, or generic profile from an image. If the profile is NULL, it is removed from the image otherwise added. Use a name of '*' and a profile of NULL to remove all profiles from the image. */ PHP_METHOD(Imagick, profileImage) { php_imagick_object *intern; char *name, *profile; IM_LEN_TYPE name_len, profile_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss!", &name, &name_len, &profile, &profile_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickProfileImage(intern->magick_wand, name, profile, profile_len); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to profile image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::quantizeImage(int numberColors, int colorspace, int treedepth, bool dither, bool measureError) Analyzes the colors within a reference image */ PHP_METHOD(Imagick, quantizeImage) { php_imagick_object *intern; im_long number_colors, colorspace, tree_depth; zend_bool dither, measure_error; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lllbb", &number_colors, &colorspace, &tree_depth, &dither, &measure_error) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickQuantizeImage(intern->magick_wand, number_colors, colorspace, tree_depth, dither, measure_error); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to quantize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::quantizeImages(int number_colors, int colorspace, int treedepth, bool dither, bool measure_error) Analyzes the colors within a sequence of images */ PHP_METHOD(Imagick, quantizeImages) { php_imagick_object *intern; im_long number_colors, colorspace, tree_depth; zend_bool dither, measure_error; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lllbb", &number_colors, &colorspace, &tree_depth, &dither, &measure_error) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickQuantizeImages(intern->magick_wand, number_colors, colorspace, tree_depth, dither, measure_error); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to quantize images" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::reduceNoiseImage(float radius) Smooths the contours of an image */ PHP_METHOD(Imagick, reduceNoiseImage) { php_imagick_object *intern; double radius; MagickBooleanType status; IMAGICK_METHOD_DEPRECATED ("Imagick", "reduceNoiseImage"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &radius) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickReduceNoiseImage(intern->magick_wand, radius); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to reduce image noise" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #endif /* {{{ proto string Imagick::removeImageProfile(string name) Removes the named image profile and returns it */ PHP_METHOD(Imagick, removeImageProfile) { php_imagick_object *intern; char *name; unsigned char *profile; IM_LEN_TYPE name_len; #if MagickLibVersion < 0x628 long profile_len; #else size_t profile_len; #endif /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; profile = MagickRemoveImageProfile(intern->magick_wand, name, &profile_len); if (!profile) { php_imagick_throw_exception(IMAGICK_CLASS, "The image profile does not exist" TSRMLS_CC); return; } IM_ZVAL_STRING(return_value, (char *)profile); IMAGICK_FREE_MAGICK_MEMORY(profile); return; } /* }}} */ /* {{{ proto bool Imagick::separateImageChannel(int channel) Separates a channel from the image */ PHP_METHOD(Imagick, separateImageChannel) { php_imagick_object *intern; im_long channel; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickSeparateImage(intern->magick_wand, channel); #else status = MagickSeparateImageChannel(intern->magick_wand, channel); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to separate image channel" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::sepiaToneImage(float threshold) Applies a special effect to the image */ PHP_METHOD(Imagick, sepiaToneImage) { php_imagick_object *intern; double threshold; double c_opacity; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &threshold) == FAILURE) { return; } c_opacity = (threshold * QuantumRange) / 100; intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSepiaToneImage(intern->magick_wand, c_opacity); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to sepia tone image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::setImageBias(float bias) Sets the image bias */ static void s_set_image_bias(INTERNAL_FUNCTION_PARAMETERS, zend_bool use_quantum) { php_imagick_object *intern; double bias; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &bias) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (use_quantum) { bias *= QuantumRange; } status = MagickSetImageBias(intern->magick_wand, bias); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image bias" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::setImageBiasQuantum(float bias) Sets the image bias. Bias should be scaled with 0 = no adjustment, 1 = quantum value */ #if MagickLibVersion < 0x700 PHP_METHOD(Imagick, setImageBiasQuantum) { s_set_image_bias (INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } #endif /* }}} */ /* {{{ proto bool Imagick::setImageBias(float bias) Sets the image bias. Bias should be scaled with 0 = no adjustment, 2^^x = adjust black to white where x = the quantum depth ImageMagick was compiled with */ #if MagickLibVersion < 0x700 PHP_METHOD(Imagick, setImageBias) { s_set_image_bias (INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } #endif /* }}} */ /* {{{ proto bool Imagick::setImageBluePrimary(float x,float y) For IM7 the prototype is proto bool Imagick::setImageBluePrimary(float x, float y, float z) Sets the image chromaticity blue primary point */ PHP_METHOD(Imagick, setImageBluePrimary) { php_imagick_object *intern; double x, y; #if MagickLibVersion >= 0x700 double z; #endif MagickBooleanType status; /* Parse parameters given to function */ #if MagickLibVersion >= 0x700 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &x, &y, &z) == FAILURE) { #else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { #endif return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickSetImageBluePrimary(intern->magick_wand, x, y, z); #else status = MagickSetImageBluePrimary(intern->magick_wand, x, y); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image blue primary" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageBorderColor(ImagickPixel border) Sets the image border color */ PHP_METHOD(Imagick, setImageBorderColor) { zval *param; php_imagick_object *intern; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickSetImageBorderColor(intern->magick_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image border color" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageChannelDepth(int channel, int depth) Sets the depth of a particular image channel */ PHP_METHOD(Imagick, setImageChannelDepth) { php_imagick_object *intern; im_long channel_type, depth; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &channel_type, &depth) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageChannelDepth(intern->magick_wand, channel_type, depth); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image channel depth" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageColormapColor(int index, ImagickPixel color) Sets the color of the specified colormap index */ PHP_METHOD(Imagick, setImageColormapColor) { php_imagick_object *intern; zval *param; im_long index; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", &index, ¶m) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickSetImageColormapColor(intern->magick_wand, index, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image color map color" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageColorspace(int colorspace) Sets the image colorspace */ PHP_METHOD(Imagick, setImageColorspace) { php_imagick_object *intern; im_long colorspace; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &colorspace) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageColorspace(intern->magick_wand, colorspace); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image colorspace" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageDispose(int dispose) Sets the image disposal method */ PHP_METHOD(Imagick, setImageDispose) { php_imagick_object *intern; im_long dispose; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &dispose) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageDispose(intern->magick_wand, dispose); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image dispose" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageExtent(int columns, int rows) Sets the image size */ PHP_METHOD(Imagick, setImageExtent) { php_imagick_object *intern; im_long rows, columns; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &rows, &columns) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageExtent(intern->magick_wand, rows, columns); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image extent" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageGreenPrimary(float x, float y) For IM7 the prototype is proto bool Imagick::setImageGreenPrimary(float x, float y, float z) Sets the image chromaticity green primary point */ PHP_METHOD(Imagick, setImageGreenPrimary) { php_imagick_object *intern; double x, y; #if MagickLibVersion >= 0x700 double z; #endif MagickBooleanType status; /* Parse parameters given to function */ #if MagickLibVersion >= 0x700 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &x, &y, &z) == FAILURE) { #else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { #endif return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickSetImageGreenPrimary(intern->magick_wand, x, y, z); #else status = MagickSetImageGreenPrimary(intern->magick_wand, x, y); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image green primary" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageInterlaceScheme(int interlace_scheme) Sets the image interlace scheme */ PHP_METHOD(Imagick, setImageInterlaceScheme) { php_imagick_object *intern; im_long interlace; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &interlace) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageInterlaceScheme(intern->magick_wand, interlace); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image interlace scheme" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageProfile(string name, string profile) Adds a named profile to the Imagick object */ PHP_METHOD(Imagick, setImageProfile) { php_imagick_object *intern; char *name, *profile; IM_LEN_TYPE profile_len, name_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &profile, &profile_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageProfile(intern->magick_wand, name, profile, profile_len); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image profile" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageRedPrimary(float x,float y) For IM7 the prototype is proto bool Imagick::setImageRedPrimary(float x, float y, float z) Sets the image chromaticity red primary point. */ PHP_METHOD(Imagick, setImageRedPrimary) { php_imagick_object *intern; double x, y; #if MagickLibVersion >= 0x700 double z; #endif MagickBooleanType status; /* Parse parameters given to function */ #if MagickLibVersion >= 0x700 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &x, &y, &z) == FAILURE) { #else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { #endif return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickSetImageRedPrimary(intern->magick_wand, x, y, z); #else status = MagickSetImageRedPrimary(intern->magick_wand, x, y); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image red primary" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageRenderingIntent(int rendering_intent) Sets the image rendering intent. */ PHP_METHOD(Imagick, setImageRenderingIntent) { php_imagick_object *intern; im_long rendering_intent; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &rendering_intent) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageRenderingIntent(intern->magick_wand, rendering_intent); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image rendering intent" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageVirtualPixelMethod(int method) Sets the image virtual pixel method. */ PHP_METHOD(Imagick, setImageVirtualPixelMethod) { php_imagick_object *intern; im_long virtual_pixel; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &virtual_pixel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; MagickSetImageVirtualPixelMethod(intern->magick_wand, virtual_pixel); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageWhitePoint(float x, float y) For IM7 the prototype is proto bool Imagick::setImageWhitePoint(float x, float y, float z) Sets the image chromaticity white point. */ PHP_METHOD(Imagick, setImageWhitePoint) { php_imagick_object *intern; double x, y; #if MagickLibVersion >= 0x700 double z; #endif MagickBooleanType status; /* Parse parameters given to function */ #if MagickLibVersion >= 0x700 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &x, &y, &z) == FAILURE) { #else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { #endif return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickSetImageWhitePoint(intern->magick_wand, x, y, z); #else status = MagickSetImageWhitePoint(intern->magick_wand, x, y); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image white point" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::sigmoidalContrastImage(bool sharpen, float contrast, float midpoint[, int channel]) Adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm. Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows. Contrast indicates how much to increase the contrast (0 is none; 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in the resultant image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to true to increase the image contrast otherwise the contrast is reduced. */ PHP_METHOD(Imagick, sigmoidalContrastImage) { php_imagick_object *intern; zend_bool sharpen; double contrast, midpoint; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "bdd|l", &sharpen, &contrast, &midpoint, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSigmoidalContrastImageChannel(intern->magick_wand, channel, sharpen, contrast, midpoint); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to sigmoidal contrast image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::stereoImage(Imagick offset_wand) Composites two images and produces a single image that is the composite of a left and right image of a stereo pair */ PHP_METHOD(Imagick, stereoImage) { MagickWand *tmp_wand; zval *magick_object; php_imagick_object *intern, *intern_second, *intern_return; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &magick_object, php_imagick_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(magick_object); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; tmp_wand = MagickStereoImage(intern->magick_wand, intern_second->magick_wand); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Stereo image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto Imagick Imagick::textureImage(Imagick texture_wand) Repeatedly tiles the texture image across and down the image canvas. */ PHP_METHOD(Imagick, textureImage) { MagickWand *tmp_wand; zval *magick_object; php_imagick_object *intern, *intern_second, *intern_return; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &magick_object, php_imagick_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(magick_object); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; tmp_wand = MagickTextureImage(intern->magick_wand, intern_second->magick_wand); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Texture image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::tintImage(ImagickPixel tint, ImagickPixel opacity, bool legacy = false) Applies a color vector to each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied. If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0 */ PHP_METHOD(Imagick, tintImage) { php_imagick_object *intern; zval *tint_param, *opacity_param; MagickBooleanType status; PixelWand *tint_wand, *opacity_wand; zend_bool tint_allocated, opacity_allocated; zend_bool legacy = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|b", &tint_param, &opacity_param, &legacy) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tint_wand = php_imagick_zval_to_pixelwand (tint_param, IMAGICK_CLASS, &tint_allocated TSRMLS_CC); if (!tint_wand) return; if (legacy) { opacity_wand = php_imagick_zval_to_opacity(opacity_param, IMAGICK_CLASS, &opacity_allocated TSRMLS_CC); } else { opacity_wand = php_imagick_zval_to_pixelwand(opacity_param, IMAGICK_CLASS, &opacity_allocated TSRMLS_CC); } if (!opacity_wand) { if (tint_allocated) tint_wand = DestroyPixelWand (tint_wand); return; } status = MagickTintImage(intern->magick_wand, tint_wand, opacity_wand); if (tint_allocated) tint_wand = DestroyPixelWand (tint_wand); if (opacity_allocated) opacity_wand = DestroyPixelWand (opacity_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable tint image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::unsharpMaskImage(float radius, float sigma, float amount, float threshold[, int channel]) Sharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and Imagick::UnsharpMaskImage() selects a suitable radius for you. */ PHP_METHOD(Imagick, unsharpMaskImage) { php_imagick_object *intern; double radius, sigma, amount, threshold; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd|l", &radius, &sigma, &amount, &threshold, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickUnsharpMaskImageChannel(intern->magick_wand, channel, radius, sigma, amount, threshold); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to unsharp mask image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x700 /* {{{ proto bool Imagick::convolveImage(array kernel[, int channel]) Applies a custom convolution kernel to the image. */ PHP_METHOD(Imagick, convolveImage) { zval *objvar; php_imagick_object *intern; php_imagickkernel_object *kernel; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", &objvar, php_imagickkernel_sc_entry, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); kernel = Z_IMAGICKKERNEL_P(objvar); IMAGICK_KERNEL_NOT_NULL_EMPTY(kernel); status = MagickConvolveImageChannel(intern->magick_wand, channel, kernel->kernel_info); // No magick is going to happen if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Failed to filter image" TSRMLS_CC); return; } RETURN_TRUE; } #else /* {{{ proto bool Imagick::convolveImage(array kernel[, int channel]) Applies a custom convolution kernel to the image. */ PHP_METHOD(Imagick, convolveImage) { php_imagick_object *intern; MagickBooleanType status; zval *kernel_array; double *kernel; im_long channel = DefaultChannels; unsigned long order = 0; im_long num_elements = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &kernel_array, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; kernel = php_imagick_zval_to_double_array(kernel_array, &num_elements TSRMLS_CC); if (!kernel) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to read matrix array" TSRMLS_CC); return; } order = (unsigned long) sqrt(num_elements); status = MagickConvolveImageChannel(intern->magick_wand, channel, order, kernel); efree(kernel); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to convolve image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif /* {{{ proto bool Imagick::cycleColormapImage(int displace) Displaces an image's colormap by a given number of positions. If you cycle the colormap a number of times you can produce a psychodelic effect. */ PHP_METHOD(Imagick, cycleColormapImage) { php_imagick_object *intern; im_long displace; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &displace) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickCycleColormapImage(intern->magick_wand, displace); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to cycle image colormap" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::deconstructImages() Compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers. */ PHP_METHOD(Imagick, deconstructImages) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickDeconstructImages(intern->magick_wand); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Deconstruct image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto Imagick Imagick::getImageRegion(int width, int height, int x, int y) Extracts a region of the image and returns it as a new image. */ PHP_METHOD(Imagick, getImageRegion) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; im_long width, height, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &width, &height, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickGetImageRegion(intern->magick_wand, width, height, x, y); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Get image region failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::despeckleImage() Reduces the speckle noise in an image while perserving the edges of the original image. */ PHP_METHOD(Imagick, despeckleImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickDespeckleImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to despeckle image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::edgeImage(float radius) Enhance edges within the image with a convolution filter of the given radius. Use a radius of 0 and Edge() selects a suitable radius for you. */ PHP_METHOD(Imagick, edgeImage) { php_imagick_object *intern; double radius; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &radius) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickEdgeImage(intern->magick_wand, radius); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to edge image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::embossImage(float radius, float sigma) Returns a grayscale image with a three-dimensional effect. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and it will choose a suitable radius for you. */ PHP_METHOD(Imagick, embossImage) { php_imagick_object *intern; double radius, sigma; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &radius, &sigma) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickEmbossImage(intern->magick_wand, radius, sigma); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to emboss image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::enhanceImage() Applies a digital filter that improves the quality of a noisy image. */ PHP_METHOD(Imagick, enhanceImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickEnhanceImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to enchance image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::equalizeImage() Equalizes the image histogram. */ PHP_METHOD(Imagick, equalizeImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickEqualizeImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to equalize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::evaluateImage(int op, float constant[, int channel]) Applys an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image. */ PHP_METHOD(Imagick, evaluateImage) { php_imagick_object *intern; im_long evaluate_operator; double constant; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ld|l", &evaluate_operator, &constant, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickEvaluateImageChannel(intern->magick_wand, channel, evaluate_operator, constant); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to evaluate image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x687 /* {{{ proto bool Imagick::evaluateImages(int EVALUATE_CONSTANT) Merge multiple images of the same size together with the selected operator. http://www.imagemagick.org/Usage/layers/#evaluate-sequence */ PHP_METHOD(Imagick, evaluateImages) { php_imagick_object *intern, *intern_return; im_long evaluate_operator; MagickBooleanType status; MagickWand *evaluated_wand; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &evaluate_operator) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; // MagickEvaluateImages appears to crash if index is not zero. #if MagickLibVersion > 0x628 /* Get the current iterator position */ status = MagickSetIteratorIndex(intern->magick_wand, 0); #else status = MagickSetImageIndex(intern->magick_wand, 0); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set iterator index" TSRMLS_CC); return; } evaluated_wand = MagickEvaluateImages(intern->magick_wand, evaluate_operator); object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, evaluated_wand); return; } /* }}} */ #endif //MagickLibVersion >= 0x687 #if MagickLibVersion > 0x655 /* {{{ proto bool Imagick::forwardfouriertransformimage(bool magnitude) //http://www.fftw.org/ yum install fftw-devel fftw ./configure --enable-hdri */ PHP_METHOD(Imagick, forwardFourierTransformImage) { php_imagick_object *intern; zend_bool magnitude; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &magnitude) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickForwardFourierTransformImage(intern->magick_wand, magnitude); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to forwardfouriertransformimage image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif /* {{{ proto array Imagick::getImageGeometry() Returns the width and height as an associative array. */ PHP_METHOD(Imagick, getImageGeometry) { long width,height; php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; width = MagickGetImageWidth(intern->magick_wand); height = MagickGetImageHeight(intern->magick_wand); array_init(return_value); add_assoc_long(return_value, "width", width); add_assoc_long(return_value, "height", height); return; } /* }}} */ #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) /* {{{ proto ImagickPixel Imagick::getImageAttribute(string key ) Returns a named attribute */ PHP_METHOD(Imagick, getImageAttribute) { php_imagick_object *intern; char *key, *attribute; IM_LEN_TYPE key_len; IMAGICK_METHOD_DEPRECATED("Imagick", "getImageAttribute"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &key, &key_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); attribute = MagickGetImageAttribute(intern->magick_wand, key); if (!attribute) { RETURN_FALSE; } IM_ZVAL_STRING(return_value, attribute); IMAGICK_FREE_MAGICK_MEMORY(attribute); return; } /* }}} */ #endif #endif /* {{{ proto ImagickPixel Imagick::getImageBackgroundColor() Returns the image background color. */ PHP_METHOD(Imagick, getImageBackgroundColor) { php_imagick_object *intern; php_imagickpixel_object *internp; MagickBooleanType status; PixelWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = NewPixelWand(); status = MagickGetImageBackgroundColor(intern->magick_wand, tmp_wand); if (tmp_wand == (PixelWand *)NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image background color" TSRMLS_CC); return; } if (status == MagickFalse) { tmp_wand = DestroyPixelWand(tmp_wand); php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image background color" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ /* {{{ proto array Imagick::getImageBluePrimary() Returns the chromaticy green primary point. IM6: Returns an array with the keys "x" and "y". IM7: Returns an array with the keys "x", "y" and "z". */ PHP_METHOD(Imagick, getImageBluePrimary) { php_imagick_object *intern; MagickBooleanType status; double x, y; #if MagickLibVersion >= 0x700 double z; #endif if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickGetImageBluePrimary(intern->magick_wand, &x, &y, &z); #else status = MagickGetImageBluePrimary(intern->magick_wand, &x, &y); #endif if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image blue primary" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "x", x); add_assoc_double(return_value, "y", y); #if MagickLibVersion >= 0x700 add_assoc_double(return_value, "z", z); #endif return; } /* }}} */ /* {{{ proto ImagickPixel Imagick::getImageBorderColor() Returns the image border color. */ PHP_METHOD(Imagick, getImageBorderColor) { php_imagick_object *intern; php_imagickpixel_object *internp; MagickBooleanType status; PixelWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = NewPixelWand(); status = MagickGetImageBorderColor(intern->magick_wand, tmp_wand); if (tmp_wand == (PixelWand *)NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image border color" TSRMLS_CC); return; } if (status == MagickFalse) { tmp_wand = DestroyPixelWand(tmp_wand); php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image border color" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ /* {{{ proto int Imagick::getImageChannelDepth() Gets the depth for a particular image channel. */ PHP_METHOD(Imagick, getImageChannelDepth) { php_imagick_object *intern; im_long channel_type, channel_depth; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; channel_depth = MagickGetImageChannelDepth(intern->magick_wand, channel_type); RETVAL_LONG(channel_depth); } /* }}} */ /* {{{ proto float Imagick::getImageChannelDistortion(Imagick reference, int channel, int metric) Compares one or more image channels of an image to a reconstructed image and returns the specified distortion metric. */ PHP_METHOD(Imagick, getImageChannelDistortion) { zval *objvar; php_imagick_object *intern, *intern_second; im_long channel_type, metric_type; double distortion; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Oll", &objvar, php_imagick_sc_entry, &channel_type, &metric_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; status = MagickGetImageChannelDistortion(intern->magick_wand, intern_second->magick_wand, channel_type, metric_type, &distortion); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image channel distortion" TSRMLS_CC); return; } RETVAL_DOUBLE(distortion); } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto array Imagick::getImageChannelExtrema(int channel) Gets the extrema for one or more image channels. Return value is an associative array with the keys "minima" and "maxima". */ PHP_METHOD(Imagick, getImageChannelExtrema) { php_imagick_object *intern; im_long channel_type; size_t minima, maxima; MagickBooleanType status; IMAGICK_METHOD_DEPRECATED ("Imagick", "getImageChannelExtrema"); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGetImageChannelExtrema(intern->magick_wand, channel_type, &minima, &maxima); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image channel extrema" TSRMLS_CC); return; } array_init(return_value); add_assoc_long(return_value, "minima", minima); add_assoc_long(return_value, "maxima", maxima); return; } /* }}} */ #endif //#if MagickLibVersion < 0x700 #endif /* {{{ proto array Imagick::getImageChannelMean(int channel) Gets the mean and standard deviation of one or more image channels. Return value is an associative array with the keys "mean" and "standardDeviation". */ PHP_METHOD(Imagick, getImageChannelMean) { php_imagick_object *intern; im_long channel_type; double mean, standard_deviation; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGetImageChannelMean(intern->magick_wand, channel_type, &mean, &standard_deviation); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image channel mean" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "mean", mean); add_assoc_double(return_value, "standardDeviation", standard_deviation); return; } /* }}} */ /* {{{ proto array Imagick::getImageChannelStatistics() Returns statistics for each channel in the image. The statistics incude the channel depth, its minima and maxima, the mean, and the standard deviation. You can access the red channel mean, for example, like this: */ PHP_METHOD(Imagick, getImageChannelStatistics) { #if PHP_VERSION_ID >= 70000 zval tmp; #else zval *tmp; #endif const long channels[] = { UndefinedChannel, RedChannel, CyanChannel, GreenChannel, MagentaChannel, BlueChannel, YellowChannel, OpacityChannel, BlackChannel, #if MagickLibVersion < 0x700 MatteChannel #endif }; php_imagick_object *intern; ChannelStatistics *statistics; unsigned int i; #if MagickLibVersion < 0x700 unsigned int elements = 10; #endif // #if MagickLibVersion >= 0x700 if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 statistics = MagickGetImageStatistics(intern->magick_wand); #else statistics = MagickGetImageChannelStatistics(intern->magick_wand); #endif array_init(return_value); #if MagickLibVersion >= 0x700 for (i=0; i < sizeof(channels)/sizeof(channels[0]); i++) { #if PHP_VERSION_ID >= 70000 array_init(&tmp); add_assoc_double(&tmp, "mean", statistics[i].mean); add_assoc_double(&tmp, "minima", statistics[i].minima); add_assoc_double(&tmp, "maxima", statistics[i].maxima); add_assoc_double(&tmp, "standardDeviation", statistics[i].standard_deviation); #if MagickLibVersion < 0x635 add_assoc_long(&tmp, "scale", statistics[i].scale); #endif //0x635 add_assoc_long(&tmp, "depth", statistics[i].depth); add_index_zval(return_value, i, &tmp); #else //not ZE3 MAKE_STD_ZVAL(tmp); array_init(tmp); add_assoc_double(tmp, "mean", statistics[i].mean); add_assoc_double(tmp, "minima", statistics[i].minima); add_assoc_double(tmp, "maxima", statistics[i].maxima); add_assoc_double(tmp, "standardDeviation", statistics[i].standard_deviation); #if MagickLibVersion < 0x635 add_assoc_long(&tmp, "scale", statistics[i].scale); #endif //0x635 add_assoc_long(tmp, "depth", statistics[i].depth); add_index_zval(return_value, channels[i], tmp); #endif //end ZE3 } #else //below MagickLibVersion>= 0x700 for (i = 0; i < elements ; i++) { #if PHP_VERSION_ID >= 70000 array_init(&tmp); add_assoc_double(&tmp, "mean", statistics[channels[i]].mean); add_assoc_double(&tmp, "minima", statistics[channels[i]].minima); add_assoc_double(&tmp, "maxima", statistics[channels[i]].maxima); add_assoc_double(&tmp, "standardDeviation", statistics[channels[i]].standard_deviation); #if MagickLibVersion < 0x635 add_assoc_long(&tmp, "scale", statistics[channels[i]].scale); #endif add_assoc_long(&tmp, "depth", statistics[channels[i]].depth); add_index_zval(return_value, channels[i], &tmp); #else MAKE_STD_ZVAL(tmp); array_init(tmp); add_assoc_double(tmp, "mean", statistics[channels[i]].mean); add_assoc_double(tmp, "minima", statistics[channels[i]].minima); add_assoc_double(tmp, "maxima", statistics[channels[i]].maxima); add_assoc_double(tmp, "standardDeviation", statistics[channels[i]].standard_deviation); #if MagickLibVersion < 0x635 add_assoc_long(&tmp, "scale", statistics[channels[i]].scale); #endif add_assoc_long(tmp, "depth", statistics[channels[i]].depth); add_index_zval(return_value, channels[i], tmp); #endif } #endif //etc. // channel_statistics[i].sum_squared*=area; // channel_statistics[i].sum_cubed*=area; // channel_statistics[i].sum_fourth_power*=area; MagickRelinquishMemory(statistics); return; } /* }}} */ /* {{{ proto ImagickPixel Imagick::getImageColormapColor(int index, ImagickPixel color) Returns the color of the specified colormap index. */ PHP_METHOD(Imagick, getImageColormapColor) { php_imagick_object *intern; php_imagickpixel_object *internp; MagickBooleanType status; PixelWand *tmp_wand; im_long index; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = NewPixelWand(); status = MagickGetImageColormapColor(intern->magick_wand, index , tmp_wand); if (tmp_wand == (PixelWand *)NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image colormap color" TSRMLS_CC); return; } if (status == MagickFalse) { tmp_wand = DestroyPixelWand(tmp_wand); php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image colormap color" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ /* {{{ proto int Imagick::getImageColorspace() Gets the image colorspace. */ PHP_METHOD(Imagick, getImageColorspace) { php_imagick_object *intern; long colorSpace; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; colorSpace = MagickGetImageColorspace(intern->magick_wand); RETVAL_LONG(colorSpace); } /* }}} */ /* {{{ proto int Imagick::getImageCompose() Returns the composite operator associated with the image. */ PHP_METHOD(Imagick, getImageCompose) { php_imagick_object *intern; long composite; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; composite = MagickGetImageCompose(intern->magick_wand); RETVAL_LONG(composite); } /* }}} */ /* {{{ proto int Imagick::getImageDelay() Gets the image delay. */ PHP_METHOD(Imagick, getImageDelay) { php_imagick_object *intern; long delay; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; delay = MagickGetImageDelay(intern->magick_wand); RETVAL_LONG(delay); } /* }}} */ /* {{{ proto int Imagick::getImageDepth() Gets the image depth. */ PHP_METHOD(Imagick, getImageDepth) { php_imagick_object *intern; long depth; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; depth = MagickGetImageDepth(intern->magick_wand); RETVAL_LONG(depth); } /* }}} */ /* {{{ proto float Imagick::getImageDistortion(MagickWand reference, int metric) Compares an image to a reconstructed image and returns the specified distortion metric. */ PHP_METHOD(Imagick, getImageDistortion) { zval *objvar; php_imagick_object *intern, *intern_second; im_long metric_type; double distortion; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &objvar, php_imagick_sc_entry, &metric_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; status = MagickGetImageDistortion(intern->magick_wand, intern_second->magick_wand, metric_type, &distortion); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image distortion" TSRMLS_CC); return; } RETVAL_DOUBLE(distortion); } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto array Imagick::getImageExtrema() Gets the extrema for the image. Returns an associative array with the keys "min" and "max". */ PHP_METHOD(Imagick, getImageExtrema) { php_imagick_object *intern; size_t min, max; MagickBooleanType status; IMAGICK_METHOD_DEPRECATED ("Imagick", "getImageExtrema"); if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGetImageExtrema(intern->magick_wand, &min, &max); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image extrema" TSRMLS_CC); return; } array_init(return_value); add_assoc_long(return_value, "min", min); add_assoc_long(return_value, "max", max); return; } /* }}} */ #endif //#if MagickLibVersion < 0x700 #endif /* {{{ proto long Imagick::getImageDispose() Gets the image disposal method. */ PHP_METHOD(Imagick, getImageDispose) { php_imagick_object *intern; long dispose; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; dispose = MagickGetImageDispose(intern->magick_wand); RETVAL_LONG(dispose); } /* }}} */ /* {{{ proto float Imagick::getImageGamma() Gets the image gamma. */ PHP_METHOD(Imagick, getImageGamma) { php_imagick_object *intern; double gamma; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; gamma = MagickGetImageGamma(intern->magick_wand); RETVAL_DOUBLE(gamma); } /* }}} */ /* {{{ proto array Imagick::getImageGreenPrimary() Returns the chromaticy green primary point. IM6: Returns an array with the keys "x" and "y". IM7: Returns an array with the keys "x", "y" and "z". */ PHP_METHOD(Imagick, getImageGreenPrimary) { php_imagick_object *intern; double x, y; #if MagickLibVersion >= 0x700 double z; #endif MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickGetImageGreenPrimary(intern->magick_wand, &x, &y, &z); #else status = MagickGetImageGreenPrimary(intern->magick_wand, &x, &y); #endif if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image green primary" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "x", x); add_assoc_double(return_value, "y", y); #if MagickLibVersion >= 0x700 add_assoc_double(return_value, "z", z); #endif return; } /* }}} */ /* {{{ proto int Imagick::getImageHeight() Returns the image height. */ PHP_METHOD(Imagick, getImageHeight) { php_imagick_object *intern; long height; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; height = MagickGetImageHeight(intern->magick_wand); RETVAL_LONG(height); } /* }}} */ /* {{{ proto array Imagick::getImageHistogram() Returns the image histogram as an array of ImagickPixel objects. */ PHP_METHOD(Imagick, getImageHistogram) { php_imagick_object *intern; php_imagickpixel_object *internp; PixelWand **wand_array; size_t colors = 0; unsigned long i; #if PHP_VERSION_ID >= 70000 zval tmp_pixelwand; #else zval *tmp_pixelwand; #endif if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; wand_array = MagickGetImageHistogram(intern->magick_wand, &colors); array_init(return_value); for (i = 0; i < colors; i++) { if (wand_array[i]) { #if PHP_VERSION_ID >= 70000 object_init_ex(&tmp_pixelwand, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(&tmp_pixelwand); php_imagick_replace_pixelwand(internp, wand_array[i]); add_next_index_zval(return_value, &tmp_pixelwand); #else MAKE_STD_ZVAL(tmp_pixelwand); object_init_ex(tmp_pixelwand, php_imagickpixel_sc_entry); internp = (php_imagickpixel_object *)zend_object_store_get_object(tmp_pixelwand TSRMLS_CC); php_imagick_replace_pixelwand(internp, wand_array[i]); add_next_index_zval(return_value, tmp_pixelwand); #endif } } IMAGICK_FREE_MAGICK_MEMORY(wand_array); return; } /* }}} */ /* {{{ proto int Imagick::getImageInterlaceScheme() Gets the image interlace scheme. */ PHP_METHOD(Imagick, getImageInterlaceScheme) { php_imagick_object *intern; long interlace; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; interlace = MagickGetImageInterlaceScheme(intern->magick_wand); RETVAL_LONG(interlace); } /* }}} */ /* {{{ proto int Imagick::getImageIterations() Gets the image iterations. */ PHP_METHOD(Imagick, getImageIterations) { php_imagick_object *intern; long iterations; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; iterations = MagickGetImageIterations(intern->magick_wand); RETVAL_LONG(iterations); } /* }}} */ #if MagickLibVersion < 0x700 /* {{{ proto ImagickPixel Imagick::getImageMatteColor() Returns the image matte color. */ PHP_METHOD(Imagick, getImageMatteColor) { php_imagick_object *intern; php_imagickpixel_object *internp; MagickBooleanType status; PixelWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = NewPixelWand(); status = MagickGetImageMatteColor(intern->magick_wand, tmp_wand); if (tmp_wand == (PixelWand *)NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image matte color" TSRMLS_CC); return; } if (status == MagickFalse) { tmp_wand = DestroyPixelWand(tmp_wand); php_imagick_convert_imagick_exception(intern->magick_wand, "Unable get image matter color" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ #endif //#if MagickLibVersion < 0x700 /* {{{ proto array Imagick::getImagePage() Returns the page geometry associated with the image in an array with the keys "width", "height", "x", and "y". */ PHP_METHOD(Imagick, getImagePage) { php_imagick_object *intern; MagickBooleanType status; size_t width, height; ssize_t x, y; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGetImagePage(intern->magick_wand, &width, &height, &x, &y); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image page" TSRMLS_CC); return; } array_init(return_value); add_assoc_long(return_value, "width", width); add_assoc_long(return_value, "height", height); add_assoc_long(return_value, "x", x); add_assoc_long(return_value, "y", y); return; } /* }}} */ /* {{{ proto ImagickPixel Imagick::getImagePixelColor(int x, int y) Returns the color of the specified pixel. */ PHP_METHOD(Imagick, getImagePixelColor) { php_imagick_object *intern; php_imagickpixel_object *internp; MagickBooleanType status; PixelWand *tmp_wand; im_long x, y; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = NewPixelWand(); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Failed to allocate new PixelWand" TSRMLS_CC); return; } status = MagickGetImagePixelColor(intern->magick_wand, x, y , tmp_wand); if (status == MagickFalse) { tmp_wand = DestroyPixelWand(tmp_wand); php_imagick_convert_imagick_exception(intern->magick_wand, "Unable get image pixel color" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ #if IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR /* {{{ proto void setImagePixelColor(int $x, int $y, ImagickPixel|string $color) Returns the color of the specified pixel. */ PHP_METHOD(Imagick, setImagePixelColor) { php_imagick_object *intern; zval *param; MagickBooleanType status; im_long x, y; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llz", &x, &y, ¶m) == FAILURE) { return; } color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImagePixelColor(intern->magick_wand, x, y , color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image pixel color" TSRMLS_CC); return; } return; } /* }}} */ #endif /* {{{ proto string Imagick::getImageProfile(string name) Returns the named image profile. */ PHP_METHOD(Imagick, getImageProfile) { php_imagick_object *intern; char *profile, *name; IM_LEN_TYPE name_len; #if MagickLibVersion < 0x628 long length; #else size_t length; #endif if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; profile = (char *)MagickGetImageProfile(intern->magick_wand, name, &length); if (profile) { IM_ZVAL_STRINGL(return_value, profile, length); IMAGICK_FREE_MAGICK_MEMORY(profile); return; } php_imagick_throw_exception(IMAGICK_CLASS, "Can not get image profile" TSRMLS_CC); return; } /* }}} */ /* {{{ proto array Imagick::getImageRedPrimary() Returns the chromaticy red primary point as an array. IM6: with the keys "x" and "y". IM7: Returns an array with the keys "x", "y" and "z". */ PHP_METHOD(Imagick, getImageRedPrimary) { php_imagick_object *intern; MagickBooleanType status; double x, y; #if MagickLibVersion >= 0x700 double z; #endif if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickGetImageRedPrimary(intern->magick_wand, &x, &y, &z); #else status = MagickGetImageRedPrimary(intern->magick_wand, &x, &y); #endif if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image red primary" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "x", x); add_assoc_double(return_value, "y", y); #if MagickLibVersion >= 0x700 add_assoc_double(return_value, "z", z); #endif return; } /* }}} */ /* {{{ proto int Imagick::getImageRenderingIntent() Gets the image rendering intent. */ PHP_METHOD(Imagick, getImageRenderingIntent) { php_imagick_object *intern; long renderingIntent; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; renderingIntent = MagickGetImageRenderingIntent(intern->magick_wand); RETVAL_LONG(renderingIntent); } /* }}} */ /* {{{ proto array Imagick::getImageResolution() Gets the image X and Y resolution. */ PHP_METHOD(Imagick, getImageResolution) { php_imagick_object *intern; MagickBooleanType status; double x, y; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGetImageResolution(intern->magick_wand, &x, &y); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image resolution" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "x", x); add_assoc_double(return_value, "y", y); return; } /* }}} */ /* {{{ proto int Imagick::getImageScene() Gets the image scene. */ PHP_METHOD(Imagick, getImageScene) { php_imagick_object *intern; unsigned long scene; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; scene = MagickGetImageScene(intern->magick_wand); RETVAL_LONG(scene); } /* }}} */ /* {{{ proto string Imagick::getImageSignature() Generates an SHA-256 message digest for the image pixel stream. */ PHP_METHOD(Imagick, getImageSignature) { php_imagick_object *intern; char *signature; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; signature = MagickGetImageSignature(intern->magick_wand); IM_ZVAL_STRING(return_value, signature); IMAGICK_FREE_MAGICK_MEMORY(signature); return; } /* }}} */ /* {{{ proto int Imagick::getImageTicksPerSecond() Gets the image ticks-per-second. */ PHP_METHOD(Imagick, getImageTicksPerSecond) { php_imagick_object *intern; unsigned long ticks; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; ticks = MagickGetImageTicksPerSecond(intern->magick_wand); RETVAL_LONG(ticks); } /* }}} */ /* {{{ proto int Imagick::getImageType() Gets the potential image type: */ PHP_METHOD(Imagick, getImageType) { php_imagick_object *intern; long imageType; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; imageType = MagickGetImageType(intern->magick_wand); RETVAL_LONG(imageType); } /* }}} */ /* {{{ proto int Imagick::getImageUnits() Gets the image units of resolution. */ PHP_METHOD(Imagick, getImageUnits) { php_imagick_object *intern; long resolutionType; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; resolutionType = MagickGetImageUnits(intern->magick_wand); RETVAL_LONG(resolutionType); } /* }}} */ /* {{{ proto int Imagick::getImageVirtualPixelMethod() Returns the virtual pixel method for the sepcified image. */ PHP_METHOD(Imagick, getImageVirtualPixelMethod) { php_imagick_object *intern; long pixelMethod; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; pixelMethod = MagickGetImageVirtualPixelMethod(intern->magick_wand); RETVAL_LONG(pixelMethod); } /* }}} */ /* {{{ proto array Imagick::getImageWhitePoint() Returns the chromaticy white point as an associative array. IM6: with the keys "x" and "y". IM7: with the keys "x", "y" and "z". */ PHP_METHOD(Imagick, getImageWhitePoint) { php_imagick_object *intern; MagickBooleanType status; double x, y; #if MagickLibVersion >= 0x700 double z; #endif if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickGetImageWhitePoint(intern->magick_wand, &x, &y, &z); #else status = MagickGetImageWhitePoint(intern->magick_wand, &x, &y); #endif if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image white point" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "x", x); add_assoc_double(return_value, "y", y); #if MagickLibVersion >= 0x700 add_assoc_double(return_value, "z", z); #endif return; } /* }}} */ /* {{{ proto int Imagick::getImageWidth() Returns the image width. */ PHP_METHOD(Imagick, getImageWidth) { php_imagick_object *intern; unsigned long width; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; width = MagickGetImageWidth(intern->magick_wand); RETVAL_LONG(width); } /* }}} */ /* {{{ proto int Imagick::getNumberImages() Returns the number of images associated with Imagick object. */ PHP_METHOD(Imagick, getNumberImages) { php_imagick_object *intern; unsigned long num_images; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); num_images = MagickGetNumberImages(intern->magick_wand); RETVAL_LONG(num_images); } /* }}} */ /* Resizes an image so that it is 'bestfit' for the bounding box If the image does not fill the box completely the box is filled with image's background color. The background color can be set using MagickSetImageBackgroundColor */ #if MagickLibVersion > 0x631 static zend_bool s_resize_bounding_box(MagickWand *magick_wand, im_long box_width, im_long box_height, zend_bool fill, zend_bool legacy) { im_long new_width, new_height; im_long extent_x, extent_y; /* Calculate dimensions */ if (!php_imagick_thumbnail_dimensions(magick_wand, 1, box_width, box_height, &new_width, &new_height, legacy)) { return 0; } /* Resize the image to the new size */ if (MagickThumbnailImage(magick_wand, new_width, new_height) == MagickFalse) { return 0; } /* If user does not want to fill we are all done here */ if (!fill) { return 1; } /* In case user wants to fill use extent for it rather than creating a new canvas */ extent_x = (box_width > new_width) ? ((box_width - new_width) / 2) : 0; extent_y = (box_height > new_height) ? ((box_height - new_height) / 2) : 0; if (MagickExtentImage(magick_wand, box_width, box_height, extent_x * -1, extent_y * -1) == MagickFalse) { return 0; } return 1; } #endif /* {{{ proto bool Imagick::thumbnailImage(int columns, int rows[, bool bestfit = false[, bool fill = false[, bool legacy = false]]]) Changes the size of an image to the given dimensions and removes any associated profiles. If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0. If false, the calculations should produce the same results as ImageMagick CLI does. */ PHP_METHOD(Imagick, thumbnailImage) { im_long width = 0, height = 0, new_width, new_height; php_imagick_object *intern; zend_bool bestfit = 0, fill = 0; zend_bool legacy = 0; #if PHP_VERSION_ID < 80100 // This uses an implicit conversion of null to 0 for longs if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll|bbb", &width, &height, &bestfit, &fill, &legacy) == FAILURE) { return; } #else // Changing longs to be nullable "l!", means that zpp // wants to write whether they were null to a variable. bool width_is_null = 0; bool height_is_null = 0; /* Parse parameters given to function */ if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "l!l!|bbb", &width, &width_is_null, &height, &height_is_null, &bestfit, &fill, &legacy) == FAILURE) { return; } #endif intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (bestfit && fill) { #if MagickLibVersion > 0x631 if (!s_resize_bounding_box(intern->magick_wand, width, height, fill, legacy)) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to resize and fill image" TSRMLS_CC); return; } #else php_imagick_throw_exception(IMAGICK_CLASS, "Fill parameter is only supported with ImageMagick 6.3.2+" TSRMLS_CC); return; #endif } else { if (!php_imagick_thumbnail_dimensions(intern->magick_wand, bestfit, width, height, &new_width, &new_height, legacy)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid image geometry" TSRMLS_CC); return; } /* No magick is going to happen */ if (MagickThumbnailImage(intern->magick_wand, new_width, new_height) == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to thumbnail image" TSRMLS_CC); return; } } RETURN_TRUE; } /* }}} */ /* This is not universally safe to use, but is safe enough for values that will be encountered for image dimensions. */ static inline double im_round_helper_class(double value) { if (value >= 0.0) { return floor(value + 0.5); } else { return ceil(value - 0.5); } } static void s_calculate_crop( im_long orig_width, im_long orig_height, im_long desired_width, im_long desired_height, im_long *new_width, im_long *new_height, im_long *offset_x, im_long *offset_y, zend_bool legacy ) { double ratio_x, ratio_y; long temp_new_width, temp_new_height; ratio_x = ((double) desired_width / (double) orig_width); ratio_y = ((double) desired_height / (double) orig_height); if (ratio_x > ratio_y) { temp_new_width = desired_width; if (legacy) { temp_new_height = (long)(ratio_x * (double)orig_height); } else { temp_new_height = im_round_helper_class(ratio_x * (double)orig_height); } } else { temp_new_height = desired_height; if (legacy) { temp_new_width = (long)(ratio_y * (double)orig_width); } else { temp_new_width = im_round_helper_class(ratio_y * (double)orig_width); } } *new_width = temp_new_width; *new_height = temp_new_height; *offset_x = (long) ((temp_new_width - desired_width) / 2); *offset_y = (long) ((temp_new_height - desired_height) / 2); } /* {{{ proto array Imagick::calculateCrop(long orig_width, long orig_height, long desired_width, long desired_height[, bool legacy = false]) Calculates the cropping values that will be used by a crop operation. */ PHP_METHOD(Imagick, calculateCrop) { im_long orig_width, orig_height; im_long desired_width, desired_height; im_long new_width, new_height; im_long offset_x, offset_y; zend_bool legacy = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll|b", &orig_width, &orig_height, &desired_width, &desired_height, &legacy) == FAILURE) { return; } if (orig_width <= 0 || orig_height <= 0 || desired_width <= 0 || desired_height <= 0) { php_imagick_throw_exception(IMAGICK_CLASS, "All values must be above zero." TSRMLS_CC); } s_calculate_crop( orig_width, orig_height, desired_width, desired_height, &new_width, &new_height, &offset_x, &offset_y, legacy ); array_init(return_value); add_assoc_long(return_value, "width", new_width); add_assoc_long(return_value, "height", new_height); add_assoc_long(return_value, "offset_x", offset_x); add_assoc_long(return_value, "offset_y", offset_y); return; } /* }}} */ static zend_bool s_crop_thumbnail_image(MagickWand *magick_wand, im_long desired_width, im_long desired_height, zend_bool legacy TSRMLS_DC) { im_long offset_x = 0, offset_y = 0, new_width, new_height; im_long orig_width = (im_long)MagickGetImageWidth(magick_wand); im_long orig_height = (im_long)MagickGetImageHeight(magick_wand); /* Already at the size, just strip profiles */ if ((orig_width == desired_width) && (orig_height == desired_height)) { if (!MagickStripImage(magick_wand)) { return 0; } return 1; } s_calculate_crop( orig_width, orig_height, desired_width, desired_height, &new_width, &new_height, &offset_x, &offset_y, legacy ); if (MagickThumbnailImage(magick_wand, new_width, new_height) == MagickFalse) { return 0; } /* all done here */ if ((new_width == desired_width) && (new_height == desired_height)) { return 1; } if (MagickCropImage(magick_wand, desired_width, desired_height, offset_x, offset_y) == MagickFalse) { return 0; } MagickSetImagePage(magick_wand, desired_width, desired_height, 0, 0); return 1; } // /* {{{ proto bool Imagick::cropthumbnailImage(int columns, int rows[, bool legacy = false] ) Creates a cropped thumbnail at the requested size. If legacy is true, uses the incorrect behaviour that was present until Imagick 3.4.0. If false it uses the correct behaviour. */ PHP_METHOD(Imagick, cropThumbnailImage) { im_long crop_width, crop_height; zend_bool legacy = 0; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll|b", &crop_width, &crop_height, &legacy) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; /* The world collapses.. */ if (!s_crop_thumbnail_image(intern->magick_wand, crop_width, crop_height, legacy TSRMLS_CC)) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to crop-thumbnail image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::resetIterator(); Resets the iterator. Use it in conjunction with Imagick::nextImage() to iterate over all the images in a wand container. */ PHP_METHOD(Imagick, resetIterator) { php_imagick_object *intern; intern = Z_IMAGICK_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } /* No magick is going to happen */ if (intern->magick_wand == NULL) { RETURN_FALSE; } intern->next_out_of_bound = 0; MagickResetIterator(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setFirstIterator() Sets the wand iterator to the first image. */ PHP_METHOD(Imagick, setFirstIterator) { php_imagick_object *intern; intern = Z_IMAGICK_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } /* No magick is going to happen */ if (intern->magick_wand == NULL) { RETURN_FALSE; } intern->next_out_of_bound = 0; MagickSetFirstIterator(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setLastIterator() Sets the wand iterator to the last image. */ PHP_METHOD(Imagick, setLastIterator) { php_imagick_object *intern; intern = Z_IMAGICK_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } /* No magick is going to happen */ if (intern->magick_wand == NULL) { RETURN_FALSE; } intern->next_out_of_bound = 0; MagickSetLastIterator(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::previousImage() Assocates the previous image in an image list with the Imagick object. */ PHP_METHOD(Imagick, previousImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickPreviousImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { RETURN_FALSE; } intern->next_out_of_bound = 0; RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::nextImage() Associates the next image in the image list with an Imagick object. */ PHP_METHOD(Imagick, nextImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickNextImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { intern->next_out_of_bound = 1; RETURN_FALSE; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::hasPreviousImage() Returns true if the wand has more images when traversing the list in the reverse direction */ PHP_METHOD(Imagick, hasPreviousImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickHasPreviousImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { RETURN_FALSE; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::hasNextImage() Returns true if the wand has more images when traversing the list in the forward direction */ PHP_METHOD(Imagick, hasNextImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickHasNextImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { RETURN_FALSE; } RETURN_TRUE; } /* }}} */ /* {{{ proto int Imagick::getImageIndex() Returns the index of the current active image, within the Imagick object. */ PHP_METHOD(Imagick, getImageIndex) { MagickBooleanType status; php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); #if MagickLibVersion >= 0x700 status = MagickGetIteratorIndex(intern->magick_wand); #else status = MagickGetImageIndex(intern->magick_wand); #endif ZVAL_LONG(return_value, (long)status); return; } /* }}} */ /* {{{ proto bool Imagick::setImageIndex(int index) Returns the index of the current active image, within the Imagick object. */ PHP_METHOD(Imagick, setImageIndex) { im_long index; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); #if MagickLibVersion > 0x628 /* Get the current iterator position */ status = MagickSetIteratorIndex(intern->magick_wand, index); #else status = MagickSetImageIndex(intern->magick_wand, index); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image index" TSRMLS_CC); return; } intern->next_out_of_bound = 0; RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::removeImage() Removes an image from the image list. */ PHP_METHOD(Imagick, removeImage) { MagickBooleanType status; php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickRemoveImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to remove image" TSRMLS_CC); return; } intern->next_out_of_bound = 0; MagickSetLastIterator(intern->magick_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto string Imagick::getImageFilename() Returns the filename of a particular image in a sequence */ PHP_METHOD(Imagick, getImageFilename) { php_imagick_object *intern; char *filename; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; filename = MagickGetImageFilename(intern->magick_wand); if (filename == (char *)NULL) { return; } IM_ZVAL_STRING(return_value, filename); IMAGICK_FREE_MAGICK_MEMORY(filename); return; } /* }}} */ /* {{{ proto int Imagick::getImageSize() returns the image length in bytes */ PHP_METHOD(Imagick, getImageSize) { php_imagick_object *intern; #if MagickLibVersion >= 0x700 MagickSizeType length; MagickBooleanType status; #endif intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickGetImageLength(intern->magick_wand, &length); if (status == MagickFalse) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to acquire image length" TSRMLS_CC); return; } ZVAL_LONG(return_value, (long)length); #else ZVAL_LONG(return_value, (long)MagickGetImageSize(intern->magick_wand)); #endif return; } /* }}} */ static zend_bool s_image_has_format (MagickWand *magick_wand) { char *buffer; zend_bool ret; buffer = MagickGetImageFormat(magick_wand); ret = buffer && *buffer != '\0'; if (buffer) { MagickRelinquishMemory (buffer); } return ret; } /* {{{ proto string Imagick::getImageBlob() Returns the current image sequence as a string */ PHP_METHOD(Imagick, getImageBlob) { php_imagick_object *intern; unsigned char *image_contents; size_t image_size; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!s_image_has_format (intern->magick_wand)) { php_imagick_throw_exception(IMAGICK_CLASS, "Image has no format" TSRMLS_CC); return; } image_contents = MagickGetImageBlob(intern->magick_wand, &image_size); if (!image_contents) { return; } IM_ZVAL_STRINGL(return_value, (char *)image_contents, image_size); IMAGICK_FREE_MAGICK_MEMORY(image_contents); return; } /* }}} */ /* {{{ proto string Imagick::getImagesBlob() Returns all image sequences as a string */ PHP_METHOD(Imagick, getImagesBlob) { php_imagick_object *intern; unsigned char *image_contents; size_t image_size; int current; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion > 0x628 /* Get the current iterator position */ current = MagickGetIteratorIndex(intern->magick_wand); #else /* Get the current iterator position */ current = MagickGetImageIndex(intern->magick_wand); #endif /* Reset the iterator */ MagickResetIterator(intern->magick_wand); /* Loop all images to make sure they have a format */ while (MagickNextImage(intern->magick_wand)) { if (!s_image_has_format (intern->magick_wand)) { php_imagick_throw_exception(IMAGICK_CLASS, "Image has no format" TSRMLS_CC); return; } } #if MagickLibVersion > 0x628 /* Get the current iterator position */ status = MagickSetIteratorIndex(intern->magick_wand, current); #else /* Get the current iterator position */ status = MagickSetImageIndex(intern->magick_wand, current); #endif if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set the iterator index" TSRMLS_CC); return; } image_contents = MagickGetImagesBlob(intern->magick_wand, &image_size); if (!image_contents) { return; } IM_ZVAL_STRINGL(return_value, (char *)image_contents, image_size); IMAGICK_FREE_MAGICK_MEMORY(image_contents); return; } /* }}} */ /* {{{ proto string Imagick::getImageFormat() Returns the format of a particular image in a sequence. */ PHP_METHOD(Imagick, getImageFormat) { php_imagick_object *intern; char *format; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!s_image_has_format (intern->magick_wand)) { php_imagick_throw_exception(IMAGICK_CLASS, "Image has no format" TSRMLS_CC); return; } format = MagickGetImageFormat (intern->magick_wand); IM_ZVAL_STRING(return_value, format); IMAGICK_FREE_MAGICK_MEMORY(format); return; } /* }}} */ /* {{{ proto string Imagick::getImageMimeType() Returns the image mime-type */ PHP_METHOD(Imagick, getImageMimeType) { php_imagick_object *intern; char *format = NULL, *mime_type = NULL; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!s_image_has_format (intern->magick_wand)) { php_imagick_throw_exception(IMAGICK_CLASS, "Image has no format" TSRMLS_CC); return; } format = MagickGetImageFormat (intern->magick_wand); mime_type = (char *) MagickToMime(format); IMAGICK_FREE_MAGICK_MEMORY(format); if (!mime_type) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to get image mime-type" TSRMLS_CC); return; } IM_ZVAL_STRING(return_value, mime_type); IMAGICK_FREE_MAGICK_MEMORY(mime_type); return; } /* }}} */ static void s_add_assoc_str (zval *array, const char *key, const char *value) { //add_assoc_string (array, key, (char *)(value ? value : ""), copy); IM_add_assoc_string (array, key, (char *)(value ? value : "")); //TODO - if copy == 0 free the string? } static void s_add_named_strings (zval *array, const char *haystack TSRMLS_DC) { unsigned int i, found; char *last_ptr = NULL, *buffer; size_t num_keys; #if PHP_VERSION_ID >= 70000 zend_string *trim; zend_string *line_string; #else char *trim; #endif char *line; const char *str_keys [] = { "Format: ", "Units: ", "Type: ", "Colorspace: ", "Filesize: ", "Compression: " }; const char *arr_keys [] = { "format", "units", "type", "colorSpace", "fileSize", "compression" }; found = 0; buffer = estrdup (haystack); num_keys = sizeof (str_keys) / sizeof (str_keys[0]); line = php_strtok_r (buffer, "\r\n", &last_ptr); while ((found < num_keys) && line) { // Break the line further into tokens #if PHP_VERSION_ID >= 70000 line_string = zend_string_init(line, strlen(line), 0); //str, what, what_len, mode trim = php_trim(line_string, NULL, 0, 3); for (i = 0; i < num_keys; i++) { if (trim->val) { if (strncmp (trim->val, str_keys [i], strlen (str_keys [i])) == 0) { // This should be our line IM_add_assoc_string (array, arr_keys [i], trim->val + strlen (str_keys [i])); found++; } } } // zend_string_release(line_string); - 0 in zend_string_init means no need to free? zend_string_release(trim); line = php_strtok_r (NULL, "\r\n", &last_ptr); #else trim = php_trim(line, strlen(line), NULL, 0, NULL, 3 TSRMLS_CC); for (i = 0; i < num_keys; i++) { if (strncmp (trim, str_keys [i], strlen (str_keys [i])) == 0) { // This should be our line IM_add_assoc_string (array, arr_keys [i], trim + strlen (str_keys [i])); found++; } } efree (trim); line = php_strtok_r (NULL, "\r\n", &last_ptr); #endif } efree (buffer); } /* {{{ proto array Imagick::identifyImage([bool appendRawOutput] ) Identifies an image and returns the attributes. Attributes include the image width, height, size, and others. If true is passed as argument, then the raw output is appended to the array. */ PHP_METHOD(Imagick, identifyImage) { char *format, *identify, *filename, *signature; php_imagick_object *intern; zend_bool append_raw_string = 0; double x, y; #if PHP_VERSION_ID >= 70000 zval array; #else zval *array; #endif zval *pArray; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &append_raw_string) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; // This is to parse some string options, ugly hack but easier than using CommandOptionToMNemonic // or MagickOptionToMnemonic and FormatMagickSize, which have changed names and signatures between // versions that we support identify = MagickIdentifyImage (intern->magick_wand); // Actually generate the array ourselves array_init(return_value); // Name of the image filename = MagickGetImageFilename (intern->magick_wand); s_add_assoc_str (return_value, "imageName", filename); IMAGICK_FREE_MAGICK_MEMORY(filename); format = MagickGetImageFormat (intern->magick_wand); if (format) { char *mime_type = MagickToMime(format); if (mime_type) { s_add_assoc_str (return_value, "mimetype", mime_type); IMAGICK_FREE_MAGICK_MEMORY(mime_type); } else s_add_assoc_str (return_value, "mimetype", "unknown"); IMAGICK_FREE_MAGICK_MEMORY(format); } else s_add_assoc_str (return_value, "mimetype", "unknown"); s_add_named_strings (return_value, identify TSRMLS_CC); // Geometry is an associative array #if PHP_VERSION_ID >= 70000 array_init(&array); pArray = &array; #else MAKE_STD_ZVAL(array); pArray = array; #endif array_init(pArray); add_assoc_long (pArray, "width", MagickGetImageWidth (intern->magick_wand)); add_assoc_long (pArray, "height", MagickGetImageHeight (intern->magick_wand)); add_assoc_zval (return_value, "geometry", pArray); if (MagickGetImageResolution(intern->magick_wand, &x, &y) == MagickTrue) { #if PHP_VERSION_ID >= 70000 zval geometry_array; array_init(&geometry_array); add_assoc_double(&geometry_array, "x", x); add_assoc_double(&geometry_array, "y", y); add_assoc_zval(return_value, "resolution", &geometry_array); #else zval *p_geometry_array; MAKE_STD_ZVAL(p_geometry_array); array_init(p_geometry_array); add_assoc_double(p_geometry_array, "x", x); add_assoc_double(p_geometry_array, "y", y); add_assoc_zval(return_value, "resolution", p_geometry_array); #endif } signature = MagickGetImageSignature(intern->magick_wand); s_add_assoc_str (return_value, "signature", signature); IMAGICK_FREE_MAGICK_MEMORY(signature); if (append_raw_string == 1) IM_add_assoc_string (return_value, "rawOutput", identify); IMAGICK_FREE_MAGICK_MEMORY(identify); return; } /* }}} */ #undef imagick_option_to_string /* {{{ proto int Imagick::getImageColors() Gets the number of unique colors in the image. */ PHP_METHOD(Imagick, getImageColors) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; ZVAL_LONG(return_value, (long)MagickGetImageColors(intern->magick_wand)); return; } /* }}} */ /* {{{ proto bool Imagick::commentImage(string comment) Adds a comment to your image. */ PHP_METHOD(Imagick, commentImage) { php_imagick_object *intern; char *comment; IM_LEN_TYPE comment_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &comment, &comment_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickCommentImage(intern->magick_wand, comment); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to comment image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageFilename(string filename) Sets the filename of a particular image in a sequence. */ PHP_METHOD(Imagick, setImageFilename) { php_imagick_object *intern; char *filename; IM_LEN_TYPE filename_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageFilename(intern->magick_wand, filename); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image filename" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* PS, DEPRECATED please remove: http://www.imagemagick.org/discourse-server/viewtopic.php?f=6&t=8196 */ PHP_METHOD(Imagick, setImageAttribute) { php_imagick_object *intern; char *key, *attribute; IM_LEN_TYPE key_len, attribute_len; MagickBooleanType status; /* Tell user that this method has been deprecated. */ IMAGICK_METHOD_DEPRECATED("Imagick", "setImageAttribute"); /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &key, &key_len, &attribute, &attribute_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageAttribute(intern->magick_wand, key, attribute); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image attribute" TSRMLS_CC); return; } RETURN_TRUE; } #endif // #if MagickLibVersion < 0x700 #endif /* {{{ proto bool Imagick::setImageBackgroundColor(ImagickPixel background) Sets the image background color. */ PHP_METHOD(Imagick, setImageBackgroundColor) { zval *param; php_imagick_object *intern; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickSetImageBackgroundColor(intern->magick_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image background color" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x700 /* {{{ proto int Imagick::setImageChannelMask(int channel) Sets the image channel mask. Returns the previous set channel mask. */ PHP_METHOD(Imagick, setImageChannelMask) { php_imagick_object *intern; im_long channel; ChannelType previous_channel_type; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; previous_channel_type = MagickSetImageChannelMask(intern->magick_wand, channel); RETURN_LONG(previous_channel_type); } /* }}} */ #endif /* {{{ proto bool Imagick::setImageCompose(int compose) Sets the image composite operator, useful for specifying how to composite the image thumbnail when using the Imagick::montageImage() method. */ PHP_METHOD(Imagick, setImageCompose) { php_imagick_object *intern; im_long compose; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &compose) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageCompose(intern->magick_wand, compose); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image composite operator" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto int Imagick::getImageCompression() Gets the image compression type */ PHP_METHOD(Imagick, getImageCompression) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_LONG(MagickGetImageCompression(intern->magick_wand)); } /* }}} */ /* {{{ proto bool Imagick::setImageCompression(int compression) Sets the image compression. */ PHP_METHOD(Imagick, setImageCompression) { php_imagick_object *intern; im_long compression; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &compression) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageCompression(intern->magick_wand, compression); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image compression" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageDelay(int delay) Sets the image delay. */ PHP_METHOD(Imagick, setImageDelay) { php_imagick_object *intern; im_long delay; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &delay) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageDelay(intern->magick_wand, delay); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image delay" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::colorizeImage(ImagickPixel colorize, ImagickPixel opacity, bool legacy) Blends the fill color with each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied. If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0 */ PHP_METHOD(Imagick, colorizeImage) { PixelWand *param_wand = NULL; php_imagick_object *intern; zval *color_param, *opacity_param; MagickBooleanType status; PixelWand *color_wand, *opacity_wand; zend_bool color_allocated, opacity_allocated; zend_bool legacy = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|b", &color_param, &opacity_param, &legacy) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (color_param, IMAGICK_CLASS, &color_allocated TSRMLS_CC); if (!color_wand) return; if (legacy) { opacity_wand = php_imagick_zval_to_opacity (opacity_param, IMAGICK_CLASS, &opacity_allocated TSRMLS_CC); } else { opacity_wand = php_imagick_zval_to_pixelwand(opacity_param, IMAGICK_CLASS, &opacity_allocated TSRMLS_CC); } if (!opacity_wand) { if (color_allocated) color_wand = DestroyPixelWand (color_wand); return; } if (legacy) { /* Colorize wants both wands to be of same instance */ param_wand = php_imagick_clone_pixelwand (color_wand); if (!param_wand) { php_imagick_throw_exception (IMAGICK_CLASS, "Failed to allocate" TSRMLS_CC); return; } #if MagickLibVersion < 0x700 PixelSetOpacity(param_wand, PixelGetOpacity(opacity_wand)); #endif PixelSetAlpha(param_wand, PixelGetAlpha(opacity_wand)); status = MagickColorizeImage(intern->magick_wand, param_wand, param_wand); param_wand = DestroyPixelWand(param_wand); } else { status = MagickColorizeImage(intern->magick_wand, color_wand, opacity_wand); } if (color_allocated) color_wand = DestroyPixelWand (color_wand); if (opacity_allocated) opacity_wand = DestroyPixelWand (opacity_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to colorize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::compareImageChannels(Imagick reference, int channel, int metric) Compares one or more image channels of an image to a reconstructed image and returns the difference image. */ PHP_METHOD(Imagick, compareImageChannels) { MagickWand *tmp_wand; zval *objvar; php_imagick_object *intern, *intern_second, *intern_return; im_long channel_type, metric_type; double distortion; #if PHP_VERSION_ID >= 70000 zval new_wand; #else zval *new_wand; #endif zval *pNewWand; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Oll", &objvar, php_imagick_sc_entry, &channel_type, &metric_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; tmp_wand = MagickCompareImageChannels(intern->magick_wand, intern_second->magick_wand, channel_type, metric_type, &distortion); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Compare image channels failed" TSRMLS_CC); return; } #if PHP_VERSION_ID >= 70000 pNewWand = &new_wand; #else MAKE_STD_ZVAL(new_wand); pNewWand = new_wand; #endif array_init(return_value); object_init_ex(pNewWand, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(pNewWand); php_imagick_replace_magickwand(intern_return, tmp_wand); add_next_index_zval(return_value, pNewWand); add_next_index_double(return_value, distortion); return; } /* }}} */ #if MagickLibVersion > 0x628 /* {{{ proto Imagick Imagick::compareImageLayers(int method) Compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers. */ PHP_METHOD(Imagick, compareImageLayers) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; im_long compare_method; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &compare_method) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 tmp_wand = (MagickWand *)MagickCompareImagesLayers(intern->magick_wand, compare_method); #else tmp_wand = (MagickWand *)MagickCompareImageLayers(intern->magick_wand, compare_method); #endif if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Compare image layers failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ #endif /* {{{ proto Imagick Imagick::flattenImages() Merges a sequence of images. This is useful for combining Photoshop layers into a single image. */ PHP_METHOD(Imagick, flattenImages) { php_imagick_object *intern, *intern_return; MagickWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; /* TODO: SHOULD THIS BE HERE? */ (void)MagickSetFirstIterator(intern->magick_wand); #if MagickLibVersion >= 0x700 tmp_wand = MagickMergeImageLayers(intern->magick_wand, FlattenLayer); #else tmp_wand = MagickFlattenImages(intern->magick_wand); #endif if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Flatten images failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::flipImage() Creates a vertical mirror image by reflecting the pixels around the central x-axis. */ PHP_METHOD(Imagick, flipImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickFlipImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to flip image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::flopImage() Creates a horizontal mirror image by reflecting the pixels around the central y-axis. */ PHP_METHOD(Imagick, flopImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickFlopImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to flop image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::frameImage(ImagickPixel matte_color, int width, int height, int inner_bevel, int outer_bevel) Adds a simulated three-dimensional border around the image */ PHP_METHOD(Imagick, frameImage) { zval *param; php_imagick_object *intern; MagickBooleanType status; im_long width, height, inner_bevel, outer_bevel; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zllll", ¶m, &width, &height, &inner_bevel, &outer_bevel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; #if MagickLibVersion >= 0x700 { status = MagickFrameImage( intern->magick_wand, color_wand, width, height, inner_bevel, outer_bevel, OverCompositeOp // Over is the default https://imagemagick.org/script/command-line-options.php#frame ); } #else status = MagickFrameImage(intern->magick_wand, color_wand, width, height, inner_bevel, outer_bevel); #endif if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to frame image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x700 /* {{{ proto bool Imagick::frameImageWithComposite(ImagickPixel matte_color, int width, int height, int inner_bevel, int outer_bevel, int composite) Adds a simulated three-dimensional border around the image with chosen composite option */ PHP_METHOD(Imagick, frameImageWithComposite) { zval *param; php_imagick_object *intern; MagickBooleanType status; im_long width, height, inner_bevel, outer_bevel; PixelWand *color_wand; zend_bool allocated; im_long composite = OverCompositeOp; // Over is the default https://imagemagick.org/script/command-line-options.php#frame if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zlllll", ¶m, &width, &height, &inner_bevel, &outer_bevel, &composite) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; #if MagickLibVersion >= 0x700 { status = MagickFrameImage( intern->magick_wand, color_wand, width, height, inner_bevel, outer_bevel, composite ); } #else status = MagickFrameImage(intern->magick_wand, color_wand, width, height, inner_bevel, outer_bevel); #endif if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to frame image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif /* {{{ proto Imagick Imagick::fxImage(string expression[, int channel]) Evaluate expression for each pixel in the image. */ PHP_METHOD(Imagick, fxImage) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; char *expression; IM_LEN_TYPE expression_len; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &expression, &expression_len, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickFxImageChannel(intern->magick_wand, channel, expression); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Fx image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::gammaImage(float gamma[, int channel]) Gamma-corrects an image. The same image viewed on different devices will have perceptual differences in the way the image's intensities are represented on the screen. Specify individual gamma levels for the red, green, and blue channels, or adjust all three with the gamma parameter. Values typically range from 0.8 to 2.3. */ PHP_METHOD(Imagick, gammaImage) { php_imagick_object *intern; MagickBooleanType status; double gamma; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|l", &gamma, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGammaImageChannel(intern->magick_wand, channel, gamma); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to gamma image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::gaussianBlurImage(float radius, float sigma[, int channel]) Blurs an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and selects a suitable radius for you. */ PHP_METHOD(Imagick, gaussianBlurImage) { php_imagick_object *intern; MagickBooleanType status; double radius, sigma; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &radius, &sigma, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickGaussianBlurImageChannel(intern->magick_wand, channel, radius, sigma); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to gaussian blur image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::compareImageChannels(int metric, int distortion) Compares one or more images and returns the difference image. */ PHP_METHOD(Imagick, compareImages) { MagickWand *tmp_wand; zval *objvar; php_imagick_object *intern, *intern_second, *intern_return; im_long metric_type; double distortion; #if PHP_VERSION_ID >= 70000 zval new_wand; #else zval *new_wand; #endif zval *pNewWand; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &objvar, php_imagick_sc_entry, &metric_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; #if PHP_VERSION_ID >= 70000 pNewWand = &new_wand; #else MAKE_STD_ZVAL(new_wand); pNewWand = new_wand; #endif array_init(return_value); tmp_wand = MagickCompareImages(intern->magick_wand, intern_second->magick_wand, metric_type, &distortion); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Compare images failed" TSRMLS_CC); return; } object_init_ex(pNewWand, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(pNewWand); php_imagick_replace_magickwand(intern_return, tmp_wand); add_next_index_zval(return_value, pNewWand); add_next_index_double(return_value, distortion); return; } /* }}} */ /* {{{ proto bool Imagick::contrastImage(bool sharpen) Enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a value other than 0 to increase the image contrast otherwise the contrast is reduced. */ PHP_METHOD(Imagick, contrastImage) { php_imagick_object *intern; MagickBooleanType status; zend_bool contrast; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &contrast) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickContrastImage(intern->magick_wand, contrast); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to contrast image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageDepth(int depth) Sets the image depth. */ PHP_METHOD(Imagick, setImageDepth) { php_imagick_object *intern; im_long depth; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &depth) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageDepth(intern->magick_wand, depth); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image depth" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageGamma(float gamma) Sets the image gamma. */ PHP_METHOD(Imagick, setImageGamma) { php_imagick_object *intern; double gamma; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &gamma) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageGamma(intern->magick_wand, gamma); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image gamma" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageIterations(int iterations) Sets the image iterations. */ PHP_METHOD(Imagick, setImageIterations) { php_imagick_object *intern; im_long iterations; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &iterations) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageIterations(intern->magick_wand, iterations); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image iterations" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion < 0x700 || MagickLibVersion >= 0x705 /* {{{ proto bool Imagick::setImageMatteColor(ImagickPixel matte) Sets the image matte color. */ PHP_METHOD(Imagick, setImageMatteColor) { zval *param; php_imagick_object *intern; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickSetImageMatteColor(intern->magick_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image matte color" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif /* {{{ proto bool Imagick::setImagePage(int width, int height, int x, int y) Sets the page geometry of the image. */ PHP_METHOD(Imagick, setImagePage) { php_imagick_object *intern; im_long width, height, x, y; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &width, &height, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImagePage(intern->magick_wand, width, height, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image page" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageResolution(float x_resolution,const float y_resolution) Sets the image resolution. */ PHP_METHOD(Imagick, setImageResolution) { php_imagick_object *intern; double x_res, y_res; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x_res, &y_res) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageResolution(intern->magick_wand, x_res, y_res); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image resolution" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageScene(int scene) Sets the image scene. */ PHP_METHOD(Imagick, setImageScene) { php_imagick_object *intern; im_long scene; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &scene) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageScene(intern->magick_wand, scene); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image scene" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageTicksPerSecond(int ticks_per-second) Sets the image ticks-per-second. */ PHP_METHOD(Imagick, setImageTicksPerSecond) { php_imagick_object *intern; im_long ticks_per_second; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ticks_per_second) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageTicksPerSecond(intern->magick_wand, ticks_per_second); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image ticks per second" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageType(int image_type) Sets the image type. */ PHP_METHOD(Imagick, setImageType) { php_imagick_object *intern; im_long image_type; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &image_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageType(intern->magick_wand, image_type); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image type" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageUnits(int units) Sets the image units of resolution. */ PHP_METHOD(Imagick, setImageUnits) { php_imagick_object *intern; im_long units; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &units) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageUnits(intern->magick_wand, units); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image units" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setImageFormat(string format) Sets the format of a particular image in a sequence. */ PHP_METHOD(Imagick, setImageFormat) { char *format; IM_LEN_TYPE format_len; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &format, &format_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageFormat(intern->magick_wand, format); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image format" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::charcoalImage(float radius, float sigma) Simulates a charcoal drawing. */ PHP_METHOD(Imagick, charcoalImage) { double sigma, radius; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &radius, &sigma) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickCharcoalImage(intern->magick_wand, sigma, radius); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to charcoal image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::oilPaintImage(float radius) Applies a special effect filter that simulates an oil painting. Each pixel is replaced by the most frequent color occurring in a circular region defined by radius. */ PHP_METHOD(Imagick, oilPaintImage) { double radius; MagickBooleanType status; php_imagick_object *intern; #if MagickLibVersion >= 0x700 float sigma = 1.0; //TODO - allow sigma to be set. #endif // #if MagickLibVersion >= 0x700 /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &radius) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 status = MagickOilPaintImage(intern->magick_wand, radius, sigma); #else status = MagickOilPaintImage(intern->magick_wand, radius); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to oilpaint image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::normalizeImage([int channel]) Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available, Channel parameter is ignored in ImageMagick below 6.2.8 */ PHP_METHOD(Imagick, normalizeImage) { MagickBooleanType status; php_imagick_object *intern; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion > 0x628 status = MagickNormalizeImageChannel(intern->magick_wand, channel); #else status = MagickNormalizeImage(intern->magick_wand); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to normalize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::labelImage(string label) Adds a label to your image. */ PHP_METHOD(Imagick, labelImage) { char *label; IM_LEN_TYPE label_len; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &label, &label_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickLabelImage(intern->magick_wand, label); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to label image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::writeImage(string filename) Writes an image to the specified filename */ PHP_METHOD(Imagick, writeImage) { char *filename = NULL; IM_LEN_TYPE filename_len = 0; zend_bool free_filename = 0; php_imagick_object *intern; struct php_imagick_file_t file = {0}; php_imagick_rw_result_t rc; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!", &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!filename) { filename = MagickGetImageFilename(intern->magick_wand); if (!filename) { php_imagick_throw_exception(IMAGICK_CLASS, "No image filename specified" TSRMLS_CC); return; } filename_len = strlen(filename); free_filename = 1; } if (!filename_len) { php_imagick_throw_exception(IMAGICK_CLASS, "Can not use empty string as a filename" TSRMLS_CC); return; } if (!php_imagick_file_init(&file, filename, filename_len TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_write_file(intern, &file, ImagickWriteImage, 0 TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, filename TSRMLS_CC); if (free_filename) { IMAGICK_FREE_MAGICK_MEMORY(filename); } return; } if (free_filename) { IMAGICK_FREE_MAGICK_MEMORY(filename); } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::writeImages(string filename, bool adjoin) Writes an image or image sequence. */ PHP_METHOD(Imagick, writeImages) { char *filename; zend_bool adjoin; IM_LEN_TYPE filename_len; php_imagick_object *intern; struct php_imagick_file_t file = {0}; php_imagick_rw_result_t rc; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sb", &filename, &filename_len, &adjoin) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!filename_len) { php_imagick_convert_imagick_exception(intern->magick_wand, "Can not use empty string as a filename" TSRMLS_CC); return; } if (!php_imagick_file_init(&file, filename, filename_len TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid filename provided" TSRMLS_CC); return; } rc = php_imagick_write_file(intern, &file, ImagickWriteImages, adjoin TSRMLS_CC); php_imagick_file_deinit(&file); if (rc != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, filename TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::drawImage(ImagickDraw drawing_wand) Renders the ImagickDrawing object on the current image. */ PHP_METHOD(Imagick, drawImage) { zval *objvar; php_imagick_object *intern; MagickBooleanType status; php_imagickdraw_object *internd; char *old_locale; intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objvar, php_imagickdraw_sc_entry) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(objvar); old_locale = php_imagick_set_locale (TSRMLS_C); status = MagickDrawImage(intern->magick_wand, internd->drawing_wand); php_imagick_restore_locale (old_locale); if (old_locale) efree (old_locale); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to draw image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::annotateImage(ImagickDraw drawing_wand, float x, float y, float angle, string text) Annotates an image with text. */ PHP_METHOD(Imagick, annotateImage) { php_imagick_object *intern; MagickBooleanType status; php_imagickdraw_object *internd; double x, y, angle; char *text; IM_LEN_TYPE text_len; zval *objvar; #if MagickLibVersion < 0x632 char *font; #endif if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Oddds", &objvar, php_imagickdraw_sc_entry, &x, &y, &angle, &text, &text_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; internd = Z_IMAGICKDRAW_P(objvar); #if MagickLibVersion < 0x632 font = DrawGetFont(internd->drawing_wand); /* Fixes PECL Bug #11328 */ if (!font) { php_imagick_throw_exception(IMAGICK_CLASS, "Font needs to be set before annotating an image" TSRMLS_CC); return; } #endif status = MagickAnnotateImage(intern->magick_wand, internd->drawing_wand, x, y, angle, text); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to annotate image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::getImageCompressionQuality(int quality) Gets the image compression quality */ PHP_METHOD(Imagick, getImageCompressionQuality) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_LONG(MagickGetImageCompressionQuality(intern->magick_wand)); } /* }}} */ /* {{{ proto bool Imagick::setImageCompressionQuality(int quality) Sets the image compression quality */ PHP_METHOD(Imagick, setImageCompressionQuality) { im_long quality; php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &quality) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetImageCompressionQuality(intern->magick_wand, quality); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set image compression quality" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::compositeImage(Imagick composite_wand, int compose, int x, int y[, int channel] ) Composite one image onto another at the specified offset. Channel parameter is ignored in ImageMagick below 6.2.8 */ PHP_METHOD(Imagick, compositeImage) { zval *objvar; php_imagick_object *intern; php_imagick_object *intern_second; im_long x, y; im_long composite_id = 0; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Olll|l", &objvar, php_imagick_sc_entry, &composite_id, &x, &y, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; #if MagickLibVersion > 0x628 MagickCompositeImageChannel(intern->magick_wand, channel, intern_second->magick_wand, composite_id, x, y); #else MagickCompositeImage(intern->magick_wand, intern_second->magick_wand, composite_id, x, y); #endif RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::modulateImage(float brightness, float saturation, float hue) Lets you control the brightness, saturation, and hue of an image. Hue is the percentage of absolute rotation from the current position. For example 50 results in a counter-clockwise rotation of 90 degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200 both resulting in a rotation of 180 degrees. */ PHP_METHOD(Imagick, modulateImage) { php_imagick_object *intern; MagickBooleanType status; double brightness, saturation, hue; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &brightness, &saturation, &hue) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickModulateImage(intern->magick_wand, brightness, saturation, hue); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to modulate image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::addNoiseImage(int noise_type[, int channel]) Adds random noise to the image. Channel parameter is ignored in ImageMagick below 6.2.8 */ PHP_METHOD(Imagick, addNoiseImage) { php_imagick_object *intern; MagickBooleanType status; im_long noise; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &noise, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion > 0x628 status = MagickAddNoiseImageChannel(intern->magick_wand, channel, noise); #else status = MagickAddNoiseImage(intern->magick_wand, noise); #endif if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to add image noise" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE /* {{{ proto bool Imagick::addNoiseImageWithAttenuate(int noise_type, float attenuate[, int channel]) Adds random noise to the image. */ PHP_METHOD(Imagick, addNoiseImageWithAttenuate) { php_imagick_object *intern; MagickBooleanType status; im_long noise; im_long channel = IM_DEFAULT_CHANNEL; double attenuate; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ld|l", &noise, &attenuate, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAddNoiseImageChannelWithAttenuate( intern->magick_wand, channel, noise, attenuate ); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to add image noise" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE /* {{{ proto Imagick Imagick::montageImage(ImagickDraw drawing_wand, string tile_geometry, string thumbnail_geometry, int mode, string frame) Creates a composite image by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile. */ PHP_METHOD(Imagick, montageImage) { MagickWand *tmp_wand; zval *objvar; php_imagick_object *intern, *intern_return; php_imagickdraw_object *internd; char *tile_geometry, *thumbnail_geometry, *frame; IM_LEN_TYPE tile_geometry_len, thumbnail_geometry_len, frame_len; im_long montage_mode = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ossls", &objvar, php_imagickdraw_sc_entry, &tile_geometry, &tile_geometry_len, &thumbnail_geometry, &thumbnail_geometry_len, &montage_mode, &frame, &frame_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; internd = Z_IMAGICKDRAW_P(objvar); tmp_wand = MagickMontageImage(intern->magick_wand, internd->drawing_wand, tile_geometry, thumbnail_geometry, montage_mode, frame); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Montage image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::affineTransformImage(ImagickDraw drawing_wand) Transforms an image as dictated by the affine matrix of the drawing wand. */ PHP_METHOD(Imagick, affineTransformImage) { zval *objvar; php_imagick_object *intern; php_imagickdraw_object *internd; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objvar, php_imagickdraw_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; internd = Z_IMAGICKDRAW_P(objvar); status = MagickAffineTransformImage(intern->magick_wand, internd->drawing_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to affine transform image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::averageImages() Average a set of images. */ PHP_METHOD(Imagick, averageImages) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; #if MagickLibVersion > 0x700 MagickBooleanType status; #endif if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion > 0x700 // MagickEvaluateImages appears to crash if index is not zero. status = MagickSetIteratorIndex(intern->magick_wand, 0); if (status == MagickFalse) { php_imagick_convert_imagick_exception( intern->magick_wand, "Averaging images failed, images are empty?" TSRMLS_CC ); return; } tmp_wand = MagickEvaluateImages(intern->magick_wand, MeanEvaluateOperator); #else tmp_wand = MagickAverageImages(intern->magick_wand); #endif if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Averaging images failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::borderImage(ImagickPixel bordercolor, int width, int height) Surrounds the image with a border of the color defined by the bordercolor pixel wand. */ PHP_METHOD(Imagick, borderImage) { zval *param; php_imagick_object *intern; MagickBooleanType status; im_long width, height; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zll", ¶m, &width, &height) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; #if MagickLibVersion >= 0x700 status = MagickBorderImage(intern->magick_wand, color_wand, width, height, OverCompositeOp); #else status = MagickBorderImage(intern->magick_wand, color_wand, width, height); #endif if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to border image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x700 /* {{{ proto bool Imagick::borderImageWithComposite(ImagickPixel bordercolor, int width, int height, int composite) Surrounds the image with a border of the color defined by the bordercolor pixel wand, or does a similar action with the composite operator supplied. MagickBorderImage only allows you to set the composite operator in > IM7 */ PHP_METHOD(Imagick, borderImageWithComposite) { zval *param; php_imagick_object *intern; MagickBooleanType status; im_long width, height; PixelWand *color_wand; zend_bool allocated; im_long composite; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zlll", ¶m, &width, &height, &composite) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickBorderImage(intern->magick_wand, color_wand, width, height, composite); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to border image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif /* {{{ proto bool Imagick::thresholdImage(float threshold[, int channel] ) Changes the value of individual pixels based on the intensity of each pixel compared to threshold. The result is a high-contrast, two color image. */ PHP_METHOD(Imagick, thresholdImage) { php_imagick_object *intern; double threshold; MagickBooleanType status; im_long channel = DefaultChannels; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|l", &threshold, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickThresholdImageChannel(intern->magick_wand, channel, threshold); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to threshold image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::adaptiveThresholdImage(int width, int height, int offset) Selects an individual threshold for each pixel based on the range of intensity values in its local neighborhood. This allows for thresholding of an image whose global intensity histogram doesn't contain distinctive peaks. */ PHP_METHOD(Imagick, adaptiveThresholdImage) { php_imagick_object *intern; im_long width, height, offset; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &width, &height, &offset) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAdaptiveThresholdImage(intern->magick_wand, width, height, offset); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to adaptive threshold image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::sharpenImage(float radius, float sigma[, int channel]) Sharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and selects a suitable radius for you. */ PHP_METHOD(Imagick, sharpenImage) { double sigma, radius; MagickBooleanType status; php_imagick_object *intern; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &radius, &sigma, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSharpenImageChannel(intern->magick_wand, channel, radius, sigma); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to sharpen image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::shaveImage(int columns, int rows) Shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image. */ PHP_METHOD(Imagick, shaveImage) { php_imagick_object *intern; im_long columns, rows; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &columns, &rows) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickShaveImage(intern->magick_wand, columns, rows); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to shave image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::shearImage(ImagickPixel background, float x_shear, float y_shear) Slides one edge of an image along the X or Y axis */ PHP_METHOD(Imagick, shearImage) { zval *param; php_imagick_object *intern; double x_shear, y_shear; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zdd", ¶m, &x_shear, &y_shear) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickShearImage(intern->magick_wand, color_wand, x_shear, y_shear); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to shear image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::spliceImage(int width, int height, int x, int y) Splices a solid color into the image. */ PHP_METHOD(Imagick, spliceImage) { im_long width, height, x, y; php_imagick_object *intern; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &width, &height, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSpliceImage(intern->magick_wand, width, height, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to splice image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::steganoImage(Imagick watermark_wand, int offset) Hides a digital watermark within the image. Recover the hidden watermark later to prove that the authenticity of an image. Offset defines the start position within the image to hide the watermark. */ PHP_METHOD(Imagick, steganoImage) { zval *objvar; php_imagick_object *intern, *intern_second, *intern_return; im_long offset; MagickWand *tmp_wand; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &objvar, php_imagick_sc_entry, &offset) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; intern_second = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (intern_second->magick_wand) == 0) return; tmp_wand = MagickSteganoImage(intern->magick_wand, intern_second->magick_wand, offset); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Stegano image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto Imagick Imagick::clone() Makes an exact copy of the Imagick object. */ PHP_METHOD(Imagick, clone) { php_imagick_object *intern, *intern_return; MagickWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED("Imagick", "clone"); intern = Z_IMAGICK_P(getThis()); tmp_wand = CloneMagickWand(intern->magick_wand); if (tmp_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "Cloning Imagick object failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::rotateImage(ImagickPixel background, float degrees) Rotates an image the specified number of degrees. Empty triangles left over from rotating the image are filled with the background color. */ PHP_METHOD(Imagick, rotateImage) { zval *param; php_imagick_object *intern; double degrees; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zd", ¶m, °rees) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickRotateImage(intern->magick_wand, color_wand, degrees); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to rotate image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::sampleImage(int columns, int rows) Scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image. */ PHP_METHOD(Imagick, sampleImage) { php_imagick_object *intern; im_long columns, rows; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &columns, &rows) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSampleImage(intern->magick_wand, columns, rows); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to sample image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::solarizeImage(float threshold) Applies a special effect to the image, similar to the effect achieved in a photo darkroom by selectively exposing areas of photo sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the solarization. */ PHP_METHOD(Imagick, solarizeImage) { php_imagick_object *intern; MagickBooleanType status; im_long threshold; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &threshold) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSolarizeImage(intern->magick_wand, threshold); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to solarize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::shadowImage(float opacity, float sigma, int x, int y) Simulates an image shadow. */ PHP_METHOD(Imagick, shadowImage) { php_imagick_object *intern; MagickBooleanType status; double opacity, sigma; im_long x, y; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddll", &opacity, &sigma, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickShadowImage(intern->magick_wand, opacity, sigma, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to shadow image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::motionBlurImage(float radius, float sigma, float angle[, int CHANNEL]) Simulates motion blur. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and MotionBlurImage() selects a suitable radius for you. Angle gives the angle of the blurring motion. */ PHP_METHOD(Imagick, motionBlurImage) { php_imagick_object *intern; MagickBooleanType status; double radius, sigma, angle; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd|l", &radius, &sigma, &angle, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion > 0x643 status = MagickMotionBlurImageChannel(intern->magick_wand, channel, radius, sigma, angle); #else status = MagickMotionBlurImage(intern->magick_wand, radius, sigma, angle); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to motion blur image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) /* {{{ proto Imagick Imagick::mosaicImages() Inlays an image sequence to form a single coherent picture. It returns a wand with each image in the sequence composited at the location defined by the page offset of the image. */ PHP_METHOD(Imagick, mosaicImages) { MagickWand *tmp_wand = NULL; php_imagick_object *intern, *intern_return; IMAGICK_METHOD_DEPRECATED ("Imagick", "mosaicImages"); if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; /* TODO: should this be here? */ MagickSetFirstIterator(intern->magick_wand); tmp_wand = MagickMosaicImages(intern->magick_wand); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Mosaic image failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ #endif #endif /* {{{ proto Imagick Imagick::morphImages(int number_frames) Method morphs a set of images. Both the image pixels and size are linearly interpolated to give the appearance of a meta-morphosis from one image to the next. */ PHP_METHOD(Imagick, morphImages) { MagickWand *tmp_wand; php_imagick_object *intern, *intern_return; im_long frames; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &frames) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickMorphImages(intern->magick_wand, frames); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Morphing images failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::minifyImage() Is a convenience method that scales an image proportionally to one-half its original size */ PHP_METHOD(Imagick, minifyImage) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickMinifyImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to minify image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::posterizeImage(int levels, bool dither) Reduces the image to a limited number of color level. */ PHP_METHOD(Imagick, posterizeImage) { php_imagick_object *intern; MagickBooleanType status; im_long levels; zend_bool dither; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lb", &levels, &dither) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickPosterizeImage(intern->magick_wand, levels, dither); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to posterize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::radialBlurImage(float angle[, int channel]) Radial blurs an image. */ PHP_METHOD(Imagick, radialBlurImage) { php_imagick_object *intern; MagickBooleanType status; double angle; im_long channel = DefaultChannels; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|l", &angle, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickRadialBlurImageChannel(intern->magick_wand, channel, angle); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to radial blur image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #endif /* {{{ proto bool Imagick::raiseImage(int width, int height, int x, int y, bool raise) Creates a simulated three-dimensional button-like effect by lightening and darkening the edges of the image. Members width and height of raise_info define the width of the vertical and horizontal edge of the effect. */ PHP_METHOD(Imagick, raiseImage) { php_imagick_object *intern; MagickBooleanType status; im_long width, height, x, y; zend_bool raise; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llllb", &width, &height, &x, &y, &raise) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickRaiseImage(intern->magick_wand, width, height, x, y, raise); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to raise image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::blackThresholdImage(ImagickPixel threshold) Is like MagickThresholdImage() but forces all pixels below the threshold into black while leaving all pixels above the threshold unchanged. */ PHP_METHOD(Imagick, blackThresholdImage) { php_imagick_object *intern; zval *param; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickBlackThresholdImage(intern->magick_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to black threshold image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::resampleImage(float x_resolution, float y_resolution, int filter, float blur) Resample image to desired resolution. */ PHP_METHOD(Imagick, resampleImage) { double xRes, yRes, blur; im_long filter = 0; php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddld", &xRes, &yRes, &filter, &blur) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 //TODO - allow filter to be set. //TODO - figure out what to do about blur. status = MagickResampleImage(intern->magick_wand, xRes, yRes, LanczosFilter); #else status = MagickResampleImage(intern->magick_wand, xRes, yRes, filter, blur); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to resample image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::resizeImage(int width, int height, int filter, float blur[, bool bestfit = false[, bool legacy]]) Scales an image to the desired dimensions with one of these filters: If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0. If false, the calculations should produce the same results as ImageMagick CLI does. */ PHP_METHOD(Imagick, resizeImage) { double blur; im_long width, height, new_width, new_height, filter = 0; php_imagick_object *intern; MagickBooleanType status; zend_bool bestfit = 0; zend_bool legacy = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llld|bb", &width, &height, &filter, &blur, &bestfit, &legacy) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; if (!php_imagick_thumbnail_dimensions(intern->magick_wand, bestfit, width, height, &new_width, &new_height, legacy)) { php_imagick_throw_exception(IMAGICK_CLASS, "Invalid image geometry" TSRMLS_CC); return; } #if MagickLibVersion >= 0x700 //TODO - remove blur from params status = MagickResizeImage(intern->magick_wand, new_width, new_height, filter); #else status = MagickResizeImage(intern->magick_wand, new_width, new_height, filter, blur); #endif /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to resize image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::rollImage(int x, int y) Offsets an image as defined by x and y. */ PHP_METHOD(Imagick, rollImage) { im_long x, y; php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickRollImage(intern->magick_wand, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to roll image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto Imagick Imagick::appendImages(bool stack) Append a set of images. */ PHP_METHOD(Imagick, appendImages) { php_imagick_object *intern, *intern_return; MagickWand *tmp_wand; zend_bool stack; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &stack) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickAppendImages(intern->magick_wand, stack); if (!tmp_wand) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to append images" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool Imagick::whiteThresholdImage(ImagickPixel threshold) Is like ThresholdImage() but force all pixels above the threshold into white while leaving all pixels below the threshold unchanged. */ PHP_METHOD(Imagick, whiteThresholdImage) { php_imagick_object *intern; zval *param; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = MagickWhiteThresholdImage(intern->magick_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to white threshold image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto ImagickPixelIterator Imagick::getPixelIterator() Returns a MagickPixelIterator. */ PHP_METHOD(Imagick, getPixelIterator) { PixelIterator *pixel_it; php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; pixel_it = NewPixelIterator(intern->magick_wand); if (!pixel_it) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Can not allocate ImagickPixelIterator" TSRMLS_CC); return; } php_imagick_pixel_iterator_new (pixel_it, return_value TSRMLS_CC); return; } /* }}} */ /* {{{ proto ImagickPixelIterator Imagick::getPixelRegionIterator(long x, long y, long columns, long rows) Returns a subset of pixels in a MagickPixelIterator object. */ PHP_METHOD(Imagick, getPixelRegionIterator) { PixelIterator *pixel_it; php_imagick_object *intern; im_long x, y, columns, rows; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &x, &y, &columns, &rows) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; pixel_it = NewPixelRegionIterator(intern->magick_wand, x, y, columns, rows); if (!pixel_it) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Can not allocate ImagickPixelIterator" TSRMLS_CC); return; } php_imagick_pixel_iterator_new (pixel_it, return_value TSRMLS_CC); return; } /* }}} */ /* {{{ proto int Imagick::getCompression() Gets the wand compression type. */ PHP_METHOD(Imagick, getCompression) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_LONG(MagickGetCompression(intern->magick_wand)); } /* }}} */ /* {{{ proto int Imagick::getCompressionQuality() Gets the wand compression quality. */ PHP_METHOD(Imagick, getCompressionQuality) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_LONG(MagickGetCompressionQuality(intern->magick_wand)); } /* }}} */ /* {{{ proto string Imagick::getCopyright() Returns the ImageMagick API copyright as a string constant. */ PHP_METHOD(Imagick, getCopyright) { char *copyright; if (zend_parse_parameters_none() == FAILURE) { return; } copyright = (char *)MagickGetCopyright(); IM_ZVAL_STRING(return_value, copyright); return; } /* }}} */ /* {{{ proto string Imagick::getConfigureOptions() Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc. */ PHP_METHOD(Imagick, getConfigureOptions) { size_t number_options; char *pattern = "*"; IM_LEN_TYPE pattern_len; char **result; char *option_value; unsigned int i; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &pattern, &pattern_len) == FAILURE) { return; } result = MagickQueryConfigureOptions(pattern, &number_options); array_init(return_value); for (i=0; i 0x660 /* {{{ proto string Imagick::getFeatures() GetFeatures() returns the ImageMagick features that have been compiled into the runtime. */ PHP_METHOD(Imagick, getFeatures) { const char *features; if (zend_parse_parameters_none() == FAILURE) { return; } features = GetMagickFeatures(); IM_ZVAL_STRING(return_value, features); } /* }}} */ #endif /* {{{ proto string Imagick::getFilename() Returns the filename associated with an image sequence. */ PHP_METHOD(Imagick, getFilename) { php_imagick_object *intern; char *filename; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); filename = (char *)MagickGetFilename(intern->magick_wand); if (filename) { IM_ZVAL_STRING(return_value, filename); IMAGICK_FREE_MAGICK_MEMORY(filename); } return; } /* }}} */ /* {{{ proto string Imagick::getFormat() Returns the format of the Imagick object. */ PHP_METHOD(Imagick, getFormat) { php_imagick_object *intern; char *format; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); format = (char *)MagickGetFormat(intern->magick_wand); if (format) { IM_ZVAL_STRING(return_value, format); IMAGICK_FREE_MAGICK_MEMORY(format); } return; } /* }}} */ /* {{{ proto string Imagick::getHomeURL() Returns the ImageMagick home URL. */ PHP_METHOD(Imagick, getHomeURL) { char *home_url; if (zend_parse_parameters_none() == FAILURE) { return; } home_url = (char *)MagickGetHomeURL(); if (home_url) { IM_ZVAL_STRING(return_value, home_url); IMAGICK_FREE_MAGICK_MEMORY(home_url); } return; } /* }}} */ /* {{{ proto int Imagick::getInterlaceScheme() Gets the wand interlace scheme. */ PHP_METHOD(Imagick, getInterlaceScheme) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETVAL_LONG(MagickGetInterlaceScheme(intern->magick_wand)); } /* }}} */ /* {{{ proto string Imagick::getOption(string key) Returns a value associated with a wand and the specified key. Use MagickRelinquishMemory() to free the value when you are finished with it. */ PHP_METHOD(Imagick, getOption) { php_imagick_object *intern; char *key, *value; IM_LEN_TYPE key_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &key, &key_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); value = MagickGetOption(intern->magick_wand, key); if (value) { IM_ZVAL_STRING(return_value, value); IMAGICK_FREE_MAGICK_MEMORY(value); } return; } /* }}} */ /* {{{ proto string Imagick::getPackageName() Returns the ImageMagick package name as a string constant. */ PHP_METHOD(Imagick, getPackageName) { char *package_name; if (zend_parse_parameters_none() == FAILURE) { return; } package_name = (char *)MagickGetPackageName(); IM_ZVAL_STRING(return_value, package_name); return; } /* }}} */ /* {{{ proto array Imagick::getPage() Returns the page geometry associated with the Imagick object in an associative array with the keys "width", "height", "x", and "y". */ PHP_METHOD(Imagick, getPage) { php_imagick_object *intern; MagickBooleanType status; size_t width, height; ssize_t x, y; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickGetPage(intern->magick_wand, &width, &height, &x, &y); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get page" TSRMLS_CC); return; } array_init(return_value); add_assoc_long(return_value, "width", width); add_assoc_long(return_value, "height", height); add_assoc_long(return_value, "x", x); add_assoc_long(return_value, "y", y); return; } /* }}} */ /* {{{ proto int Imagick::getHDRIEnabled() Returns true if Imagick was compiled against a HDRI verison of ImageMagick. */ PHP_METHOD(Imagick, getHdriEnabled) { if (zend_parse_parameters_none() == FAILURE) { return; } #if MAGICKCORE_HDRI_ENABLE RETURN_TRUE; #else RETURN_FALSE; #endif return; } /* }}} */ /* {{{ proto int Imagick::getQuantum() Returns the ImageMagick quantum range as an integer. */ PHP_METHOD(Imagick, getQuantum) { size_t range; if (zend_parse_parameters_none() == FAILURE) { return; } MagickGetQuantumRange(&range); ZVAL_LONG(return_value, range); //#ifdef MAGICKCORE_HDRI_ENABLE // RETVAL_DOUBLE(color_value); //#else // RETVAL_LONG(color_value); //#endif return; } /* }}} */ /* {{{ proto array Imagick::getQuantumDepth() Returns the ImageMagick quantum depth as a string constant. */ PHP_METHOD(Imagick, getQuantumDepth) { const char *quantum_depth; size_t depth; if (zend_parse_parameters_none() == FAILURE) { return; } quantum_depth = MagickGetQuantumDepth(&depth); array_init(return_value); add_assoc_long(return_value, "quantumDepthLong", depth); IM_add_assoc_string(return_value, "quantumDepthString", (char *)quantum_depth); return; } /* }}} */ /* {{{ proto array Imagick::getQuantumRange() Returns the ImageMagick quantum range as a string constant. */ PHP_METHOD(Imagick, getQuantumRange) { const char *quantum_range; size_t range; if (zend_parse_parameters_none() == FAILURE) { return; } quantum_range = MagickGetQuantumRange(&range); array_init(return_value); add_assoc_long(return_value, "quantumRangeLong", range); IM_add_assoc_string(return_value, "quantumRangeString", (char *)quantum_range); return; } /* }}} */ /* {{{ proto string Imagick::getReleaseDate() Returns the ImageMagick release date as a string constant. */ PHP_METHOD(Imagick, getReleaseDate) { char *release_date; if (zend_parse_parameters_none() == FAILURE) { return; } release_date = (char *)MagickGetReleaseDate(); IM_ZVAL_STRING(return_value, release_date); return; } /* }}} */ /* {{{ proto int Imagick::getResource(int type) Returns the specified resource in megabytes. */ PHP_METHOD(Imagick, getResource) { im_long resource_type; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &resource_type) == FAILURE) { return; } RETVAL_LONG(MagickGetResource(resource_type)); } /* }}} */ /* {{{ proto Imagick Imagick::getResourceLimit(int type) Returns the specified resource limit in megabytes. */ PHP_METHOD(Imagick, getResourceLimit) { im_long resource_type; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &resource_type) == FAILURE) { return; } RETVAL_DOUBLE(MagickGetResourceLimit(resource_type)); } /* }}} */ /* {{{ proto array Imagick::getSamplingFactors() Gets the horizontal and vertical sampling factor. */ PHP_METHOD(Imagick, getSamplingFactors) { php_imagick_object *intern; double *sampling_factors; unsigned long i; size_t number_factors = 0; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); sampling_factors = (double *)MagickGetSamplingFactors(intern->magick_wand, &number_factors); array_init(return_value); for (i = 0 ; i < number_factors; i++) { add_next_index_double(return_value, sampling_factors[i]); } MagickRelinquishMemory(sampling_factors); return; } /* }}} */ /* {{{ proto array Imagick::getSize() Returns the size associated with the Imagick object as an array with the keys "columns" and "rows". */ PHP_METHOD(Imagick, getSize) { php_imagick_object *intern; size_t columns, rows; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickGetSize(intern->magick_wand, &columns, &rows); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get size" TSRMLS_CC); return; } array_init(return_value); add_assoc_long(return_value, "columns", columns); add_assoc_long(return_value, "rows", rows); return; } /* }}} */ /* {{{ proto array Imagick::getVersion() Returns the ImageMagick API version as a string constant and as a number. */ PHP_METHOD(Imagick, getVersion) { char *version_string; size_t version_number; if (zend_parse_parameters_none() == FAILURE) { return; } version_string = (char *)MagickGetVersion(&version_number); array_init(return_value); add_assoc_long(return_value, "versionNumber", (long) version_number); IM_add_assoc_string(return_value, "versionString", version_string); return; } /* }}} */ /* {{{ proto bool Imagick::setBackgroundColor(ImagickPixel background) Sets the wand background color. */ PHP_METHOD(Imagick, setBackgroundColor) { zval *param; php_imagick_object *intern; MagickBooleanType status; PixelWand *background_wand; zend_bool allocated = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); background_wand = php_imagick_zval_to_pixelwand (param, IMAGICK_CLASS, &allocated TSRMLS_CC); if (!background_wand) return; status = MagickSetBackgroundColor(intern->magick_wand, background_wand); if (allocated) background_wand = DestroyPixelWand (background_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set background color" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setCompression(COMPRESSIONTYPE compression) Sets the wand compression type. */ PHP_METHOD(Imagick, setCompression) { php_imagick_object *intern; im_long compression; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &compression) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetCompression(intern->magick_wand, compression); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set compression" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setCompressionQuality(int quality) Sets the wand compression quality. */ PHP_METHOD(Imagick, setCompressionQuality) { php_imagick_object *intern; im_long quality; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &quality) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetCompressionQuality(intern->magick_wand, quality); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set compression quality" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setFilename(string filename) Sets the filename before you read or write an image file. */ PHP_METHOD(Imagick, setFilename) { php_imagick_object *intern; char *filename; IM_LEN_TYPE filename_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetFilename(intern->magick_wand, filename); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set filename" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setFormat(string format) Sets the format of the Imagick object. */ PHP_METHOD(Imagick, setFormat) { php_imagick_object *intern; char *format; IM_LEN_TYPE format_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &format, &format_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetFormat(intern->magick_wand, format); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set format" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setInterlaceScheme(INTERLACETYPE interlace_scheme) Sets the image compression. */ PHP_METHOD(Imagick, setInterlaceScheme) { php_imagick_object *intern; im_long schema; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &schema) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetInterlaceScheme(intern->magick_wand, schema); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set interlace scheme" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setOption(string key, string value) Associates one or options with the wand (.e.g MagickSetOption(wand,"jpeg:perserve","yes")). */ PHP_METHOD(Imagick, setOption) { php_imagick_object *intern; MagickBooleanType status; char *key, *value; IM_LEN_TYPE key_len, value_len; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &key, &key_len, &value, &value_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetOption(intern->magick_wand, key, value); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set option" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setPage(int width, int height, int x, int y) Sets the page geometry of the Imagick object. */ PHP_METHOD(Imagick, setPage) { php_imagick_object *intern; MagickBooleanType status; im_long width, height, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &width, &height, &x, &y) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetPage(intern->magick_wand, width, height, x, y); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set page" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ PHP_METHOD(Imagick, setImageProgressMonitor) { char *filename; IM_LEN_TYPE filename_len; php_imagick_object *intern; php_imagick_rw_result_t rc; if (!IMAGICK_G(progress_monitor)) { php_imagick_throw_exception(IMAGICK_CLASS, "Progress monitoring is disabled in ini-settings" TSRMLS_CC); return; } /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if ((rc = php_imagick_file_access_check (filename TSRMLS_CC)) != IMAGICK_RW_OK) { php_imagick_rw_fail_to_exception (intern->magick_wand, rc, filename TSRMLS_CC); return; } if (intern->progress_monitor_name) { efree(intern->progress_monitor_name); } intern->progress_monitor_name = estrdup(filename); MagickSetImageProgressMonitor(intern->magick_wand, php_imagick_progress_monitor, intern); RETURN_TRUE; } /* {{{ proto bool Imagick::setProgressMonitor(callable callback) Set a callback that will be called during the processing of the Imagick image. */ #if MagickLibVersion > 0x653 PHP_METHOD(Imagick, setProgressMonitor) { zval *user_callback; php_imagick_object *intern; php_imagick_callback *callback; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &user_callback) == FAILURE) { RETURN_FALSE; } // Check whether the callback is valid now, rather than failing later if (!user_callback || !zend_is_callable(user_callback, 0, NULL TSRMLS_CC)) { php_imagick_throw_exception(IMAGICK_CLASS, "First argument to setProgressMonitor is expected to be a valid callback" TSRMLS_CC); RETURN_FALSE; } callback = (php_imagick_callback *) emalloc(sizeof(php_imagick_callback)); TSRMLS_SET_CTX(callback->thread_ctx); //We can't free the previous callback as we can't guarantee that //ImageMagick won't use it at some point. There is no 'unbind' function //for previously set 'MagickSetImageProgressMonitor' callback->previous_callback = IMAGICK_G(progress_callback); //Add a ref and store the user's callback #if PHP_VERSION_ID >= 70000 Z_TRY_ADDREF_P(user_callback); ZVAL_COPY_VALUE(&callback->user_callback, user_callback); #else Z_ADDREF_P(user_callback); callback->user_callback = user_callback; #endif //The callback is now valid, store it in the global IMAGICK_G(progress_callback) = callback; intern = Z_IMAGICK_P(getThis()); MagickSetImageProgressMonitor(intern->magick_wand, php_imagick_progress_monitor_callable, callback); RETURN_TRUE; } #endif /* {{{ proto bool Imagick::setResourceLimit(RESOURCETYPE type, int limit) Sets the limit for a particular resource in megabytes. */ PHP_METHOD(Imagick, setResourceLimit) { MagickBooleanType status; im_long type; double limit; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ld", &type, &limit) == FAILURE) { return; } status = MagickSetResourceLimit(type, (MagickSizeType)limit); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to set resource limit" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setResolution(float x_resolution, float y_resolution) Sets the image resolution. */ PHP_METHOD(Imagick, setResolution) { php_imagick_object *intern; MagickBooleanType status; double x_resolution, y_resolution; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x_resolution, &y_resolution) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetResolution(intern->magick_wand, x_resolution, y_resolution); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set resolution" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setSamplingFactors(array factors) Sets the image sampling factors. */ PHP_METHOD(Imagick, setSamplingFactors) { php_imagick_object *intern; MagickBooleanType status; zval *factors; double *double_array; im_long elements = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &factors) == FAILURE) { return; } double_array = php_imagick_zval_to_double_array(factors, &elements TSRMLS_CC); if (!double_array) { php_imagick_throw_exception(IMAGICK_CLASS, "Can't read array" TSRMLS_CC); return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetSamplingFactors(intern->magick_wand, elements, double_array); efree(double_array); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set sampling factors" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setSize(int columns, int rows) Sets the size of the Imagick object. Set it before you read a raw image format such as RGB, GRAY, or CMYK. */ PHP_METHOD(Imagick, setSize) { php_imagick_object *intern; im_long columns, rows; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &columns, &rows) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetSize(intern->magick_wand, columns, rows); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set size" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::setType(IMAGETYPE image_type) Sets the image type attribute. */ PHP_METHOD(Imagick, setType) { php_imagick_object *intern; im_long type; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetType(intern->magick_wand, type); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to set type" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x659 /* {{{ proto bool Imagick::brightnessContrastImage(float brigthness, float contrast[, int channel]) Change the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image. */ PHP_METHOD(Imagick, brightnessContrastImage) { php_imagick_object *intern; double brightness, contrast; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|l", &brightness, &contrast, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickBrightnessContrastImageChannel(intern->magick_wand, channel, brightness, contrast); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to brightnesscontrastimage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x661 static KernelInfo *php_imagick_getKernelInfo(const double *color_matrix, const size_t order) { KernelInfo *kernel_info; #if MagickLibVersion >= 0x700 ExceptionInfo *ex_info = NULL; //TODO - inspect exception info kernel_info=AcquireKernelInfo(NULL, ex_info); #else kernel_info=AcquireKernelInfo(NULL); #endif if (kernel_info == (KernelInfo *) NULL) { return NULL; } kernel_info->width = order; kernel_info->height = order; #if MagickLibVersion >= 0x700 { unsigned int i; kernel_info->values = (MagickRealType *)AcquireAlignedMemory(order, order*sizeof(MagickRealType)); for (i=0 ; ivalues[i] = color_matrix[i]; } } #else kernel_info->values = (double *)AcquireAlignedMemory(order, order*sizeof(double)); memcpy(kernel_info->values, color_matrix, order * order * sizeof(double)); #endif return kernel_info; } /* {{{ proto bool Imagick::colorMatrixImage(array kernel) apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255). */ PHP_METHOD(Imagick, colorMatrixImage) { php_imagick_object *intern; MagickBooleanType status; zval *color_matrix_array; double *colors; size_t order = 0; im_long num_elements = 0; KernelInfo *kernel_color_matrix; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &color_matrix_array) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; colors = php_imagick_zval_to_double_array(color_matrix_array, &num_elements TSRMLS_CC); if (!colors) { php_imagick_throw_exception(IMAGICK_CLASS, "Unable to read color matrix array" TSRMLS_CC); return; } if (num_elements == 25) { order = 5; } else if (num_elements == 36) { order = 6; } else { efree(colors); php_imagick_throw_exception(IMAGICK_CLASS, "Color matrix array must be 5x5 or 6x6" TSRMLS_CC); return; } kernel_color_matrix = php_imagick_getKernelInfo(colors, order); //TODO - add check that matrix is 5x5 or 6x6? status = MagickColorMatrixImage(intern->magick_wand, kernel_color_matrix); //Free the memory #if MagickLibVersion >= 0x700 kernel_color_matrix->values = (MagickRealType *) NULL; #else kernel_color_matrix->values = (double *) NULL; #endif kernel_color_matrix = DestroyKernelInfo(kernel_color_matrix); efree(colors); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to colormatriximage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif /* {{{ proto bool Imagick::selectiveBlurImage(float radius, float sigma, float threshold[, int channel]) Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold. */ PHP_METHOD(Imagick, selectiveBlurImage) { php_imagick_object *intern; double brightness, contrast, threshold; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd|l", &brightness, &contrast, &threshold, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSelectiveBlurImageChannel(intern->magick_wand, channel, brightness, contrast, threshold); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to selectiveblurimage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x689 /* {{{ proto bool Imagick::rotationalblurimage(float angle[, int channel]) Rotational blurs an image. */ PHP_METHOD(Imagick, rotationalBlurImage) { php_imagick_object *intern; MagickBooleanType status; double angle; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|l", &angle, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickRotationalBlurImageChannel(intern->magick_wand, channel, angle); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to rotational blur image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion >= 0x683 //Technically, this version is available in 0x682. However there was an incompatible //change to the methods signature in a bug release. So only expose it for stable //versions. // //6.8.2.8 - MagickStatisticImage ( MagickWand* p1, enum ChannelType const p2, enum StatisticType const p3, size_t const p4, size_t const p5 ) (6) //6.8.2.9 - MagickStatisticImage ( MagickWand* p1, enum StatisticType const p2, size_t const p3, size_t const p4 ) /* {{{ proto bool Imagick::statisticImage(int type, int width, int height[, int channel] ) Replace each pixel with corresponding statistic from the neighborhood of the specified width and height. */ PHP_METHOD(Imagick, statisticImage) { php_imagick_object *intern; MagickBooleanType status; im_long type; im_long width, height; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll|l", &type, &width, &height, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickStatisticImageChannel(intern->magick_wand, channel, type, width, height); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to statisticImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion >= 0x652 /* {{{ proto Imagick Imagick::subimageMatch(Imagick subimage[, array &$bestMatch[, float &similarity[, float similarity_threshold = 0[, int metric = ]]]]) Searches for a subimage in the current image and returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between. You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will be set to the 'score' of the similarity between the subimage and the matching position in the larger image, bestMatch will contain an associative array with elements x, y, width, height that describe the matching region. */ PHP_METHOD(Imagick, subimageMatch) { php_imagick_object *intern; RectangleInfo best_match_offset; double similarity; double similarity_threshold = 0.0; zval *reference_obj; php_imagick_object *reference_intern; php_imagick_object *intern_return; zval *z_similarity = NULL; zval *z_best_match_offset = NULL; //http://devzone.zend.com/317/extension-writing-part-ii-parameters-arrays-and-zvals/ MagickWand *new_wand; #if MagickLibVersion >= 0x700 im_long metric = RootMeanSquaredErrorMetric; #else im_long metric = 0; #endif #if PHP_VERSION_ID >= 70000 char *param_string = "O|z/z/dl"; #else char *param_string = "O|zzdl"; #endif if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, param_string, &reference_obj, php_imagick_sc_entry, &z_best_match_offset, &z_similarity, &similarity_threshold, &metric) == FAILURE) { return; } reference_intern = Z_IMAGICK_P(reference_obj); intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; #if MagickLibVersion >= 0x700 new_wand = MagickSimilarityImage(intern->magick_wand, reference_intern->magick_wand, metric, similarity_threshold, &best_match_offset, &similarity); #else new_wand = MagickSimilarityImage(intern->magick_wand, reference_intern->magick_wand, &best_match_offset, &similarity); #endif if (new_wand == NULL) { php_imagick_convert_imagick_exception(intern->magick_wand, "subimagematch failed" TSRMLS_CC); return; } if (z_similarity) { ZVAL_DOUBLE(z_similarity, similarity); } if (z_best_match_offset) { array_init(z_best_match_offset); add_assoc_long(z_best_match_offset, "x", best_match_offset.x); add_assoc_long(z_best_match_offset, "y", best_match_offset.y); add_assoc_long(z_best_match_offset, "width", best_match_offset.width); add_assoc_long(z_best_match_offset, "height", best_match_offset.height); } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, new_wand); return; } /* }}} */ #endif /* {{{ proto bool Imagick::setRegistry(string key, string value) Sets the ImageMagick registry entry named key to value. This is most useful for setting "temporary-path" which controls where ImageMagick creates temporary images e.g. while processing PDFs. */ PHP_METHOD(Imagick, setRegistry) { MagickBooleanType status; char *key, *value; IM_LEN_TYPE key_len, value_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &key, &key_len, &value, &value_len) == FAILURE) { return; } status = SetImageRegistry(StringRegistryType, key, value, NULL); /* No magick is going to happen */ if (status == MagickFalse) { RETURN_FALSE; } RETURN_TRUE; } /* }}} */ /* {{{ proto string|false Imagick::getRegistry(string key) Get the StringRegistry entry for the named key or false if not set. */ PHP_METHOD(Imagick, getRegistry) { char *key, *value; IM_LEN_TYPE key_len; ExceptionInfo *ex_info; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &key, &key_len) == FAILURE) { return; } ex_info = AcquireExceptionInfo(); value = GetImageRegistry(StringRegistryType, key, ex_info); if (ex_info->severity != 0) { zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "Imagick::getRegistry exception (%s) ", ex_info->reason); ex_info = DestroyExceptionInfo(ex_info); return; } ex_info = DestroyExceptionInfo(ex_info); if (value != NULL) { IM_ZVAL_STRING(return_value, value); IMAGICK_FREE_MAGICK_MEMORY(value); return; } RETURN_FALSE; } /* }}} */ /* {{{ proto array Imagick::listRegistry() List all the registry settings calls GetImageRegistry. returns an array of all the key/value pairs in the registry */ PHP_METHOD(Imagick, listRegistry) { char *registry = NULL; char *value = NULL; if (zend_parse_parameters_none() == FAILURE) { return; } array_init(return_value); ResetImageRegistryIterator(); while ((registry = GetNextImageRegistry())) { value = GetImageRegistry(StringRegistryType, registry, NULL); //should this be add_assoc_string(return_value, estrdup(registry), value, 1); IM_add_assoc_string(return_value, registry, value); IMAGICK_FREE_MAGICK_MEMORY(value); } return; } /* }}} */ #if MagickLibVersion >= 0x680 /* {{{ proto bool Imagick::morphology(int morphologyMethod, int iterations, kernel, [int CHANNEL] ) Applies a user supplied kernel to the image according to the given morphology method. iterations - A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1. */ PHP_METHOD(Imagick, morphology) { zval *objvar; php_imagick_object *intern; php_imagickkernel_object *kernel; im_long morphologyMethod, iterations; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llO|l", &morphologyMethod, &iterations, &objvar, php_imagickkernel_sc_entry, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); kernel = Z_IMAGICKKERNEL_P(objvar); IMAGICK_KERNEL_NOT_NULL_EMPTY(kernel); status = MagickMorphologyImageChannel( intern->magick_wand, channel, morphologyMethod, iterations, kernel->kernel_info ); // No magick is going to happen if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to morphology image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion >= 0x680 #ifdef IMAGICK_WITH_KERNEL #if MagickLibVersion < 0x700 /* {{{ proto bool Imagick::filter(ImagickKernel kernel, [int CHANNEL] ) Applies a custom convolution kernel to the image. */ PHP_METHOD(Imagick, filter) { zval *objvar; php_imagick_object *intern; php_imagickkernel_object *kernel; MagickBooleanType status; ChannelType channel = UndefinedChannel; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", &objvar, php_imagickkernel_sc_entry, &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); kernel = Z_IMAGICKKERNEL_P(objvar); if ((kernel->kernel_info->width % 2) != 1) { php_imagick_convert_imagick_exception(intern->magick_wand, "Only odd-sized, square kernels can be applied as a filter." TSRMLS_CC); return; } if (kernel->kernel_info->width != kernel->kernel_info->height) { php_imagick_convert_imagick_exception(intern->magick_wand, "Only odd-sized, square kernels can be applied as a filter." TSRMLS_CC); return; } if (channel == 0) { status = MagickFilterImage(intern->magick_wand, kernel->kernel_info); } else { status = MagickFilterImageChannel(intern->magick_wand, channel, kernel->kernel_info); } // No magick is going to happen if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Failed to filter image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion < 0x700 #endif // #ifdef IMAGICK_WITH_KERNEL /* {{{ proto int Imagick::setAntiAlias(bool antialias) Set whether antialiasing should be used for operations. On by default. */ PHP_METHOD(Imagick, setAntialias) { php_imagick_object *intern; zend_bool antialias; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &antialias) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickSetAntialias(intern->magick_wand, antialias); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to setAntiAlias" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool Imagick::getAntiAlias() get whether antialiasing would be used for operations. */ PHP_METHOD(Imagick, getAntialias) { php_imagick_object *intern; MagickBooleanType antialias; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); antialias = MagickGetAntialias(intern->magick_wand); if (antialias == MagickTrue) { RETURN_TRUE; } else { RETURN_FALSE; } } /* }}} */ #if MagickLibVersion > 0x676 /* {{{ proto bool Imagick::colorDecisionListImage(string color_correction_collection) Set whether antialiasing should be used for operations. On by default. */ PHP_METHOD(Imagick, colorDecisionListImage) { php_imagick_object *intern; MagickBooleanType status; char *color_correction_collection; IM_LEN_TYPE ccc_len; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &color_correction_collection, &ccc_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); status = MagickColorDecisionListImage(intern->magick_wand, color_correction_collection); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to colorDecisionListImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion >= 0x687 /* {{{ proto Imagick Imagick::optimizeimagetransparency() Takes a frame optimized GIF animation, and compares the overlayed pixels against the disposal image resulting fr */ PHP_METHOD(Imagick, optimizeImageTransparency) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickOptimizeImageTransparency(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Optimize image transparency failed" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion >= 0x660 /* {{{ proto bool Imagick::autoGammaImage([int channel = CHANNEL_ALL]) Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately. */ PHP_METHOD(Imagick, autoGammaImage) { php_imagick_object *intern; MagickBooleanType status; im_long channel = IM_DEFAULT_CHANNEL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &channel) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAutoGammaImageChannel(intern->magick_wand, channel); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "autoGammaImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion >= 0x660 #if MagickLibVersion >= 0x692 /* {{{ proto bool Imagick::autoOrient() Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation). */ PHP_METHOD(Imagick, autoOrient) { php_imagick_object *intern; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAutoOrientImage(intern->magick_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable autoOrient image" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion >= 0x692 #if MagickLibVersion >= 0x692 /* {{{ proto bool Imagick::compositeImageGravity(Imagick $image, int COMPOSITE_CONSTANT, int GRAVITY_CONSTANT) Composite one image onto another using the specified gravity. */ PHP_METHOD(Imagick, compositeImageGravity) { zval *objvar; php_imagick_object *intern, *image_to_composite; MagickBooleanType status; im_long composite, gravity; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Oll", &objvar, php_imagick_sc_entry, &composite, &gravity) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; image_to_composite = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (image_to_composite->magick_wand) == 0) return; status = MagickCompositeImageGravity(intern->magick_wand, image_to_composite->magick_wand, composite, gravity); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to compositeImageGravity" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion >= 0x693 /* {{{ proto bool Imagick::localContrastImage(float radius, float strength) Attempts to increase the appearance of large-scale light-dark transitions. Local contrast enhancement works similarly to sharpening with an unsharp mask, however the mask is instead created using an image with a greater blur distance. */ PHP_METHOD(Imagick, localContrastImage) { php_imagick_object *intern; MagickBooleanType status; double radius, strength; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &radius, &strength) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickLocalContrastImage(intern->magick_wand, radius, strength); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Failed to localContrastImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // #if MagickLibVersion >= 0x693 #if MagickLibVersion >= 0x700 /* {{{ proto int Imagick::identifyImageType() Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants */ PHP_METHOD(Imagick, identifyImageType) { php_imagick_object *intern; long imageType; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; imageType = MagickIdentifyImageType(intern->magick_wand); RETVAL_LONG(imageType); } /* }}} */ #endif // #if MagickLibVersion >= 0x700 #if IM_HAVE_IMAGICK_GETSETIMAGEMASK /* {{{ proto Imagick Imagick::getImageMask() returns one of the Imagick::PIXELMASK_* constants */ PHP_METHOD(Imagick, getImageMask) { php_imagick_object *intern; php_imagick_object *intern_return; im_long pixelmask_type; MagickWand *tmp_wand; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &pixelmask_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; tmp_wand = MagickGetImageMask(intern->magick_wand, pixelmask_type); /* No magick is going to happen */ if (!tmp_wand) { RETURN_NULL(); // php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to get image clip mask" TSRMLS_CC); // return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto void Imagick::setImageMask(Imagick $clip_mask, int $pixelmask_type) returns one of the Imagick::PIXELMASK_* constants */ PHP_METHOD(Imagick, setImageMask) { php_imagick_object *intern; php_imagick_object *clip_mask; zval *objvar; im_long pixelmask_type; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &objvar, php_imagick_sc_entry, &pixelmask_type) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; clip_mask = Z_IMAGICK_P(objvar); if (php_imagick_ensure_not_empty (clip_mask->magick_wand) == 0) return; MagickSetImageMask( intern->magick_wand, pixelmask_type, clip_mask->magick_wand ); // TODO - check that // wand->exception // You want ei->severity. ei->error_number // the Go Imagick library does something like: //return &MagickWandException{ExceptionType(C.int(et)), C.GoString(csdescription)} RETURN_TRUE; } /* }}} */ #endif // IM_HAVE_IMAGICK_GETSETIMAGEMASK #if MagickLibVersion >= 0x709 /* {{{ proto void Imagick::cannyEdgeImage(float $radius, float $sigma, float $lower_percent, float $upper_percent */ PHP_METHOD(Imagick, cannyEdgeImage) { php_imagick_object *intern; double radius, sigma, lower_percent, upper_percent; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &radius, &sigma, &lower_percent, &upper_percent) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickCannyEdgeImage( intern->magick_wand, radius, sigma, lower_percent, upper_percent ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to cannyEdgeImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // MagickLibVersion >= 0x709 #if IM_HAVE_IMAGICK_SETSEED /* {{{ proto void Imagick::setSeed(int seed) Set the random number seed for ImageMagick */ PHP_METHOD(Imagick, setSeed) { im_long seed; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &seed) == FAILURE) { return; } MagickSetSeed(seed); RETURN_NULL(); } /* }}} */ #endif // IM_HAVE_IMAGICK_SETSEED #if IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE /* {{{ proto bool Imagick::waveletDenoiseImage(float $threshold, float $softness */ PHP_METHOD(Imagick, waveletDenoiseImage) { php_imagick_object *intern; MagickBooleanType status; double threshold, softness; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &threshold, &softness) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickWaveletDenoiseImage( intern->magick_wand, threshold, softness ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to waveletDenoiseImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE #if IM_HAVE_IMAGICK_MEANSHIFTIMAGE /* {{{ proto bool Imagick::meanShiftImage(int $width, int $height, float $color_distance */ PHP_METHOD(Imagick, meanShiftImage) { php_imagick_object *intern; MagickBooleanType status; im_long width, height; double color_distance; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lld", &width, &height, &color_distance) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickMeanShiftImage( intern->magick_wand, width, height, color_distance ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to meanShiftImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // IM_HAVE_IMAGICK_MEANSHIFTIMAGE #if IM_HAVE_IMAGICK_KMEANSIMAGE /* {{{ proto bool Imagick::kmeansImage(int $number_colors, int $max_iterations, float $tolerance */ PHP_METHOD(Imagick, kmeansImage) { php_imagick_object *intern; MagickBooleanType status; im_long number_colors, max_iterations; double tolerance; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lld", &number_colors, &max_iterations, &tolerance) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickKmeansImage( intern->magick_wand, number_colors, max_iterations, tolerance ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to kmeansImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // IM_HAVE_IMAGICK_KMEANSIMAGE #if IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE /* {{{ proto void Imagick::rangeThresholdImage(float $low_black, float $low_white, float $high_white, float $high_black */ PHP_METHOD(Imagick, rangeThresholdImage) { php_imagick_object *intern; MagickBooleanType status; double low_black, low_white, high_white, high_black; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &low_black, &low_white, &high_white, &high_black) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickRangeThresholdImage( intern->magick_wand, low_black, low_white, high_white, high_black ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to rangeThresholdImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE #if IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE /* {{{ proto bool Imagick::autoThresholdImage(int $auto_threshold_method */ PHP_METHOD(Imagick, autoThresholdImage) { php_imagick_object *intern; MagickBooleanType status; im_long auto_threshold_method; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &auto_threshold_method) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickAutoThresholdImage( intern->magick_wand, auto_threshold_method ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to autoThresholdImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE #if IM_HAVE_IMAGICK_BILATERALBLURIMAGE /* {{{ proto void Imagick::bilateralBlurImage(float $radius, float $sigma, float $intensity_sigma, float $spatial_sigma */ PHP_METHOD(Imagick, bilateralBlurImage) { php_imagick_object *intern; MagickBooleanType status; double radius, sigma, intensity_sigma, spatial_sigma; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &radius, &sigma, &intensity_sigma, &spatial_sigma) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickBilateralBlurImage( intern->magick_wand, radius, sigma, intensity_sigma, spatial_sigma ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to bilateralBlurImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif // IM_HAVE_IMAGICK_BILATERALBLURIMAGE #if IM_HAVE_IMAGICK_CLAHEIMAGE /* {{{ proto void Imagick::claheImage(int $width, int $height, int $number_bins, float $clip_limit */ PHP_METHOD(Imagick, claheImage) { php_imagick_object *intern; MagickBooleanType status; im_long width, height, number_bins; double clip_limit; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llld", &width, &height, &number_bins, &clip_limit) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickCLAHEImage( intern->magick_wand, width, height, number_bins, clip_limit ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to claheImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //IM_HAVE_IMAGICK_CLAHEIMAGE #if IM_HAVE_IMAGICK_CHANNELFXIMAGE /* {{{ proto bool Imagick::channelFxImage(string $expression) */ PHP_METHOD(Imagick, channelFxImage) { php_imagick_object *intern; MagickWand *fx_image; php_imagick_object *intern_return; char *expression; IM_LEN_TYPE expression_len; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &expression, &expression_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); fx_image = MagickChannelFxImage(intern->magick_wand, expression); if (!fx_image) { php_imagick_convert_imagick_exception(intern->magick_wand, "channelFxImage failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, fx_image); return; } /* }}} */ #endif // IM_HAVE_IMAGICK_CHANNELFXIMAGE #if IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE /* {{{ proto bool colorThresholdImage(ImagickPixel|string $start_color, ImagickPixel|string $stop_color): */ PHP_METHOD(Imagick, colorThresholdImage) { php_imagick_object *intern; MagickBooleanType status; zval *start_color_param, *stop_color_param; PixelWand *start_color_wand, *stop_color_wand; zend_bool start_color_allocated = 0, stop_color_allocated = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &start_color_param, &stop_color_param) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; start_color_wand = php_imagick_zval_to_pixelwand (start_color_param, IMAGICK_CLASS, &start_color_allocated TSRMLS_CC); if (!start_color_wand) return; stop_color_wand = php_imagick_zval_to_pixelwand (stop_color_param, IMAGICK_CLASS, &stop_color_allocated TSRMLS_CC); if (!stop_color_wand) return; status = MagickColorThresholdImage( intern->magick_wand, start_color_wand, stop_color_wand ); if (start_color_allocated) start_color_wand = DestroyPixelWand (start_color_wand); if (stop_color_allocated) stop_color_wand = DestroyPixelWand (stop_color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to colorThresholdImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE #if IM_HAVE_IMAGICK_COMPLEXIMAGES /* {{{ proto Imagick complexImages(int $complex_operator) */ PHP_METHOD(Imagick, complexImages) { im_long complex_operator; MagickBooleanType status; php_imagick_object *intern; MagickWand *complexed; php_imagick_object *intern_return; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &complex_operator) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickSetIteratorIndex(intern->magick_wand, 0); if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "complexImages failed to set iterator index to 0" TSRMLS_CC); return; } complexed = MagickComplexImages( intern->magick_wand, complex_operator ); if (!complexed) { php_imagick_convert_imagick_exception(intern->magick_wand, "complexImages failed" TSRMLS_CC); return; } object_init_ex(return_value, php_imagick_sc_entry); intern_return = Z_IMAGICK_P(return_value); php_imagick_replace_magickwand(intern_return, complexed); return; } /* }}} */ #endif //IM_HAVE_IMAGICK_COMPLEXIMAGES #if IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE /* {{{ proto bool interpolativeResizeImage(int $columns, int $rows, int $interpolate) */ PHP_METHOD(Imagick, interpolativeResizeImage) { im_long columns, rows, interpolate; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &columns, &rows, &interpolate) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickInterpolativeResizeImage( intern->magick_wand, columns, rows, interpolate ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to interpolativeResizeImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE #if IM_HAVE_IMAGICK_LEVELIMAGECOLORS /* {{{ proto bool levelImageColors(ImagickPixel|string $black_color,ImagickPixel|string $white_color,bool $invert): */ PHP_METHOD(Imagick, levelImageColors) { php_imagick_object *intern; MagickBooleanType status; zend_bool invert; zval *black_color_param, *white_color_param; PixelWand *black_color_wand, *white_color_wand; zend_bool black_color_allocated = 0, white_color_allocated = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zzb", &black_color_param, &white_color_param, &invert) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; black_color_wand = php_imagick_zval_to_pixelwand (black_color_param, IMAGICK_CLASS, &black_color_allocated TSRMLS_CC); if (!black_color_wand) return; white_color_wand = php_imagick_zval_to_pixelwand (white_color_param, IMAGICK_CLASS, &white_color_allocated TSRMLS_CC); if (!white_color_wand) return; status = MagickLevelImageColors( intern->magick_wand, black_color_wand, white_color_wand, invert ); if (black_color_allocated) black_color_wand = DestroyPixelWand (black_color_wand); if (white_color_allocated) white_color_wand = DestroyPixelWand (white_color_wand); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to levelImageColors" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //IM_HAVE_IMAGICK_LEVELIMAGECOLORS #if IM_HAVE_IMAGICK_LEVELIZEIMAGE /* {{{ proto bool Imagick::levelizeImage(float $black_point, float $gamma, float $white_point) */ PHP_METHOD(Imagick, levelizeImage) { double black_point, gamma, white_point; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &black_point, &gamma, &white_point) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickLevelizeImage( intern->magick_wand, black_point, gamma, white_point ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to levelizeImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //IM_HAVE_IMAGICK_LEVELIZEIMAGE #if IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE /* {{{ proto void Imagick::orderedDitherImage(string $dither_format) */ PHP_METHOD(Imagick, orderedDitherImage) { char *dither_format; IM_LEN_TYPE dither_format_len; MagickBooleanType status; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &dither_format, &dither_format_len) == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; status = MagickOrderedDitherImage( intern->magick_wand, dither_format ); /* No magick is going to happen */ if (status == MagickFalse) { php_imagick_convert_imagick_exception(intern->magick_wand, "Unable to orderedDitherImage" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE #if IM_HAVE_IMAGICK_WHITEBALANCEIMAGE /* {{{ proto bool Imagick::whiteBalanceImage() */ PHP_METHOD(Imagick, whiteBalanceImage) { php_imagick_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_IMAGICK_P(getThis()); RETURN_BOOL(MagickWhiteBalanceImage(intern->magick_wand)); } /* }}} */ #endif //IM_HAVE_IMAGICK_WHITEBALANCEIMAGE /* end of Imagick */ imagick-3.6.0/imagickdraw_class.c0000644000000000000000000025020714145213431015441 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" #if MagickLibVersion > 0x628 /* {{{ proto bool ImagickDraw::resetvectorgraphics() Resets the vector graphics */ PHP_METHOD(ImagickDraw, resetVectorGraphics) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawResetVectorGraphics(internd->drawing_wand); RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x649 /* {{{ proto bool ImagickDraw::getTextKerning() Gets the text kerning */ PHP_METHOD(ImagickDraw, getTextKerning) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; RETURN_DOUBLE(DrawGetTextKerning(internd->drawing_wand)); } /* }}} */ /* {{{ proto bool ImagickDraw::setTextKerning(float kerning) Sets the text kerning */ PHP_METHOD(ImagickDraw, setTextKerning) { php_imagickdraw_object *internd; double kerning; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &kerning) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetTextKerning(internd->drawing_wand, kerning); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::getTextInterwordSpacing() Gets the text interword spacing */ PHP_METHOD(ImagickDraw, getTextInterwordSpacing) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; RETURN_DOUBLE(DrawGetTextInterwordSpacing(internd->drawing_wand)); } /* }}} */ /* {{{ proto bool ImagickDraw::setTextInterwordSpacing(float spacing) Sets the text interword spacing */ PHP_METHOD(ImagickDraw, setTextInterwordSpacing) { php_imagickdraw_object *internd; double spacing; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &spacing) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetTextInterwordSpacing(internd->drawing_wand, spacing); RETURN_TRUE; } /* }}} */ #endif #if MagickLibVersion > 0x655 /* {{{ proto bool ImagickDraw::getTextInterlineSpacing() Gets the text interword spacing */ PHP_METHOD(ImagickDraw, getTextInterlineSpacing) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; RETURN_DOUBLE(DrawGetTextInterlineSpacing(internd->drawing_wand)); } /* }}} */ /* {{{ proto bool ImagickDraw::setTextInterlineSpacing(float spacing) Sets the text interword spacing */ PHP_METHOD(ImagickDraw, setTextInterlineSpacing) { php_imagickdraw_object *internd; double spacing; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &spacing) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetTextInterlineSpacing(internd->drawing_wand, spacing); RETURN_TRUE; } /* }}} */ #endif /* {{{ proto ImagickDraw ImagickDraw::__construct() The ImagickDraw constructor */ PHP_METHOD(ImagickDraw, __construct) { /* Empty constructor for possible future uses */ #if PHP_VERSION_ID >= 70000 // This suppresses an 'unused parameter' warning. (void)execute_data; (void)return_value; #endif } /* }}} */ /* {{{ proto bool ImagickDraw::circle(float ox, float oy, float px, float py) Draws a circle on the image. */ PHP_METHOD(ImagickDraw, circle) { double ox, oy, px, py; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &ox, &oy, &px, &py) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawCircle(internd->drawing_wand, ox, oy, px, py); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::rectangle(float x1, float y1, float x2, float y2) Draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings. */ PHP_METHOD(ImagickDraw, rectangle) { double x1, y1, x2, y2; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &x1, &y1, &x2, &y2) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawRectangle(internd->drawing_wand, x1, y1, x2, y2); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::roundRectangle(float x1, float y1, float x2, float y2, float rx, float ry) Draws a rounted rectangle given two coordinates, x & y corner radiuses and using the current stroke, stroke width, and fill settings. */ PHP_METHOD(ImagickDraw, roundRectangle) { double x1, y1, x2, y2, rx, ry; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddddd", &x1, &y1, &x2, &y2, &rx, &ry) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawRoundRectangle(internd->drawing_wand, x1, y1, x2, y2, rx, ry); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::ellipse(float ox, float oy, float rx, float ry, float start, float end) Draws an ellipse on the image. */ PHP_METHOD(ImagickDraw, ellipse) { double ox, oy, rx, ry, start, end; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddddd", &ox, &oy, &rx, &ry, &start, &end) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawEllipse(internd->drawing_wand, ox, oy, rx, ry, start, end); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::skewX(float degrees) Skews the current coordinate system in the horizontal direction. */ PHP_METHOD(ImagickDraw, skewX) { double degrees; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", °rees) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSkewX(internd->drawing_wand, degrees); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::skewY(float degrees) Skews the current coordinate system in the vertical direction. */ PHP_METHOD(ImagickDraw, skewY) { double degrees; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", °rees) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSkewY(internd->drawing_wand, degrees); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::translate(float x, float y) Applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate. */ PHP_METHOD(ImagickDraw, translate) { double x, y; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawTranslate(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFillColor(PixelWand fill_wand) Sets the fill color to be used for drawing filled objects. */ PHP_METHOD(ImagickDraw, setFillColor) { zval *param; php_imagickdraw_object *internd; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; color_wand = php_imagick_zval_to_pixelwand(param, IMAGICKDRAW_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; DrawSetFillColor(internd->drawing_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setResolution(float x, float y) Sets the resolution */ PHP_METHOD(ImagickDraw, setResolution) { char *density, *buf = NULL; double x, y; php_imagickdraw_object *internd; DrawInfo *draw_info; DrawingWand *d_wand; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); spprintf(&buf, 512, "%fx%f", x, y); density = AcquireString(buf); efree (buf); if (!density) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Failed to allocate memory" TSRMLS_CC); return; } draw_info = PeekDrawingWand(internd->drawing_wand); draw_info->density = density; #if MagickLibVersion >= 0x693 d_wand = AcquireDrawingWand(draw_info, NULL); #else d_wand = (DrawingWand *) DrawAllocateWand(draw_info, NULL); #endif if (!d_wand) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Failed to allocate new DrawingWand structure" TSRMLS_CC); return; } php_imagick_replace_drawingwand(internd, d_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeColor(PixelWand stroke_wand) Sets the color used for stroking object outlines. */ PHP_METHOD(ImagickDraw, setStrokeColor) { zval *param; php_imagickdraw_object *internd; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICKDRAW_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; DrawSetStrokeColor(internd->drawing_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFillAlpha(float opacity) Sets the opacity to use when drawing using the fill color or fill texture. Fully opaque is 1.0. */ PHP_METHOD(ImagickDraw, setFillAlpha) { php_imagickdraw_object *internd; double opacity; IMAGICK_METHOD_DEPRECATED("ImagickDraw", "setFillAlpha"); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &opacity) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; #if MagickLibVersion >= 0x635 DrawSetFillOpacity(internd->drawing_wand, opacity); #else DrawSetFillAlpha(internd->drawing_wand, opacity); #endif RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::settextantialias() Returns the antialias property associated with the wand. */ PHP_METHOD(ImagickDraw, setTextAntialias) { php_imagickdraw_object *internd; zend_bool antialias; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &antialias) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetTextAntialias(internd->drawing_wand, antialias); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setTextEncoding(string encoding) Specifies specifies the code set to use for text annotations. The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a sequence of bytes. Specify an empty string to set text encoding to the system's default. Successful text annotation using Unicode may require fonts designed to support Unicode. */ PHP_METHOD(ImagickDraw, setTextEncoding) { php_imagickdraw_object *internd; char *encoding; IM_LEN_TYPE encoding_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &encoding, &encoding_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetTextEncoding(internd->drawing_wand, encoding); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeAlpha(float opacity) Specifies the opacity of stroked object outlines. */ PHP_METHOD(ImagickDraw, setStrokeAlpha) { php_imagickdraw_object *internd; double opacity; IMAGICK_METHOD_DEPRECATED("ImagickDraw", "setStrokeAlpha"); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &opacity) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; #if MagickLibVersion >= 0x635 DrawSetStrokeOpacity(internd->drawing_wand, opacity); #else DrawSetStrokeAlpha(internd->drawing_wand, opacity); #endif RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeWidth(float stroke_width) Sets the width of the stroke used to draw object outlines. */ PHP_METHOD(ImagickDraw, setStrokeWidth) { php_imagickdraw_object *internd; double width; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &width) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetStrokeWidth(internd->drawing_wand, width); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFont(string font_name) Sets the fully-sepecified font to use when annotating with text. */ PHP_METHOD(ImagickDraw, setFont) { php_imagickdraw_object *internd; char *font, *absolute; IM_LEN_TYPE font_len; MagickBooleanType status; php_imagick_rw_result_t rc; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &font, &font_len) == FAILURE) { return; } /* Check that no empty string is passed */ if (font_len == 0) { php_imagick_throw_exception (IMAGICKDRAW_CLASS, "Can not set empty font" TSRMLS_CC); return; } internd = Z_IMAGICKDRAW_P(getThis());; /* And if it wasn't */ if (!php_imagick_check_font(font, font_len TSRMLS_CC)) { if ((absolute = expand_filepath(font, NULL TSRMLS_CC)) == NULL) { php_imagick_throw_exception (IMAGICKDRAW_CLASS, "Unable to set font, file path expansion failed" TSRMLS_CC); return; } /* Do an access check for the font */ if ((rc = php_imagick_file_access_check (absolute TSRMLS_CC)) != IMAGICK_RW_OK) { // Failed php_imagick_imagickdraw_rw_fail_to_exception (internd->drawing_wand, rc, absolute TSRMLS_CC); efree(absolute); return; } status = DrawSetFont(internd->drawing_wand, absolute); efree(absolute); } else { status = DrawSetFont(internd->drawing_wand, font); } if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to set font" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFontFamily(string font_family) Sets the font family to use when annotating with text. */ PHP_METHOD(ImagickDraw, setFontFamily) { php_imagickdraw_object *internd; char *font_family; IM_LEN_TYPE font_family_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &font_family, &font_family_len) == FAILURE) { return; } /* Check that no empty string is passed */ if (font_family_len == 0) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Can not set empty font family" TSRMLS_CC); return; } if (!php_imagick_check_font(font_family, font_family_len TSRMLS_CC )) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Unable to set font family; parameter not found in the list of configured fonts" TSRMLS_CC); return; } internd = Z_IMAGICKDRAW_P(getThis());; status = DrawSetFontFamily(internd->drawing_wand, font_family); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to set font family" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFontSize(float pointsize) Sets the font pointsize to use when annotating with text. */ PHP_METHOD(ImagickDraw, setFontSize) { php_imagickdraw_object *internd; double font_size; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &font_size) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetFontSize(internd->drawing_wand, font_size); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFontStyle(int style) Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option. */ PHP_METHOD(ImagickDraw, setFontStyle) { php_imagickdraw_object *internd; im_long style_id = AnyStyle; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &style_id) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetFontStyle(internd->drawing_wand, style_id); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFontWeight(int font_weight) Sets the font weight to use when annotating with text. */ PHP_METHOD(ImagickDraw, setFontWeight) { php_imagickdraw_object *internd; im_long weight; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &weight) == FAILURE) { return; } if (weight >= 100 && weight <= 900) { internd = Z_IMAGICKDRAW_P(getThis());; DrawSetFontWeight(internd->drawing_wand, weight); RETURN_TRUE; } php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Font weight valid range is 100-900" TSRMLS_CC); return; } /* }}} */ /* {{{ proto int ImagickDraw::getFontStretch(int fontStretch) Gets the font stretch to use when annotating with text */ PHP_METHOD(ImagickDraw, getFontStretch) { php_imagickdraw_object *internd; internd = Z_IMAGICKDRAW_P(getThis());; RETVAL_LONG(DrawGetFontStretch(internd->drawing_wand)); } /* }}} */ /* {{{ proto bool ImagickDraw::setFontStretch(int fontStretch) Sets the font stretch to use when annotating with text. The AnyStretch enumeration acts as a wild-card "don't care" option. */ PHP_METHOD(ImagickDraw, setFontStretch) { php_imagickdraw_object *internd; im_long stretch; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &stretch) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetFontStretch(internd->drawing_wand, stretch); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeAntialias(bool stroke_antialias) Controls whether stroked outlines are antialiased. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used. */ PHP_METHOD(ImagickDraw, setStrokeAntialias) { php_imagickdraw_object *internd; zend_bool antialias; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &antialias) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetStrokeAntialias(internd->drawing_wand, antialias); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setTextAlignment(int alignment) Specifies a text alignment to be applied when annotating with text. */ PHP_METHOD(ImagickDraw, setTextAlignment) { php_imagickdraw_object *internd; im_long align; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &align) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetTextAlignment(internd->drawing_wand, align); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setTextDecoration(int decoration) Specifies a decoration to be applied when annotating with text. */ PHP_METHOD(ImagickDraw, setTextDecoration) { php_imagickdraw_object *internd; im_long decoration; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &decoration) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetTextDecoration(internd->drawing_wand, decoration); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setTextUnderColor(PixelWand under_wand) Specifies the color of a background rectangle to place under text annotations. */ PHP_METHOD(ImagickDraw, setTextUnderColor) { zval *param; php_imagickdraw_object *internd; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; color_wand = php_imagick_zval_to_pixelwand (param, IMAGICKDRAW_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; DrawSetTextUnderColor(internd->drawing_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setViewbox(float x1, float y1, float x2, float y2 ) Sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on. */ PHP_METHOD(ImagickDraw, setViewbox) { php_imagickdraw_object *internd; im_long x1, y1, x2, y2; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &x1, &y1, &x2, &y2) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetViewbox(internd->drawing_wand, x1, y1, x2, y2); RETURN_TRUE; } /* {{{ proto string ImagickDraw::getFont() Returns a string specifying the font used when annotating with text */ PHP_METHOD(ImagickDraw, getFont) { php_imagickdraw_object *internd; char *font; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; font = DrawGetFont(internd->drawing_wand); if (!font) { RETURN_FALSE; } else { IM_ZVAL_STRING(return_value, font); IMAGICK_FREE_MAGICK_MEMORY(font); return; } } /* }}} */ /* {{{ proto string ImagickDraw::getFontFamily() Returns the font family to use when annotating with text. The value returned must be freed by the user when it is no longer needed. */ PHP_METHOD(ImagickDraw, getFontFamily) { php_imagickdraw_object *internd; char *font_family; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; font_family = DrawGetFontFamily(internd->drawing_wand); if (!font_family) { RETURN_FALSE; } else { IM_ZVAL_STRING(return_value, font_family); IMAGICK_FREE_MAGICK_MEMORY(font_family); return; } } /* }}} */ /* {{{ proto float ImagickDraw::getFontSize() Returns the font pointsize used when annotating with text. */ PHP_METHOD(ImagickDraw, getFontSize) { php_imagickdraw_object *internd; double font_size; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); font_size = DrawGetFontSize(internd->drawing_wand); ZVAL_DOUBLE(return_value, font_size); return; } /* }}} */ /* {{{ proto int ImagickDraw::getFontStyle() Returns the font style used when annotating with text. */ PHP_METHOD(ImagickDraw, getFontStyle) { php_imagickdraw_object *internd; long font_style; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); font_style = DrawGetFontStyle(internd->drawing_wand); ZVAL_LONG(return_value, font_style); return; } /* }}} */ /* {{{ proto int ImagickDraw::getFontWeight() Returns the font weight used when annotating with text. */ PHP_METHOD(ImagickDraw, getFontWeight) { php_imagickdraw_object *internd; long weight; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; weight = DrawGetFontWeight(internd->drawing_wand); ZVAL_LONG(return_value, weight); return; } /* }}} */ /* {{{ proto bool ImagickDraw::clear() Clears a DrawingWand resource of any accumulated commands, and resets the settings it contains to their defaults. */ PHP_METHOD(ImagickDraw, clear) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; ClearDrawingWand(internd->drawing_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto int ImagickDraw::getTextDecoration() Returns the decoration applied when annotating with text. */ PHP_METHOD(ImagickDraw, getTextDecoration) { php_imagickdraw_object *internd; long decoration; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; decoration = DrawGetTextDecoration(internd->drawing_wand); ZVAL_LONG(return_value, decoration); return; } /* }}} */ /* {{{ proto string ImagickDraw::getTextEncoding() Returns a null-terminated string which specifies the code set used for text annotations. The string must be freed by the user once it is no longer required. */ PHP_METHOD(ImagickDraw, getTextEncoding) { php_imagickdraw_object *internd; char *encoding; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; encoding = DrawGetTextEncoding(internd->drawing_wand); if (!encoding) { RETURN_FALSE; } else { IM_ZVAL_STRING(return_value, encoding); IMAGICK_FREE_MAGICK_MEMORY(encoding); return; } } /* }}} */ /* {{{ proto bool ImagickDraw::annotation(float x, float y, string *text) Draws text on the image. */ PHP_METHOD(ImagickDraw, annotation) { php_imagickdraw_object *internd; double x, y; unsigned char *text; IM_LEN_TYPE text_len; #if MagickLibVersion < 0x632 char *font; #endif /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dds", &x, &y, &text, &text_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; #if MagickLibVersion < 0x632 font = DrawGetFont(internd->drawing_wand); /* Fixes PECL Bug #11328 */ if (!font) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Font needs to be set before annotating an image" TSRMLS_CC); return; } #endif DrawAnnotation(internd->drawing_wand, x, y, text); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::arc(float sx, float sy, float ex, float ey, float sd, float ed) Draws an arc falling within a specified bounding rectangle on the image. */ PHP_METHOD(ImagickDraw, arc) { double sx, sy, ex, ey, sd, ed; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddddd", &sx, &sy, &ex, &ey, &sd, &ed) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawArc(internd->drawing_wand, sx, sy, ex, ey, sd, ed); RETURN_TRUE; } /* }}} */ #if MagickLibVersion < 0x700 /* {{{ proto bool ImagickDraw::matte(float x, float y, int paintMethod) Paints on the image's opacity channel in order to set effected pixels to transparent. to influence the opacity of pixels. The available paint methods are: */ PHP_METHOD(ImagickDraw, matte) { double x, y; php_imagickdraw_object *internd; im_long paint_method; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddl", &x, &y, &paint_method) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawMatte(internd->drawing_wand, x, y, paint_method); RETURN_TRUE; } /* }}} */ #else /* {{{ proto bool ImagickDraw::alpha(float x, float y, int paintMethod) Paints on the image's alpha channel in order to set effected pixels to transparent. to influence the alpha of pixels. The available paint methods are: PointMethod: Select the target pixel ReplaceMethod: Select any pixel that matches the target pixel. FloodfillMethod: Select the target pixel and matching neighbors. FillToBorderMethod: Select the target pixel and neighbors not matching border color. ResetMethod: Select all pixels. */ PHP_METHOD(ImagickDraw, alpha) { double x, y; php_imagickdraw_object *internd; im_long paint_method; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddl", &x, &y, &paint_method) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawAlpha(internd->drawing_wand, x, y, paint_method); RETURN_TRUE; } /* }}} */ #endif /* {{{ proto bool ImagickDraw::polygon(array coordinates) Draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates. */ PHP_METHOD(ImagickDraw, polygon) { zval *coordinate_array; php_imagickdraw_object *internd; PointInfo *coordinates; int num_elements = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &coordinate_array) == FAILURE) { return; } coordinates = php_imagick_zval_to_pointinfo_array(coordinate_array, &num_elements TSRMLS_CC); if (!coordinates) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Unable to read coordinate array" TSRMLS_CC); return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPolygon(internd->drawing_wand, num_elements, coordinates); efree(coordinates); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::bezier(array coordinates) Draws a bezier curve through a set of points on the image. */ PHP_METHOD(ImagickDraw, bezier) { zval *coordinate_array; php_imagickdraw_object *internd; PointInfo *coordinates; int num_elements = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &coordinate_array) == FAILURE) { return; } coordinates = php_imagick_zval_to_pointinfo_array(coordinate_array, &num_elements TSRMLS_CC); if (!coordinates) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Unable to read coordinate array" TSRMLS_CC); return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawBezier(internd->drawing_wand, num_elements, coordinates); efree(coordinates); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::point(float x, float y) Draws a point using the current stroke color and stroke thickness at the specified coordinates. */ PHP_METHOD(ImagickDraw, point) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPoint(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::line(float sx, float sy, float ex, float ey) Draws a line on the image using the current stroke color, stroke opacity, and stroke width. */ PHP_METHOD(ImagickDraw, line) { php_imagickdraw_object *internd; double sx, sy, ex, ey; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &sx, &sy, &ex, &ey) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawLine(internd->drawing_wand, sx, sy, ex, ey); RETURN_TRUE; } /* }}} */ /* {{{ proto ImagickDraw ImagickDraw::clone() Makes an exact copy of the specified wand. */ PHP_METHOD(ImagickDraw, clone) { php_imagickdraw_object *internd, *intern_return; DrawingWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED("ImagickDraw", "clone"); internd = Z_IMAGICKDRAW_P(getThis());; tmp_wand = CloneDrawingWand(internd->drawing_wand); if (!tmp_wand) { php_imagick_throw_exception (IMAGICK_CLASS, "Failed to allocate DrawingWand structure" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickdraw_sc_entry); intern_return = Z_IMAGICKDRAW_P(return_value); php_imagick_replace_drawingwand(intern_return, tmp_wand); return; } /* }}} */ /* {{{ proto bool ImagickDraw::affine(array affine) Adjusts the current affine transformation matrix with the specified affine transformation matrix. Note that the current affine transform is adjusted rather than replaced. */ PHP_METHOD(ImagickDraw, affine) { php_imagickdraw_object *internd; zval *affine_matrix; #if PHP_VERSION_ID >= 70000 zval *pzval; #else HashTable *affine; zval **ppzval; #endif char *matrix_elements[] = { "sx", "rx", "ry", "sy", "tx", "ty" }; int i; double value; AffineMatrix matrix; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &affine_matrix) == FAILURE) { return; } #if PHP_VERSION_ID < 70000 affine = Z_ARRVAL_P(affine_matrix); zend_hash_internal_pointer_reset_ex(affine, (HashPosition *) 0); #endif for (i = 0; i < 6 ; i++) { #if PHP_VERSION_ID >= 70000 pzval = zend_hash_str_find(HASH_OF(affine_matrix), matrix_elements[i], 2); ZVAL_DEREF(pzval); if (pzval == NULL) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "AffineMatrix must contain keys: sx, rx, ry, sy, tx and ty" TSRMLS_CC); return; #else if (zend_hash_find(affine, matrix_elements[i], 3, (void**)&ppzval) == FAILURE) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "AffineMatrix must contain keys: sx, rx, ry, sy, tx and ty" TSRMLS_CC); return; #endif } else { #if PHP_VERSION_ID >= 70000 value = zval_get_double(pzval); #else zval tmp_zval, *tmp_pzval; tmp_zval = **ppzval; zval_copy_ctor(&tmp_zval); tmp_pzval = &tmp_zval; convert_to_double(tmp_pzval); value = Z_DVAL(tmp_zval); #endif if (strcmp(matrix_elements[i], "sx") == 0) { matrix.sx = value; } else if (strcmp(matrix_elements[i], "rx") == 0) { matrix.rx = value; } else if (strcmp(matrix_elements[i], "ry") == 0) { matrix.ry = value; } else if (strcmp(matrix_elements[i], "sy") == 0) { matrix.sy = value; } else if (strcmp(matrix_elements[i], "tx") == 0) { matrix.tx = value; } else if (strcmp(matrix_elements[i], "ty") == 0) { matrix.ty = value; } } } internd = Z_IMAGICKDRAW_P(getThis()); DrawAffine(internd->drawing_wand, &matrix); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::composite(int compose, float x, float y, float width, float height, MagickWand magick_wand) Composites an image onto the current image, using the specified composition operator, specified position, and at the specified size. */ PHP_METHOD(ImagickDraw, composite) { php_imagickdraw_object *internd; php_imagick_object *intern; zval *magick_obj; im_long compose; double x, y, width, height; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lddddO", &compose, &x, &y, &width, &height, &magick_obj, php_imagick_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(magick_obj); if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; internd = Z_IMAGICKDRAW_P(getThis()); status = DrawComposite(internd->drawing_wand, compose, x, y, width, height, intern->magick_wand); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Compositing image failed" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::color(float x, float y, int paintMethod) Draws color on image using the current fill color, starting at specified position, and using specified paint method. The available paint methods are: */ PHP_METHOD(ImagickDraw, color) { php_imagickdraw_object *internd; double x, y; im_long paint_method; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddl", &x, &y, &paint_method) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawColor(internd->drawing_wand, x, y, paint_method); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::comment(string comment) Adds a comment to a vector output stream. */ PHP_METHOD(ImagickDraw, comment) { php_imagickdraw_object *internd; char *comment; IM_LEN_TYPE comment_len; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &comment, &comment_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawComment(internd->drawing_wand, comment); RETURN_TRUE; } /* }}} */ /* {{{ proto string ImagickDraw::getClipPath() Obtains the current clipping path ID. The value returned must be deallocated by the user when it is no longer needed. */ PHP_METHOD(ImagickDraw, getClipPath) { php_imagickdraw_object *internd; char *clip_path; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; clip_path = DrawGetClipPath(internd->drawing_wand); if (!clip_path) { RETURN_FALSE; } else { IM_ZVAL_STRING(return_value, clip_path); IMAGICK_FREE_MAGICK_MEMORY(clip_path); return; } } /* }}} */ /* {{{ proto int ImagickDraw::getClipRule() Returns the current polygon fill rule to be used by the clipping path. */ PHP_METHOD(ImagickDraw, getClipRule) { php_imagickdraw_object *internd; long clip_rule; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; clip_rule = DrawGetClipRule(internd->drawing_wand); RETVAL_LONG(clip_rule); } /* }}} */ /* {{{ proto int ImagickDraw::getClipUnits() Returns the interpretation of clip path units. */ PHP_METHOD(ImagickDraw, getClipUnits) { php_imagickdraw_object *internd; long units; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; units = DrawGetClipUnits(internd->drawing_wand); RETVAL_LONG(units); } /* }}} */ /* {{{ proto ImagickPixel ImagickDraw::getFillColor() Returns the fill color used for drawing filled objects. */ PHP_METHOD(ImagickDraw, getFillColor) { php_imagickpixel_object *internp; php_imagickdraw_object *internd; PixelWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; tmp_wand = NewPixelWand(); DrawGetFillColor(internd->drawing_wand, tmp_wand); object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ /* {{{ proto float ImagickDraw::getFillOpacity() Returns the opacity used when drawing using the fill color or fill texture. Fully opaque is 1.0. */ PHP_METHOD(ImagickDraw, getFillOpacity) { php_imagickdraw_object *internd; double opacity; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; opacity = DrawGetFillOpacity(internd->drawing_wand); RETVAL_DOUBLE(opacity); } /* }}} */ /* {{{ proto int ImagickDraw::getFillRule(const DrawingWand *wand) Returns the fill rule used while drawing polygons. */ PHP_METHOD(ImagickDraw, getFillRule) { php_imagickdraw_object *internd; long fill_rule; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; fill_rule = DrawGetFillRule(internd->drawing_wand); RETVAL_LONG(fill_rule); } /* }}} */ /* {{{ proto int ImagickDraw::getGravity() Returns the text placement gravity used when annotating with text. */ PHP_METHOD(ImagickDraw, getGravity) { php_imagickdraw_object *internd; long gravity; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; gravity = DrawGetGravity(internd->drawing_wand); RETVAL_LONG(gravity); } /* }}} */ /* {{{ proto bool ImagickDraw::getStrokeAntialias() Returns the current stroke antialias setting. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used. */ PHP_METHOD(ImagickDraw, getStrokeAntialias) { php_imagickdraw_object *internd; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; status = DrawGetStrokeAntialias(internd->drawing_wand); if (status == MagickFalse) { RETURN_FALSE; } else { RETURN_TRUE; } } /* }}} */ /* {{{ proto ImagickPixel ImagickDraw::getStrokeColor(PixelWand stroke_color) Returns the color used for stroking object outlines. */ PHP_METHOD(ImagickDraw, getStrokeColor) { php_imagickpixel_object *internp; php_imagickdraw_object *internd; PixelWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; tmp_wand = NewPixelWand(); DrawGetStrokeColor(internd->drawing_wand, tmp_wand); object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ /* {{{ proto array ImagickDraw::getStrokeDashArray() Returns an array representing the pattern of dashes and gaps used to stroke paths (see DrawSetStrokeDashArray). The array must be freed once it is no longer required by the user. */ PHP_METHOD(ImagickDraw, getStrokeDashArray) { php_imagickdraw_object *internd; double *stroke_array; unsigned long i; size_t num_elements; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; stroke_array = DrawGetStrokeDashArray(internd->drawing_wand, &num_elements); array_init(return_value); for (i = 0; i < num_elements ; i++) { add_next_index_double(return_value, stroke_array[i]); } IMAGICK_FREE_MAGICK_MEMORY(stroke_array); return; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeDashArray(array dashArray) Specifies the pattern of dashes and gaps used to stroke paths. The strokeDashArray represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. To remove an existing dash array, pass a zero number_elements argument and null dash_array. A typical strokeDashArray_ array might contain the members 5 3 2. */ PHP_METHOD(ImagickDraw, setStrokeDashArray) { zval *param_array; double *double_array; im_long elements; php_imagickdraw_object *internd; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", ¶m_array) == FAILURE) { return; } double_array = php_imagick_zval_to_double_array(param_array, &elements TSRMLS_CC); if (!double_array) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Cannot read stroke dash array parameter" TSRMLS_CC); return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetStrokeDashArray(internd->drawing_wand, elements, double_array); efree(double_array); RETURN_TRUE; } /* }}} */ /* {{{ proto float ImagickDraw::getStrokeDashOffset() Returns the offset into the dash pattern to start the dash. */ PHP_METHOD(ImagickDraw, getStrokeDashOffset) { php_imagickdraw_object *internd; double offset; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; offset = DrawGetStrokeDashOffset(internd->drawing_wand); RETVAL_DOUBLE(offset); } /* }}} */ /* {{{ proto int ImagickDraw::getStrokeLineCap() Returns the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap. */ PHP_METHOD(ImagickDraw, getStrokeLineCap) { php_imagickdraw_object *internd; long line_cap; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; line_cap = DrawGetStrokeLineCap(internd->drawing_wand); RETVAL_LONG(line_cap); } /* }}} */ /* {{{ proto int ImagickDraw::getStrokeLineJoin() Returns the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. */ PHP_METHOD(ImagickDraw, getStrokeLineJoin) { php_imagickdraw_object *internd; long line_join; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; line_join = DrawGetStrokeLineJoin(internd->drawing_wand); RETVAL_LONG(line_join); } /* }}} */ /* {{{ proto int ImagickDraw::getStrokeMiterLimit() Returns the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'. */ PHP_METHOD(ImagickDraw, getStrokeMiterLimit) { php_imagickdraw_object *internd; unsigned long miter_limit; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; miter_limit = DrawGetStrokeMiterLimit(internd->drawing_wand); RETVAL_LONG(miter_limit); } /* }}} */ /* {{{ proto float ImagickDraw::getStrokeOpacity() Returns the opacity of stroked object outlines. */ PHP_METHOD(ImagickDraw, getStrokeOpacity) { php_imagickdraw_object *internd; double opacity; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; opacity = DrawGetStrokeOpacity(internd->drawing_wand); RETVAL_DOUBLE(opacity); } /* }}} */ /* {{{ proto float ImagickDraw::getStrokeWidth() Returns the width of the stroke used to draw object outlines. */ PHP_METHOD(ImagickDraw, getStrokeWidth) { php_imagickdraw_object *internd; double width; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; width = DrawGetStrokeWidth(internd->drawing_wand); RETVAL_DOUBLE(width); } /* }}} */ /* {{{ proto int ImagickDraw::getTextAlignment() Returns the alignment applied when annotating with text. */ PHP_METHOD(ImagickDraw, getTextAlignment) { php_imagickdraw_object *internd; long align_type; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; align_type = DrawGetTextAlignment(internd->drawing_wand); RETVAL_LONG(align_type); } /* }}} */ /* {{{ proto bool ImagickDraw::getTextAntialias() Returns the current text antialias setting, which determines whether text is antialiased. Text is antialiased by default. */ PHP_METHOD(ImagickDraw, getTextAntialias) { php_imagickdraw_object *internd; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; status = DrawGetTextAntialias(internd->drawing_wand); if (status == MagickFalse) { RETURN_FALSE; } else { RETURN_TRUE; } } /* }}} */ /* {{{ proto string ImagickDraw::getVectorGraphics() Returns a null-terminated string which specifies the vector graphics generated by any graphics calls made since the wand was instantiated. The string must be freed by the user once it is no longer required. */ PHP_METHOD(ImagickDraw, getVectorGraphics) { php_imagickdraw_object *internd; char *vector; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; vector = DrawGetVectorGraphics(internd->drawing_wand); IM_ZVAL_STRING(return_value, vector); IMAGICK_FREE_MAGICK_MEMORY(vector); return; } /* }}} */ /* {{{ proto ImagickPixel ImagickDraw::getTextUnderColor(PixelWand under_color) Returns the color of a background rectangle to place under text annotations. */ PHP_METHOD(ImagickDraw, getTextUnderColor) { php_imagickpixel_object *internp; php_imagickdraw_object *internd; PixelWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; tmp_wand = NewPixelWand(); if (!tmp_wand) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Failed to allocate space for new PixelWand" TSRMLS_CC); return; } DrawGetTextUnderColor(internd->drawing_wand, tmp_wand); object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ /* {{{ proto bool ImagickDraw::pathClose() Adds a path element to the current path which closes the current subpath by drawing a straight line from the current point to the current subpath's most recent starting point (usually, the most recent moveto point). */ PHP_METHOD(ImagickDraw, pathClose) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPathClose(internd->drawing_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToAbsolute(float x1, float y1, float x2, float y2, float x, float y) Draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToAbsolute) { php_imagickdraw_object *internd; double x1, y1, x2, y2, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddddd", &x1, &y1, &x2, &y2, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToAbsolute(internd->drawing_wand, x1, y1, x2, y2, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToRelative(float x1, float y1, float x2, float y2, float x, float y) Draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToRelative) { php_imagickdraw_object *internd; double x1, y1, x2, y2, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddddd", &x1, &y1, &x2, &y2, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToRelative(internd->drawing_wand, x1, y1, x2, y2, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToQuadraticBezierAbsolute(float x1, float y1, float x, float y) Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToQuadraticBezierAbsolute) { php_imagickdraw_object *internd; double x1, y1, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &x1, &y1, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToQuadraticBezierAbsolute(internd->drawing_wand, x1, y1, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToQuadraticBezierRelative(float x1, float y1, float x, float y) Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToQuadraticBezierRelative) { php_imagickdraw_object *internd; double x1, y1, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &x1, &y1, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToQuadraticBezierRelative(internd->drawing_wand, x1, y1, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToQuadraticBezierSmoothAbsolute(float x, float y) Draws a quadratic Bezier curve (using relative coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolut or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToQuadraticBezierSmoothAbsolute) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToQuadraticBezierSmoothAbsolute(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToQuadraticBezierSmoothRelative(float x, float y) Draws a quadratic Bezier curve (using relative coordinates) from the current point to (x, y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolut or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point). At the end of the command, the new current point becomes the final (x, y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToQuadraticBezierSmoothRelative) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToQuadraticBezierSmoothRelative(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToSmoothAbsolute(float x2, float y2, float x, float y) Draws a cubic Bezier curve from the current point to (x,y) using absolute coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToSmoothAbsolute) { php_imagickdraw_object *internd; double x1, y1, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &x1, &y1, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToSmoothAbsolute(internd->drawing_wand, x1, y1, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathCurveToSmoothRelative(float x2, float y2, float x, float y) Draws a cubic Bezier curve from the current point to (x,y) using relative coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. */ PHP_METHOD(ImagickDraw, pathCurveToSmoothRelative) { php_imagickdraw_object *internd; double x1, y1, x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", &x1, &y1, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathCurveToSmoothRelative(internd->drawing_wand, x1, y1, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathEllipticArcAbsolute(float rx, float ry, float x_axis_rotation, bool large_arc_flag, bool sweep_flag, float x, float y) Draws an elliptical arc from the current point to (x, y) using absolute coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automatically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation. */ PHP_METHOD(ImagickDraw, pathEllipticArcAbsolute) { php_imagickdraw_object *internd; double rx, ry, x_axis_rotation, x, y; zend_bool large_arc, sweep; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddbbdd", &rx, &ry, &x_axis_rotation, &large_arc, &sweep, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathEllipticArcAbsolute(internd->drawing_wand, rx, ry, x_axis_rotation, large_arc, sweep, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathEllipticArcRelative(float rx, float ry, float x_axis_rotation, bool large_arc_flag, bool sweep_flag, float x, float y) Draws an elliptical arc from the current point to (x, y) using relative coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automatically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation. */ PHP_METHOD(ImagickDraw, pathEllipticArcRelative) { php_imagickdraw_object *internd; double rx, ry, x_axis_rotation, x, y; zend_bool large_arc, sweep; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddbbdd", &rx, &ry, &x_axis_rotation, &large_arc, &sweep, &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathEllipticArcRelative(internd->drawing_wand, rx, ry, x_axis_rotation, large_arc, sweep, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathFinish() Terminates the current path. */ PHP_METHOD(ImagickDraw, pathFinish) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPathFinish(internd->drawing_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathLineToAbsolute(float x, float y) Draws a line path from the current point to the given coordinate using absolute coordinates. The coordinate then becomes the new current point. */ PHP_METHOD(ImagickDraw, pathLineToAbsolute) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathLineToAbsolute(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathLineToRelative(float x, float y) Draws a line path from the current point to the given coordinate using relative coordinates. The coordinate then becomes the new current point. */ PHP_METHOD(ImagickDraw, pathLineToRelative) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathLineToRelative(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathLineToHorizontalAbsolute(float x) Draws a horizontal line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point. */ PHP_METHOD(ImagickDraw, pathLineToHorizontalAbsolute) { php_imagickdraw_object *internd; double y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathLineToHorizontalAbsolute(internd->drawing_wand, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathLineToHorizontalRelative(float x) Draws a horizontal line path from the current point to the target point using relative coordinates. The target point then becomes the new current point. */ PHP_METHOD(ImagickDraw, pathLineToHorizontalRelative) { php_imagickdraw_object *internd; double x; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &x) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathLineToHorizontalRelative(internd->drawing_wand, x); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathLineToVerticalAbsolute(float y) Draws a vertical line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point. */ PHP_METHOD(ImagickDraw, pathLineToVerticalAbsolute) { php_imagickdraw_object *internd; double y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathLineToVerticalAbsolute(internd->drawing_wand, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathLineToVerticalRelative(float y) Draws a vertical line path from the current point to the target point using relative coordinates. The target point then becomes the new current point. */ PHP_METHOD(ImagickDraw, pathLineToVerticalRelative) { php_imagickdraw_object *internd; double y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathLineToVerticalRelative(internd->drawing_wand, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathMoveToAbsolute(float x, float y) Starts a new sub-path at the given coordinate using absolute coordinates. The current point then becomes the specified coordinate. */ PHP_METHOD(ImagickDraw, pathMoveToAbsolute) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathMoveToAbsolute(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathMoveToRelative(float x, float y) Starts a new sub-path at the given coordinate using relative coordinates. The current point then becomes the specified coordinate. */ PHP_METHOD(ImagickDraw, pathMoveToRelative) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPathMoveToRelative(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pathStart() Declares the start of a path drawing list which is terminated by a matching DrawPathFinish() command. All other DrawPath commands must be enclosed between a and a DrawPathFinish() command. This is because path drawing commands are subordinate commands and they do not function by themselves. */ PHP_METHOD(ImagickDraw, pathStart) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPathStart(internd->drawing_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::polyline(array coordinates) Draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates. */ PHP_METHOD(ImagickDraw, polyline) { zval *coordinate_array; php_imagickdraw_object *internd; PointInfo *coordinates; int num_elements = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &coordinate_array) == FAILURE) { return; } coordinates = php_imagick_zval_to_pointinfo_array(coordinate_array, &num_elements TSRMLS_CC); if (!coordinates) { php_imagick_throw_exception(IMAGICKDRAW_CLASS, "Unable to read coordinate array" TSRMLS_CC); return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPolyline(internd->drawing_wand, num_elements, coordinates); efree(coordinates); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::popClipPath() Terminates a clip path definition. */ PHP_METHOD(ImagickDraw, popClipPath) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPopClipPath(internd->drawing_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::popDefs() Terminates a definition list */ PHP_METHOD(ImagickDraw, popDefs) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPopDefs(internd->drawing_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::popPattern() Terminates a pattern definition. */ PHP_METHOD(ImagickDraw, popPattern) { php_imagickdraw_object *internd; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; status = DrawPopPattern(internd->drawing_wand); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to terminate the pattern definition" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pushClipPath(string clip_mask_id) Starts a clip path definition which is comprized of any number of drawing commands and terminated by a DrawPopClipPath() command. */ PHP_METHOD(ImagickDraw, pushClipPath) { php_imagickdraw_object *internd; char *clip_mask; IM_LEN_TYPE clip_mask_len; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &clip_mask, &clip_mask_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPushClipPath(internd->drawing_wand, clip_mask); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pushDefs() Indicates that commands up to a terminating DrawPopDefs() command create named elements (e.g. clip-paths, textures, etc.) which may safely be processed earlier for the sake of efficiency. */ PHP_METHOD(ImagickDraw, pushDefs) { php_imagickdraw_object *internd; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawPushDefs(internd->drawing_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pushPattern(string pattern_id, float x, float y, float width, float height) Indicates that subsequent commands up to a DrawPopPattern() command comprise the definition of a named pattern. The pattern space is assigned top left corner coordinates, a width and height, and becomes its own drawing space. Anything which can be drawn may be used in a pattern definition. Named patterns may be used as stroke or brush definitions. */ PHP_METHOD(ImagickDraw, pushPattern) { php_imagickdraw_object *internd; char *pattern_id; IM_LEN_TYPE pattern_id_len; double x, y, width, height; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sdddd", &pattern_id, &pattern_id_len, &x, &y, &width, &height) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawPushPattern(internd->drawing_wand, pattern_id, x, y, width, height); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::render() Renders all preceding drawing commands. */ PHP_METHOD(ImagickDraw, render) { php_imagickdraw_object *internd; MagickBooleanType status; char *old_locale; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; old_locale = php_imagick_set_locale (TSRMLS_C); status = DrawRender(internd->drawing_wand); php_imagick_restore_locale (old_locale); if (old_locale) efree (old_locale); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to render the drawing commands" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::rotate(float degrees) Applies the specified rotation to the current coordinate space. */ PHP_METHOD(ImagickDraw, rotate) { php_imagickdraw_object *internd; double degrees; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", °rees) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawRotate(internd->drawing_wand, degrees); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::scale(float x, float y) Adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space. */ PHP_METHOD(ImagickDraw, scale) { php_imagickdraw_object *internd; double x, y; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawScale(internd->drawing_wand, x, y); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setClipPath(string clip_mask) Associates a named clipping path with the image. Only the areas drawn on by the clipping path will be modified as long as it remains in effect. */ PHP_METHOD(ImagickDraw, setClipPath) { php_imagickdraw_object *internd; char *clip_mask; IM_LEN_TYPE clip_mask_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &clip_mask, &clip_mask_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); status = DrawSetClipPath(internd->drawing_wand, clip_mask); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to set clipping path" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setClipRule(int fill_rule) Set the polygon fill rule to be used by the clipping path. */ PHP_METHOD(ImagickDraw, setClipRule) { php_imagickdraw_object *internd; im_long fill_rule; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &fill_rule) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetClipRule(internd->drawing_wand, fill_rule); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setClipUnits(int clip_units) Sets the interpretation of clip path units. */ PHP_METHOD(ImagickDraw, setClipUnits) { php_imagickdraw_object *internd; im_long units; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &units) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetClipUnits(internd->drawing_wand, units); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFillOpacity(float fillOpacity) Sets the opacity to use when drawing using the fill color or fill texture. Fully opaque is 1.0. */ PHP_METHOD(ImagickDraw, setFillOpacity) { php_imagickdraw_object *internd; double fillOpacity; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &fillOpacity) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetFillOpacity(internd->drawing_wand, fillOpacity); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFillPatternUrl(string fill_url) Sets the URL to use as a fill pattern for filling objects. Only local URLs ("#identifier") are supported at this time. These local URLs are normally created by defining a named fill pattern with DrawPushPattern/DrawPopPattern. */ PHP_METHOD(ImagickDraw, setFillPatternUrl) { php_imagickdraw_object *internd; char *url; IM_LEN_TYPE url_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &url, &url_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); status = DrawSetFillPatternURL(internd->drawing_wand, url); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to set fill pattern URL" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setFillRule(int fill_rule) Sets the fill rule to use while drawing polygons. */ PHP_METHOD(ImagickDraw, setFillRule) { php_imagickdraw_object *internd; im_long fill_rule; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &fill_rule) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetFillRule(internd->drawing_wand, fill_rule); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setGravity(int gravity) Sets the text placement gravity to use when annotating with text. */ PHP_METHOD(ImagickDraw, setGravity) { php_imagickdraw_object *internd; im_long gravity; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &gravity) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetGravity(internd->drawing_wand, gravity); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokePatternUrl(string stroke_url) Sets the pattern used for stroking object outlines. */ PHP_METHOD(ImagickDraw, setStrokePatternUrl) { php_imagickdraw_object *internd; char *url; IM_LEN_TYPE url_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &url, &url_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); status = DrawSetStrokePatternURL(internd->drawing_wand, url); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to set stroke pattern URL" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeDashOffset(float dash_offset) Specifies the offset into the dash pattern to start the dash. */ PHP_METHOD(ImagickDraw, setStrokeDashOffset) { php_imagickdraw_object *internd; double offset; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &offset) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetStrokeDashOffset(internd->drawing_wand, offset); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeLineCap(int linecap) Specifies the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap. */ PHP_METHOD(ImagickDraw, setStrokeLineCap) { php_imagickdraw_object *internd; im_long line_cap; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &line_cap) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetStrokeLineCap(internd->drawing_wand, line_cap); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeLineJoin(int linejoin) Specifies the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. */ PHP_METHOD(ImagickDraw, setStrokeLineJoin) { php_imagickdraw_object *internd; im_long line_join; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &line_join) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetStrokeLineJoin(internd->drawing_wand, line_join); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeMiterLimit(int miterlimit) Specifies the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'. */ PHP_METHOD(ImagickDraw, setStrokeMiterLimit) { php_imagickdraw_object *internd; im_long miter_limit; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &miter_limit) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetStrokeMiterLimit(internd->drawing_wand, miter_limit); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setStrokeOpacity(float stroke_opacity) Specifies the opacity of stroked object outlines. */ PHP_METHOD(ImagickDraw, setStrokeOpacity) { php_imagickdraw_object *internd; double opacity; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &opacity) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetStrokeOpacity(internd->drawing_wand, opacity); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::setVectorGraphics(string xml) Sets the vector graphics associated with the specified wand. Use this method with DrawGetVectorGraphics() as a method to persist the vector graphics state. */ PHP_METHOD(ImagickDraw, setVectorGraphics) { php_imagickdraw_object *internd; char *vector; IM_LEN_TYPE vector_len; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &vector, &vector_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); status = DrawSetVectorGraphics(internd->drawing_wand, vector); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to set the vector graphics" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::pop() Destroys the current DrawingWand in the stack, and returns to the previously pushed DrawingWand. Multiple DrawingWands may exist. It is an error to attempt to pop more DrawingWands than have been pushed, and it is proper form to pop all DrawingWands which have been pushed. */ PHP_METHOD(ImagickDraw, pop) { php_imagickdraw_object *internd; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; status = PopDrawingWand(internd->drawing_wand); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to pop the current ImagickDraw object" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickDraw::push() Clones the current DrawingWand to create a new DrawingWand, which is then added to the DrawingWand stack. The original drawing DrawingWand(s) may be returned to by invoking PopDrawingWand(). The DrawingWands are stored on a DrawingWand stack. For every Pop there must have already been an equivalent Push. */ PHP_METHOD(ImagickDraw, push) { php_imagickdraw_object *internd; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; status = PushDrawingWand(internd->drawing_wand); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to push the current ImagickDraw object" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #if MagickLibVersion >= 0x693 /* {{{ proto float ImagickDraw::getOpacity() Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0. */ PHP_METHOD(ImagickDraw, getOpacity) { php_imagickdraw_object *internd; double opacity; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); opacity = DrawGetOpacity(internd->drawing_wand); RETURN_DOUBLE(opacity); } /* }}} */ /* {{{ proto bool ImagickDraw::setOpacity(float opacity) Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0. */ PHP_METHOD(ImagickDraw, setOpacity) { php_imagickdraw_object *internd; double opacity; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &opacity) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; DrawSetOpacity(internd->drawing_wand, opacity); RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion >= 0x693 #if MagickLibVersion >= 0x675 /* {{{ proto array ImagickDraw::getFontResolution() Gets the image X and Y resolution. */ PHP_METHOD(ImagickDraw, getFontResolution) { php_imagickdraw_object *internd; double x, y; MagickBooleanType status; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); status = DrawGetFontResolution(internd->drawing_wand, &x, &y); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to push the current ImagickDraw object" TSRMLS_CC); return; } array_init(return_value); add_assoc_double(return_value, "x", x); add_assoc_double(return_value, "y", y); return; } /* }}} */ #endif //#if MagickLibVersion >= 0x675 #if MagickLibVersion >= 0x675 /* {{{ proto bool ImagickDraw::setFontResolution(float x, float y) Sets the image font resolution. */ PHP_METHOD(ImagickDraw, setFontResolution) { php_imagickdraw_object *internd; double x, y; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &x, &y) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; status = DrawSetFontResolution(internd->drawing_wand, x, y); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to push the current ImagickDraw object" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion >= 0x675 #if MagickLibVersion >= 0x675 /* {{{ proto ImagickPixel ImagickDraw::getBorderColor() Returns the border color used for drawing bordered objects. */ PHP_METHOD(ImagickDraw, getBorderColor) { php_imagickpixel_object *internp; php_imagickdraw_object *internd; PixelWand *tmp_wand; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); tmp_wand = NewPixelWand(); DrawGetBorderColor(internd->drawing_wand, tmp_wand); object_init_ex(return_value, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(internp, tmp_wand); return; } /* }}} */ #endif //#if MagickLibVersion >= 0x675 #if MagickLibVersion >= 0x675 /* {{{ proto bool ImagickDraw::setBorderColor(ImagickPixel color) Sets the border color to be used for drawing bordered objects. */ PHP_METHOD(ImagickDraw, setBorderColor) { zval *param; php_imagickdraw_object *internd; PixelWand *color_wand; zend_bool allocated; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶m) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis());; color_wand = php_imagick_zval_to_pixelwand(param, IMAGICKDRAW_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; DrawSetBorderColor(internd->drawing_wand, color_wand); if (allocated) color_wand = DestroyPixelWand (color_wand); RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion >= 0x675 #if MagickLibVersion >= 0x692 /* {{{ proto integer ImagickDraw::getTextDirection() Returns the direction that will be used when annotating with text. */ PHP_METHOD(ImagickDraw, getTextDirection) { php_imagickdraw_object *internd; im_long direction; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); direction = DrawGetTextDirection(internd->drawing_wand); RETURN_LONG(direction); } /* }}} */ /* {{{ proto bool ImagickDraw::setTextDirection(int direction) Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option. */ PHP_METHOD(ImagickDraw, setTextDirection) { php_imagickdraw_object *internd; im_long direction; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &direction) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); DrawSetTextDirection(internd->drawing_wand, direction); RETURN_TRUE; } /* }}} */ #endif //#if MagickLibVersion >= 0x692 #if MagickLibVersion >= 0x692 /* {{{ proto bool ImagickDraw::setDensity(string density_string) Sets the vertical and horizontal resolution. */ PHP_METHOD(ImagickDraw, setDensity) { php_imagickdraw_object *internd; char *density; IM_LEN_TYPE density_len; MagickBooleanType status; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &density, &density_len) == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); status = DrawSetDensity(internd->drawing_wand, density); if (status == MagickFalse) { php_imagick_convert_imagickdraw_exception (internd->drawing_wand, "Unable to setdensity for ImagickDraw object" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto string|null ImagickDraw::getDensity() Obtains the vertical and horizontal resolution. */ PHP_METHOD(ImagickDraw, getDensity) { php_imagickdraw_object *internd; char *density; if (zend_parse_parameters_none() == FAILURE) { return; } internd = Z_IMAGICKDRAW_P(getThis()); density = DrawGetDensity(internd->drawing_wand); if (density == NULL) { RETURN_NULL(); } else { IM_RETURN_STRING(density); } } /* }}} */ #endif// #if MagickLibVersion >= 0x692 /* END OF DRAWINGWAND METHODS */ imagick-3.6.0/imagickpixel_class.c0000644000000000000000000005375014145213431015631 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" #if MagickLibVersion > 0x628 /* {{{ proto array ImagickPixel::getHSL() Returns the normalized HSL color of the pixel wand in an array with the keys "hue", "saturation", and "luminosity". */ PHP_METHOD(ImagickPixel, getHSL) { php_imagickpixel_object *internp; double hue, saturation, luminosity; if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } PixelGetHSL(internp->pixel_wand, &hue, &saturation, &luminosity); array_init(return_value); add_assoc_double(return_value, "hue", hue); add_assoc_double(return_value, "saturation", saturation); add_assoc_double(return_value, "luminosity", luminosity); return; } /* }}} */ /* {{{ proto bool ImagickPixel::setHSL(float hue, float saturation, float luminosity) Sets the normalized HSL color of the pixel wand. */ PHP_METHOD(ImagickPixel, setHSL) { php_imagickpixel_object *internp; double hue, saturation, luminosity; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &hue, &saturation, &luminosity) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } PixelSetHSL(internp->pixel_wand, hue, saturation, luminosity); RETURN_TRUE; } /* }}} */ /* {{{ proto Quantum ImagickPixel::getColorValueQuantum(int color) Gets the quantum value of a color in the ImagickPixel. Quantum is a float if ImageMagick was compiled with HDRI otherwise an integer. */ PHP_METHOD(ImagickPixel, getColorValueQuantum) { php_imagickpixel_object *internp; im_long color; Quantum color_value; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &color) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } switch (color) { case PHP_IMAGICK_COLOR_BLACK: color_value = PixelGetBlackQuantum(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_BLUE: color_value = PixelGetBlueQuantum(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_CYAN: color_value = PixelGetCyanQuantum(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_GREEN: color_value = PixelGetGreenQuantum(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_RED: color_value = PixelGetRedQuantum(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_YELLOW: color_value = PixelGetYellowQuantum(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_MAGENTA: color_value = PixelGetMagentaQuantum(internp->pixel_wand); break; #if MagickLibVersion < 0x700 case PHP_IMAGICK_COLOR_OPACITY: color_value = PixelGetOpacityQuantum(internp->pixel_wand); break; #endif case PHP_IMAGICK_COLOR_ALPHA: color_value = PixelGetAlphaQuantum(internp->pixel_wand); break; default: php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Unknown color type" TSRMLS_CC); return; break; } #if MAGICKCORE_HDRI_ENABLE RETVAL_DOUBLE(color_value); #else RETVAL_LONG(color_value); #endif } /* }}} */ /* {{{ proto bool ImagickPixel::setColorValueQuantum(int color, float value) Sets the quantum color of the ImagickPixel. */ PHP_METHOD(ImagickPixel, setColorValueQuantum) { php_imagickpixel_object *internp; im_long color; #if MAGICKCORE_HDRI_ENABLE double color_value; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ld", &color, &color_value) == FAILURE) { return; } #else im_long color_value; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &color, &color_value) == FAILURE) { return; } #endif internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } switch (color) { case PHP_IMAGICK_COLOR_BLACK: PixelSetBlackQuantum(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_BLUE: PixelSetBlueQuantum(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_CYAN: PixelSetCyanQuantum(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_GREEN: PixelSetGreenQuantum(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_RED: PixelSetRedQuantum(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_YELLOW: PixelSetYellowQuantum(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_MAGENTA: PixelSetMagentaQuantum(internp->pixel_wand, color_value); break; #if MagickLibVersion < 0x700 case PHP_IMAGICK_COLOR_OPACITY: PixelSetOpacityQuantum(internp->pixel_wand, color_value); break; #endif case PHP_IMAGICK_COLOR_ALPHA: PixelSetAlphaQuantum(internp->pixel_wand, color_value); break; default: php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Unknown color type" TSRMLS_CC); return; break; } RETVAL_TRUE; } /* }}} */ /* {{{ proto bool ImagickPixel::getIndex() Gets the colormap index of the pixel wand */ PHP_METHOD(ImagickPixel, getIndex) { php_imagickpixel_object *internp; if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } RETVAL_LONG(PixelGetIndex(internp->pixel_wand)); } /* }}} */ /* {{{ proto bool ImagickPixel::setIndex(int pixel_packet) Sets the colormap index of the pixel wand */ PHP_METHOD(ImagickPixel, setIndex) { php_imagickpixel_object *internp; #if MAGICKCORE_HDRI_ENABLE double index; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &index) == FAILURE) { #else im_long index; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { #endif return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } PixelSetIndex(internp->pixel_wand, index); RETURN_TRUE; } /* }}} */ #endif /* {{{ proto ImagickPixel ImagickPixel::__construct([string color] ) The ImagickPixel constructor */ PHP_METHOD(ImagickPixel, __construct) { php_imagickpixel_object *internp; char *color_name = NULL; IM_LEN_TYPE color_name_len = 0; // This suppresses an 'unused parameter' warning. (void)return_value; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &color_name, &color_name_len) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (internp->pixel_wand != NULL) { DestroyPixelWand(internp->pixel_wand); } internp->pixel_wand = NewPixelWand(); if (!internp->pixel_wand) { php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Failed to allocate PixelWand structure" TSRMLS_CC); return; } /* If color was given as parameter, set it here.*/ if (color_name && color_name_len) { if (PixelSetColor(internp->pixel_wand, color_name) == MagickFalse) { php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Unable to construct ImagickPixel" TSRMLS_CC); return; } } } /* }}} */ /* {{{ proto bool ImagickPixel::setColor(string color) Sets the color of the pixel wand with a string (e.g. "blue", "#0000ff", "rgb(0,0,255)", "cmyk(100,100,100,10)", etc.). */ PHP_METHOD(ImagickPixel, setColor) { char *color_name; IM_LEN_TYPE color_name_len; php_imagickpixel_object *internp; MagickBooleanType status; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &color_name, &color_name_len) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } status = PixelSetColor(internp->pixel_wand, color_name); if (status == MagickFalse) { php_imagick_convert_imagickpixel_exception (internp->pixel_wand, "Unable to set ImagickPixel color" TSRMLS_CC); return; } RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickPixel::clear() Clears resources associated with the wand. */ PHP_METHOD(ImagickPixel, clear) { php_imagickpixel_object *internp; if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } ClearPixelWand(internp->pixel_wand); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickPixel::isSimilar(float fuzz) Returns true if the distance between two colors is less than the specified distance. */ static void s_is_pixelwand_similar(INTERNAL_FUNCTION_PARAMETERS, zend_bool use_quantum) { zval *param; double fuzz; php_imagickpixel_object *internp; MagickBooleanType status; PixelWand *color_wand; zend_bool allocated; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zd", ¶m, &fuzz) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } color_wand = php_imagick_zval_to_pixelwand (param, IMAGICKPIXEL_CLASS, &allocated TSRMLS_CC); if (!color_wand) return; status = IsPixelWandSimilar(internp->pixel_wand, color_wand, (use_quantum ? (QuantumRange * fuzz) : fuzz)); if (allocated) color_wand = DestroyPixelWand (color_wand); if (status == MagickFalse) { RETURN_FALSE; } RETURN_TRUE; } /* {{{ proto bool ImagickPixel::isPixelSimilarQuantum(ImagickPixel pixel, float fuzz) Returns true if the distance between two colors is less than the specified distance. The fuzz value should be in the range 0-QuantumRange. The maximum value represents the longest possible distance in the colorspace. e.g. from RGB(0, 0, 0) to RGB(255, 255, 255) for the RGB colorspace */ PHP_METHOD(ImagickPixel, isPixelSimilarQuantum) { s_is_pixelwand_similar (INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ /* {{{ proto bool ImagickPixel::isPixelSimilar(ImagickPixel pixel, float fuzz) Returns true if the distance between two colors is less than the specified distance. The fuzz value should be in the range 0-1. The maximum value represents the longest possible distance in the colorspace. e.g. from RGB(0, 0, 0) to RGB(255, 255, 255) for the RGB colorspace */ PHP_METHOD(ImagickPixel, isPixelSimilar) { s_is_pixelwand_similar (INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } /* }}} */ /* {{{ proto float ImagickPixel::getColorValue(int color) Gets the normalized value of a color in the ImagickPixel. */ PHP_METHOD(ImagickPixel, getColorValue) { php_imagick_color_t color_enum; php_imagickpixel_object *internp; im_long color; double color_value = 0; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &color) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } if (color <= PHP_IMAGICK_COLOR_MIN || color >= PHP_IMAGICK_COLOR_MAX) { php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Unknown color type" TSRMLS_CC); return; } color_enum = color; switch (color_enum) { case PHP_IMAGICK_COLOR_BLACK: color_value = PixelGetBlack(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_BLUE: color_value = PixelGetBlue(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_CYAN: color_value = PixelGetCyan(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_GREEN: color_value = PixelGetGreen(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_RED: color_value = PixelGetRed(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_YELLOW: color_value = PixelGetYellow(internp->pixel_wand); break; case PHP_IMAGICK_COLOR_MAGENTA: color_value = PixelGetMagenta(internp->pixel_wand); break; #if MagickLibVersion < 0x700 case PHP_IMAGICK_COLOR_OPACITY: color_value = PixelGetOpacity(internp->pixel_wand); break; #endif case PHP_IMAGICK_COLOR_ALPHA: color_value = PixelGetAlpha(internp->pixel_wand); break; #if MagickLibVersion > 0x628 case PHP_IMAGICK_COLOR_FUZZ: color_value = PixelGetFuzz(internp->pixel_wand); break; #endif default: php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Unknown color type" TSRMLS_CC); return; break; } RETVAL_DOUBLE(color_value); } /* }}} */ /* {{{ proto float ImagickPixel::setColorValue(int color, float value ) Sets the normalized color of the ImagickPixel. */ PHP_METHOD(ImagickPixel, setColorValue) { php_imagick_color_t color_enum; php_imagickpixel_object *internp; im_long color; double color_value; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ld", &color, &color_value) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } if (color <= PHP_IMAGICK_COLOR_MIN || color >= PHP_IMAGICK_COLOR_MAX) { php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Unknown color type" TSRMLS_CC); return; } color_enum = color; switch (color_enum) { case PHP_IMAGICK_COLOR_BLACK: PixelSetBlack(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_BLUE: PixelSetBlue(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_CYAN: PixelSetCyan(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_GREEN: PixelSetGreen(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_RED: PixelSetRed(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_YELLOW: PixelSetYellow(internp->pixel_wand, color_value); break; case PHP_IMAGICK_COLOR_MAGENTA: PixelSetMagenta(internp->pixel_wand, color_value); break; #if MagickLibVersion < 0x700 case PHP_IMAGICK_COLOR_OPACITY: PixelSetOpacity(internp->pixel_wand, color_value); break; #endif case PHP_IMAGICK_COLOR_ALPHA: PixelSetAlpha(internp->pixel_wand, color_value); break; #if MagickLibVersion > 0x628 case PHP_IMAGICK_COLOR_FUZZ: PixelSetFuzz(internp->pixel_wand, color_value); break; #endif default: php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Unknown color type" TSRMLS_CC); return; break; } RETVAL_TRUE; } /* }}} */ /* {{{ proto array ImagickPixel::getColor([int normalization]) Returns the color of the pixel in an array normalization - 0 - values returned in the range 0,255 and will be ints, except for legacy reasons alpha which is 0-1 normalization - 1 - values returned in the range 0,1 and will be floats normalization - 2 - values returned in the range 0,255 and will be ints including alpha values i.e. float if ImageMagick was compiled with HDRI, or integers normally. */ PHP_METHOD(ImagickPixel, getColor) { php_imagickpixel_object *internp; im_long normalization = 0; double red, green, blue, alpha; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &normalization) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } array_init(return_value); red = PixelGetRed(internp->pixel_wand); green = PixelGetGreen(internp->pixel_wand); blue = PixelGetBlue(internp->pixel_wand); alpha = PixelGetAlpha(internp->pixel_wand); switch (normalization){ //values returned in the range 0,255 and will be ints case(0): { //Leave like this for legacy code //TODO fix the alpha not being normalised at next major/minor verysion red *= 255; green *= 255; blue *= 255; //values are always >=0, so the rounding below may not be necessary add_assoc_long(return_value, "r", (long) (red > 0.0 ? red + 0.5 : red - 0.5)); add_assoc_long(return_value, "g", (long) (green > 0.0 ? green + 0.5 : green - 0.5)); add_assoc_long(return_value, "b", (long) (blue > 0.0 ? blue + 0.5 : blue - 0.5)); add_assoc_long(return_value, "a", alpha); break; } //values returned in the range 0,1 and will be floats case(1): { add_assoc_double(return_value, "r", red); add_assoc_double(return_value, "g", green); add_assoc_double(return_value, "b", blue); add_assoc_double(return_value, "a", alpha); break; } case(2): { red *= 255; green *= 255; blue *= 255; alpha *= 255; //values are always >=0, so the rounding below may not be necessary add_assoc_long(return_value, "r", (long) (red > 0.0 ? red + 0.5 : red - 0.5)); add_assoc_long(return_value, "g", (long) (green > 0.0 ? green + 0.5 : green - 0.5)); add_assoc_long(return_value, "b", (long) (blue > 0.0 ? blue + 0.5 : blue - 0.5)); add_assoc_long(return_value, "a", (long) (alpha > 0.0 ? alpha + 0.5 : alpha - 0.5)); break; } } return; } /* }}} */ /* {{{ proto array ImagickPixel::getColorQuantum() Returns the color of the pixel in an array as Quantum values. If ImageMagick was compiled as HDRI these will be floats, otherwise they will be integers */ PHP_METHOD(ImagickPixel, getColorQuantum) { php_imagickpixel_object *internp; Quantum red, green, blue, alpha; if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } array_init(return_value); red = PixelGetRedQuantum(internp->pixel_wand); green = PixelGetGreenQuantum(internp->pixel_wand); blue = PixelGetBlueQuantum(internp->pixel_wand) ; alpha = PixelGetAlphaQuantum(internp->pixel_wand); #if MAGICKCORE_HDRI_ENABLE add_assoc_double(return_value, "r", red); add_assoc_double(return_value, "g", green); add_assoc_double(return_value, "b", blue); add_assoc_double(return_value, "a", alpha); #else add_assoc_long(return_value, "r", (long)red); add_assoc_long(return_value, "g", (long)green); add_assoc_long(return_value, "b", (long)blue); add_assoc_long(return_value, "a", (long)alpha); #endif return; } /* }}} */ /* {{{ proto array ImagickPixel::getColorAsString(void ) Returns the color as a string */ PHP_METHOD(ImagickPixel, getColorAsString) { php_imagickpixel_object *internp; char *color_string; if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } color_string = PixelGetColorAsString(internp->pixel_wand); IM_ZVAL_STRING(return_value, color_string); IMAGICK_FREE_MAGICK_MEMORY(color_string); return; } /* }}} */ /* {{{ proto ImagickPixel ImagickPixel::clone(void) Clones the ImagickPixel */ PHP_METHOD(ImagickPixel, clone) { php_imagickpixel_object *internp; php_imagickpixel_object *intern_return; PixelWand *pixel_wand; if (zend_parse_parameters_none() == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED("ImagickPixel", "clone"); internp = Z_IMAGICKPIXEL_P(getThis()); pixel_wand = php_imagick_clone_pixelwand (internp->pixel_wand); if (!pixel_wand) { php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Failed to allocate" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickpixel_sc_entry); intern_return = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(intern_return, pixel_wand); return; } /* }}} */ /* {{{ proto int ImagickPixel::getColorCount() Returns the color count associated with this color. */ PHP_METHOD(ImagickPixel, getColorCount) { php_imagickpixel_object *internp; if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } RETVAL_LONG(PixelGetColorCount(internp->pixel_wand)); } /* }}} */ /* {{{ proto int ImagickPixel::setColorCount(int colorCount) Sets the color count associated with this color. */ PHP_METHOD(ImagickPixel, setColorCount) { php_imagickpixel_object *internp; im_long color_count; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &color_count) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } PixelSetColorCount(internp->pixel_wand, color_count); RETVAL_TRUE; } /* }}} */ #if MagickLibVersion >= 0x693 /* {{{ proto bool ImagickPixel::setColorFromPixel(ImagickPixel $srcPixel) Sets the color count associated with this color from another ImagickPixel object. */ PHP_METHOD(ImagickPixel, setColorFromPixel) { php_imagickpixel_object *internp, *src_pixel; zval *objvar; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objvar, php_imagickpixel_sc_entry) == FAILURE) { return; } internp = Z_IMAGICKPIXEL_P(getThis()); if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) { return; } src_pixel = Z_IMAGICKPIXEL_P(objvar); if (php_imagickpixel_ensure_not_null(src_pixel->pixel_wand) == 0) { return; } PixelSetColorFromWand(internp->pixel_wand, src_pixel->pixel_wand); RETVAL_TRUE; } /* }}} */ #endif //#if MagickLibVersion >= 0x693 imagick-3.6.0/imagickpixeliterator_class.c0000644000000000000000000004263414145213431017402 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" #if MagickLibVersion <= 0x628 static long s_count_pixeliterator_rows(php_imagickpixeliterator_object *internpix) { long rows = 0, tmp; PixelWand **row; PixelResetIterator(internpix->pixel_iterator); while ((row = PixelGetNextIteratorRow(internpix->pixel_iterator, &tmp)) != NULL) rows++; return rows; } #endif void php_imagick_pixel_iterator_new (PixelIterator *pixel_it, zval *return_value TSRMLS_DC) { php_imagickpixeliterator_object *internpix; object_init_ex(return_value, php_imagickpixeliterator_sc_entry); internpix = Z_IMAGICKPIXELITERATOR_P(return_value); internpix->pixel_iterator = pixel_it; internpix->initialized = 1; #if MagickLibVersion <= 0x628 internpix->rows = s_count_pixeliterator_rows (internpix); #endif } /* {{{ proto ImagickPixelIterator ImagickPixelIterator::__construct(Imagick source) The ImagickPixelIterator constructor */ PHP_METHOD(ImagickPixelIterator, __construct) { zval *magick_object; php_imagickpixeliterator_object *internpix; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|llll", &magick_object, php_imagick_sc_entry) == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); intern = Z_IMAGICK_P(magick_object); if (!intern->magick_wand) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Invalid Imagick object passed" TSRMLS_CC); return; } if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; internpix->pixel_iterator = NewPixelIterator(intern->magick_wand); if (!internpix->pixel_iterator) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Can not allocate ImagickPixelIterator" TSRMLS_CC); return; } #if MagickLibVersion <= 0x628 internpix->rows = s_count_pixeliterator_rows (internpix); #endif internpix->initialized = 1; RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickPixelIterator::resetIterator() Resets the pixel iterator. Use it in conjunction with PixelGetNextIteratorRow() to iterate over all the pixels in a pixel container. */ PHP_METHOD(ImagickPixelIterator, resetIterator) { php_imagickpixeliterator_object *internpix; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } PixelResetIterator(internpix->pixel_iterator); #if MagickLibVersion <= 0x628 internpix->iterator_position = 0; #endif RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickPixelIterator::syncIterator() Syncs the pixel iterator. */ PHP_METHOD(ImagickPixelIterator, syncIterator) { php_imagickpixeliterator_object *internpix; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } PixelSyncIterator(internpix->pixel_iterator); RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickPixelIterator::setIteratorFirstRow() Sets the pixel iterator to the first pixel row. */ PHP_METHOD(ImagickPixelIterator, setIteratorFirstRow) { php_imagickpixeliterator_object *internpix; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } PixelSetFirstIteratorRow(internpix->pixel_iterator); #if MagickLibVersion <= 0x628 internpix->iterator_position = 0; #endif RETURN_TRUE; } /* }}} */ /* {{{ proto bool ImagickPixelIterator::setIteratorLastRow() Sets the pixel iterator to the last pixel row. */ PHP_METHOD(ImagickPixelIterator, setIteratorLastRow) { php_imagickpixeliterator_object *internpix; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } PixelSetLastIteratorRow(internpix->pixel_iterator); #if MagickLibVersion <= 0x628 internpix->iterator_position = (internpix->rows - 1); #endif RETURN_TRUE; } /* }}} */ /* {{{ proto ImagickPixelIterator ImagickPixelIterator::getPixelIterator(Imagick source) Returns a new pixel iterator, static method. This is equivalent to Imagick::getPixelIterator which probably ought to be used in preference to this method. */ PHP_METHOD(ImagickPixelIterator, getPixelIterator) { PixelIterator *pixel_it; zval *magick_object; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &magick_object, php_imagick_sc_entry) == FAILURE) { return; } intern = Z_IMAGICK_P(magick_object); if (!intern->magick_wand) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Invalid Imagick object passed" TSRMLS_CC); return; } if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; pixel_it = NewPixelIterator (intern->magick_wand); if (!pixel_it) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Can not allocate ImagickPixelIterator" TSRMLS_CC); return; } php_imagick_pixel_iterator_new (pixel_it, return_value TSRMLS_CC); return; } /* }}} */ /* {{{ proto ImagickPixelIterator ImagickPixelIterator::newPixelIterator(Imagick source) Returns a new pixel iterator. */ PHP_METHOD(ImagickPixelIterator, newPixelIterator) { PixelIterator *pixel_it; zval *magick_object; php_imagickpixeliterator_object *internpix; php_imagick_object *intern; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &magick_object, php_imagick_sc_entry) == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED_USE_INSTEAD("ImagickPixelIterator", "newPixelIterator", "ImagickPixelIterator", "getPixelIterator"); internpix = Z_IMAGICKPIXELITERATOR_P(getThis() ); intern = Z_IMAGICK_P(magick_object); if (!intern->magick_wand) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Invalid Imagick object passed" TSRMLS_CC); return; } if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; pixel_it = NewPixelIterator(intern->magick_wand); if (!pixel_it) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Can not allocate ImagickPixelIterator" TSRMLS_CC); return; } if (internpix->initialized && internpix->pixel_iterator) DestroyPixelIterator (internpix->pixel_iterator); internpix->pixel_iterator = pixel_it; #if MagickLibVersion <= 0x628 internpix->rows = s_count_pixeliterator_rows (internpix); #endif internpix->initialized = 1; RETURN_TRUE; } /* }}} */ /* {{{ proto ImagickPixelIterator ImagickPixelIterator::getPixelRegionIterator(Imagick source, int x, int y, int columns, int rows) Returns a new pixel region iterator, static method. This is equivalent to the non-static Imagick::getPixelRegionIterator which ought to be used in preference to this method. */ PHP_METHOD(ImagickPixelIterator, getPixelRegionIterator) { PixelIterator *pixel_it; zval *magick_object; php_imagick_object *intern; long x, y, columns, rows; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ollll", &magick_object, php_imagick_sc_entry, &x, &y, &columns, &rows) == FAILURE) { return; } intern = Z_IMAGICK_P(magick_object); if (!intern->magick_wand) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Invalid Imagick object passed" TSRMLS_CC); return; } if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; pixel_it = NewPixelRegionIterator(intern->magick_wand, x, y, columns, rows); if (!pixel_it) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Can not allocate ImagickPixelIterator" TSRMLS_CC); return; } php_imagick_pixel_iterator_new (pixel_it, return_value TSRMLS_CC); return; } /* }}} */ /* {{{ proto bool ImagickPixelIterator::newPixelRegionIterator(Imagick source, int x, int y, int columns, int rows) Returns a new pixel iterator. */ PHP_METHOD(ImagickPixelIterator, newPixelRegionIterator) { PixelIterator *pixel_it; zval *magick_object; php_imagickpixeliterator_object *internpix; php_imagick_object *intern; long x, y, columns, rows; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ollll", &magick_object, php_imagick_sc_entry, &x, &y, &columns, &rows) == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED_USE_INSTEAD("ImagickPixelIterator", "newPixelRegionIterator", "ImagickPixelIterator", "getPixelRegionIterator"); internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); intern = Z_IMAGICK_P(magick_object); if (!intern->magick_wand) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Invalid Imagick object passed" TSRMLS_CC); return; } if (php_imagick_ensure_not_empty (intern->magick_wand) == 0) return; pixel_it = NewPixelRegionIterator(intern->magick_wand, x, y, columns, rows); if (!pixel_it) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "Can not allocate ImagickPixelIterator" TSRMLS_CC); return; } if (internpix->initialized && internpix->pixel_iterator) DestroyPixelIterator (internpix->pixel_iterator); internpix->pixel_iterator = pixel_it; #if MagickLibVersion <= 0x628 internpix->rows = s_count_pixeliterator_rows (internpix); #endif internpix->initialized = 1; RETURN_TRUE; } /* }}} */ /* {{{ proto int ImagickPixelIterator::getIteratorRow() Returns the crurent pixel iterator row. */ PHP_METHOD(ImagickPixelIterator, getIteratorRow) { php_imagickpixeliterator_object *internpix; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } #if MagickLibVersion <= 0x628 ZVAL_LONG(return_value, internpix->iterator_position); #else ZVAL_LONG(return_value, (long) PixelGetIteratorRow(internpix->pixel_iterator)); #endif return; } /* }}} */ /* {{{ proto bool ImagickPixelIterator::setIteratorRow(int row) Set the pixel iterator row. */ PHP_METHOD(ImagickPixelIterator, setIteratorRow) { php_imagickpixeliterator_object *internpix; MagickBooleanType status; im_long row; /* Parse parameters given to function */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &row) == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } status = PixelSetIteratorRow(internpix->pixel_iterator, row); if (status == MagickFalse) { php_imagick_convert_imagickpixeliterator_exception(internpix->pixel_iterator, "Unable to set iterator row" TSRMLS_CC); return; } #if MagickLibVersion <= 0x628 internpix->iterator_position = row; #endif RETURN_TRUE; } /* }}} */ static void s_pixelwands_to_zval (PixelWand **wand_array, unsigned long num_wands, zval *return_value TSRMLS_DC) { php_imagickpixel_object *internp; #if PHP_VERSION_ID >= 70000 zval obj; #else zval *obj; #endif unsigned long i; array_init(return_value); for (i = 0; i < num_wands; i++) { #if PHP_VERSION_ID >= 70000 object_init_ex(&obj, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(&obj); #else MAKE_STD_ZVAL(obj); object_init_ex(obj, php_imagickpixel_sc_entry); internp = Z_IMAGICKPIXEL_P(obj); #endif internp->initialized_via_iterator = 1; php_imagick_replace_pixelwand(internp, wand_array[i]); #if PHP_VERSION_ID >= 70000 add_next_index_zval(return_value, &obj); #else add_next_index_zval(return_value, obj); #endif } } /* {{{ proto array ImagickPixelIterator::getPreviousIteratorRow() Returns the previous row as an array of pixel wands from the pixel iterator. */ PHP_METHOD(ImagickPixelIterator, getPreviousIteratorRow) { php_imagickpixeliterator_object *internpix; PixelWand **wand_array; size_t num_wands; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } wand_array = PixelGetPreviousIteratorRow(internpix->pixel_iterator, &num_wands); #if MagickLibVersion <= 0x628 if (internpix->iterator_position > 0) { internpix->iterator_position--; } #endif if (!wand_array) { RETURN_NULL(); } s_pixelwands_to_zval (wand_array, num_wands, return_value TSRMLS_CC); return; } /* }}} */ /* {{{ proto array ImagickPixelIterator::getCurrentIteratorRow() Returns the current row as an array of pixel wands from the pixel iterator. */ PHP_METHOD(ImagickPixelIterator, getCurrentIteratorRow) { php_imagickpixeliterator_object *internpix; PixelWand **wand_array; size_t num_wands; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } #if MagickLibVersion <= 0x628 if (internpix->iterator_position >= internpix->rows) { RETURN_NULL(); } else if (internpix->iterator_position != 0) { long tmp; (void)PixelGetPreviousIteratorRow(internpix->pixel_iterator, &tmp); } wand_array = PixelGetNextIteratorRow(internpix->pixel_iterator, &num_wands); #else wand_array = PixelGetCurrentIteratorRow(internpix->pixel_iterator, &num_wands); #endif if (!wand_array) { RETURN_NULL(); } s_pixelwands_to_zval (wand_array, num_wands, return_value TSRMLS_CC); return; } /* }}} */ /* {{{ proto array ImagickPixelIterator::getNextIteratorRow() Returns the next row as an array of pixel wands from the pixel iterator. */ PHP_METHOD(ImagickPixelIterator, getNextIteratorRow) { php_imagickpixeliterator_object *internpix; PixelWand **wand_array; size_t num_wands; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } wand_array = PixelGetNextIteratorRow(internpix->pixel_iterator, &num_wands); #if MagickLibVersion <= 0x628 internpix->iterator_position++; #endif if (!wand_array) { RETURN_NULL(); } s_pixelwands_to_zval (wand_array, num_wands, return_value TSRMLS_CC); return; } /* }}} */ /* {{{ proto bool ImagickPixelIterator::clear() Clear resources associated with a PixelIterator. */ PHP_METHOD(ImagickPixelIterator, clear) { php_imagickpixeliterator_object *internpix; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } /* Assertion failure with earlier versions */ #if MagickLibVersion <= 0x628 RETURN_TRUE; #else ClearPixelIterator(internpix->pixel_iterator); RETURN_TRUE; #endif } /* }}} */ /* {{{ proto bool ImagickPixelIterator::valid() The if the current iterator row is valid */ PHP_METHOD(ImagickPixelIterator, valid) { php_imagickpixeliterator_object *internpix; if (zend_parse_parameters_none() == FAILURE) { return; } internpix = Z_IMAGICKPIXELITERATOR_P(getThis()); if (!internpix->initialized) { php_imagick_throw_exception (IMAGICKPIXELITERATOR_CLASS, "ImagickPixelIterator is not initialized correctly" TSRMLS_CC); return; } #if MagickLibVersion <= 0x628 if (internpix->iterator_position < internpix->rows) { RETURN_TRUE; } #else /* Test if the current row is valid */ if (PixelSetIteratorRow(internpix->pixel_iterator, PixelGetIteratorRow(internpix->pixel_iterator))) { RETURN_TRUE; } #endif RETURN_FALSE; } /* }}} */ /* END OF PIXELITERATOR */ imagick-3.6.0/imagickkernel_class.c0000644000000000000000000005650414145213431015770 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Dan Ackroyd | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" #ifdef IMAGICK_WITH_KERNEL #if MagickLibVersion < 0x691 // These function defines are required currently as the functions are // currently not available in the public ImageMagick header files // This is being fixed for the next version of ImageMagick. Image *MorphologyApply(const Image *,const ChannelType,const MorphologyMethod, const ssize_t,const KernelInfo *,const CompositeOperator,const double, ExceptionInfo *); void ScaleKernelInfo(KernelInfo *,const double,const GeometryFlags), UnityAddKernelInfo(KernelInfo *,const double), ZeroKernelNans(KernelInfo *); #endif static void php_imagickkernelvalues_to_zval(zval *zv, KernelInfo *kernel_info) { int count; double value; unsigned int x, y; #if PHP_VERSION_ID >= 70000 zval row; #else zval *row; #endif zval *p_row; count = 0; for (y=0; yheight ; y++) { #if PHP_VERSION_ID >= 70000 p_row = &row; #else MAKE_STD_ZVAL(row); p_row = row; #endif array_init(p_row); for (x=0; xwidth ; x++) { value = kernel_info->values[count]; count++; //nan is not equal to itself if (value != value) { //this will be broken by some compilers - need to investigate more... add_next_index_bool(p_row, 0); } else { add_next_index_double(p_row, value); } } add_next_index_zval(zv, p_row); } } #if PHP_VERSION_ID >= 80000 HashTable* php_imagickkernel_get_debug_info(zend_object *obj, int *is_temp TSRMLS_DC) /* {{{ */ #else HashTable* php_imagickkernel_get_debug_info(zval *obj, int *is_temp TSRMLS_DC) /* {{{ */ #endif { php_imagickkernel_object *internp; HashTable *debug_info; KernelInfo *kernel_info; #if PHP_VERSION_ID >= 70000 zval matrix; #else zval *matrix; #endif *is_temp = 1; //var_dump will destroy the hashtable #if PHP_VERSION_ID >= 80000 internp = php_imagickkernel_fetch_object(obj); #else internp = Z_IMAGICKKERNEL_P(obj); #endif kernel_info = internp->kernel_info; ALLOC_HASHTABLE(debug_info); ZEND_INIT_SYMTABLE_EX(debug_info, 1, 0); while (kernel_info != NULL) { #if PHP_VERSION_ID >= 70000 array_init(&matrix); php_imagickkernelvalues_to_zval(&matrix, kernel_info); zend_hash_next_index_insert(debug_info, &matrix); #else MAKE_STD_ZVAL(matrix); array_init(matrix); php_imagickkernelvalues_to_zval(matrix, kernel_info); zend_hash_next_index_insert(debug_info, &matrix, sizeof(zval *), NULL); #endif kernel_info = kernel_info->next; } return debug_info; } static void im_CalcKernelMetaData(KernelInfo *kernel) { size_t i; kernel->minimum = kernel->maximum = 0.0; kernel->negative_range = kernel->positive_range = 0.0; for (i=0; i < (kernel->width*kernel->height); i++) { if (fabs(kernel->values[i]) < MagickEpsilon) { kernel->values[i] = 0.0; } if (kernel->values[i] < 0) { kernel->negative_range += kernel->values[i]; } else { kernel->positive_range += kernel->values[i]; } if (kernel->values[i] < kernel->minimum) { kernel->minimum = kernel->values[i]; } if (kernel->values[i] > kernel->maximum) { kernel->maximum = kernel->values[i]; } } return; } #if MagickLibVersion > 0x661 static KernelInfo *imagick_createKernel(KernelValueType *values, size_t width, size_t height, size_t origin_x, size_t origin_y) { KernelInfo *kernel_info; #if MagickLibVersion >= 0x700 unsigned int i; ExceptionInfo *_exception_info = (ExceptionInfo *) NULL; //TODO - inspect exception info kernel_info=AcquireKernelInfo(NULL, _exception_info); #else kernel_info=AcquireKernelInfo(NULL); #endif if (kernel_info == (KernelInfo *) NULL) { return NULL; } kernel_info->width = width; kernel_info->height = height; kernel_info->x = origin_x; kernel_info->y = origin_y; //Need to free old values? if (kernel_info->values != NULL) { RelinquishAlignedMemory(kernel_info->values); } #if MagickLibVersion >= 0x700 kernel_info->values = (MagickRealType *)AcquireAlignedMemory(width*height, sizeof(MagickRealType)); for (i=0; ivalues[i] = (MagickRealType)values[i]; } #else kernel_info->values = values; #endif im_CalcKernelMetaData(kernel_info); return kernel_info; } #endif static void createKernelZval(zval *pzval, KernelInfo *kernel_info TSRMLS_DC) { php_imagickkernel_object *intern_return; object_init_ex(pzval, php_imagickkernel_sc_entry); intern_return = Z_IMAGICKKERNEL_P(pzval); intern_return->kernel_info = kernel_info; } /* {{{ proto ImagickKernel ImagickKernel::__construct() The ImagickKernel constructor */ PHP_METHOD(ImagickKernel, __construct) { // This suppresses an 'unused parameter' warning. (void)return_value; if (zend_parse_parameters_none() == FAILURE) { return; } // this method is private. } /* }}} */ #define MATRIX_ERROR_EMPTY "Cannot create kernel, matrix is empty." #define MATRIX_ERROR_UNEVEN "Values must be matrix, with the same number of columns in each row." #define MATRIX_ERROR_BAD_VALUE "Only numbers or false are valid values in a kernel matrix." #define MATRIX_ORIGIN_REQUIRED "For kernels with even numbered rows or columns, the origin position must be specified." /* {{{ proto ImagickKernel ImagickKernel::fromMatrix(array matrix, [array origin]) Create a kernel from an 2d matrix of values. Each value should either be a float (if the element should be used) or 'false' if the element should be skipped. For matrixes that are odd sizes in both dimensions the the origin pixel will default to the centre of the kernel. For all other kernel sizes the origin pixel must be specified. */ #if PHP_VERSION_ID >= 70000 PHP_METHOD(ImagickKernel, fromMatrix) { zval *kernel_array; zval *origin_array; HashTable *inner_array; KernelInfo *kernel_info; unsigned long num_rows, num_columns = 0; unsigned int previous_num_columns = (unsigned int)-1; unsigned int row, column; zval *pzval_outer; zval *pzval_inner; int count = 0; size_t origin_x, origin_y; zval *tmp; KernelValueType *values = NULL; double notanumber = sqrt((double)-1.0); /* Special Value : Not A Number */ count = 0; row = 0; origin_array = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &kernel_array, &origin_array) == FAILURE) { return; } num_rows = zend_hash_num_elements(Z_ARRVAL_P(kernel_array)); if (num_rows == 0) { //error - array has zero elements. php_imagick_throw_exception(IMAGICKKERNEL_CLASS, MATRIX_ERROR_EMPTY TSRMLS_CC); return; } for (row=0 ; row> 1; origin_y = (num_rows - 1) >> 1; } else { HashTable *origin_array_ht; origin_array_ht = Z_ARRVAL_P(origin_array); // parse the origin_x tmp = zend_hash_index_find(origin_array_ht, 0); if (tmp != NULL) { ZVAL_DEREF(tmp); origin_x = Z_LVAL_P(tmp); } else { php_imagick_throw_exception(IMAGICKKERNEL_CLASS, MATRIX_ORIGIN_REQUIRED TSRMLS_CC); goto cleanup; } // origin_x is unsigned, so checking for > num_columns, also // checks for < 0 if (origin_x>=num_columns) { zend_throw_exception_ex( php_imagickkernel_exception_class_entry, 5 TSRMLS_CC, "origin_x for matrix is outside bounds of columns: " ZEND_LONG_FMT, origin_x ); goto cleanup; } // parse the origin_y tmp = zend_hash_index_find(origin_array_ht, 1); if (tmp != NULL) { ZVAL_DEREF(tmp); origin_y = Z_LVAL_P(tmp); } else { php_imagick_throw_exception(IMAGICKKERNEL_CLASS, MATRIX_ORIGIN_REQUIRED TSRMLS_CC); goto cleanup; } // origin_y is unsigned, so checking for > num_rows, also // checks for < 0 if (origin_y>=num_rows) { zend_throw_exception_ex( php_imagickkernel_exception_class_entry, 5 TSRMLS_CC, "origin_y for matrix is outside bounds of rows: " ZEND_LONG_FMT, origin_x ); goto cleanup; } } kernel_info = imagick_createKernel(values, num_columns, num_rows, origin_x, origin_y); createKernelZval(return_value, kernel_info TSRMLS_CC); return; cleanup: if (values != NULL) { RelinquishAlignedMemory(values); } } #else // PHP 5 PHP_METHOD(ImagickKernel, fromMatrix) { zval *kernel_array; zval *origin_array; HashTable *inner_array; KernelInfo *kernel_info; unsigned long num_rows, num_columns = 0; unsigned int previous_num_columns = (unsigned int)-1; unsigned int row, column; HashTable *origin_array_ht; zval **ppzval_outer; zval **ppzval_inner; int count = 0; size_t origin_x, origin_y; zval **tmp; KernelValueType *values = NULL; double notanumber = sqrt((double)-1.0); /* Special Value : Not A Number */ previous_num_columns = -1; count = 0; row = 0; origin_array = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &kernel_array, &origin_array) == FAILURE) { return; } num_rows = zend_hash_num_elements(Z_ARRVAL_P(kernel_array)); if (num_rows == 0) { //error - array has zero elements. php_imagick_throw_exception(IMAGICKKERNEL_CLASS, MATRIX_ERROR_EMPTY TSRMLS_CC); return; } for (row=0 ; row> 1; origin_y = (num_rows - 1) >> 1; } else { origin_array_ht = Z_ARRVAL_P(origin_array); // parse and check the origin_x if (zend_hash_index_find(origin_array_ht, 0, (void**)&tmp) == SUCCESS) { origin_x = Z_LVAL_PP(tmp); } else { php_imagick_throw_exception(IMAGICKKERNEL_CLASS, MATRIX_ORIGIN_REQUIRED TSRMLS_CC); goto cleanup; } // origin_x is unsigned, so checking for > num_columns, also // checks for < 0 if (origin_x>=num_columns) { zend_throw_exception_ex( php_imagickkernel_exception_class_entry, 5 TSRMLS_CC, "origin_x for matrix is outside bounds of columns: %d", origin_x ); goto cleanup; } // parse and check the origin_y if (zend_hash_index_find(origin_array_ht, 1, (void**)&tmp) == SUCCESS) { origin_y = Z_LVAL_PP(tmp); } else { php_imagick_throw_exception(IMAGICKKERNEL_CLASS, MATRIX_ORIGIN_REQUIRED TSRMLS_CC); goto cleanup; } // origin_y is unsigned, so checking for > num_rows, also // checks for < 0 if (origin_y>=num_rows) { zend_throw_exception_ex( php_imagickkernel_exception_class_entry, 5 TSRMLS_CC, "origin_y for matrix is outside bounds of rows: %d", origin_y ); goto cleanup; } } kernel_info = imagick_createKernel(values, num_columns, num_rows, origin_x, origin_y); createKernelZval(return_value, kernel_info TSRMLS_CC); return; cleanup: if (values != NULL) { RelinquishAlignedMemory(values); } } #endif //end of zend_engine_3 /* }}} */ static void imagick_fiddle_with_geometry_info(ssize_t type, GeometryFlags flags, GeometryInfo *geometry_info) { /* special handling of missing values in input string */ switch( type ) { /* Shape Kernel Defaults */ case UnityKernel: { if ((flags & WidthValue) == 0) geometry_info->rho = 1.0; /* Default scale = 1.0, zero is valid */ break; } case SquareKernel: case DiamondKernel: case OctagonKernel: case DiskKernel: case PlusKernel: case CrossKernel: { if ( (flags & HeightValue) == 0 ) { geometry_info->sigma = 1.0; /* Default scale = 1.0, zero is valid */ } break; } case RingKernel: { if ((flags & XValue) == 0) { geometry_info->xi = 1.0; /* Default scale = 1.0, zero is valid */ } break; } case RectangleKernel: { /* Rectangle - set size defaults */ if ((flags & WidthValue) == 0) { /* if no width then */ geometry_info->rho = geometry_info->sigma; /* then width = height */ } if (geometry_info->rho < 1.0) { /* if width too small */ geometry_info->rho = 3; /* then width = 3 */ } if (geometry_info->sigma < 1.0) { /* if height too small */ geometry_info->sigma = geometry_info->rho; /* then height = width */ } if ((flags & XValue) == 0) { /* center offset if not defined */ geometry_info->xi = (double)(((ssize_t)geometry_info->rho-1)/2); } if ((flags & YValue) == 0) { geometry_info->psi = (double)(((ssize_t)geometry_info->sigma-1)/2); } break; } /* Distance Kernel Defaults */ case ChebyshevKernel: case ManhattanKernel: case OctagonalKernel: case EuclideanKernel: { if ((flags & HeightValue) == 0) { /* no distance scale */ geometry_info->sigma = 100.0; /* default distance scaling */ } else if ((flags & AspectValue ) != 0) { /* '!' flag */ geometry_info->sigma = QuantumRange/(geometry_info->sigma+1); /* maximum pixel distance */ } else if ((flags & PercentValue ) != 0) { /* '%' flag */ geometry_info->sigma *= QuantumRange/100.0; /* percentage of color range */ } break; } default: { break; } } } /* {{{ proto ImagickKernel ImagickKernel::fromBuiltin(type, string) Create a kernel from a builtin in kernel. See http://www.imagemagick.org/Usage/morphology/#kernel for examples. Currently the 'rotation' symbols are not supported. Example: $diamondKernel = ImagickKernel::fromBuiltIn(\Imagick::KERNEL_DIAMOND, "2"); */ PHP_METHOD(ImagickKernel, fromBuiltin) { im_long kernel_type; GeometryInfo geometry_info = { 0, //rho, 0, //sigma, 0, //xi, 0, //psi, 0, //chi; }; KernelInfo *kernel_info; char *string; IM_LEN_TYPE string_len; GeometryFlags flags; #if MagickLibVersion >= 0x700 ExceptionInfo *_exception_info = NULL; #endif if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &kernel_type, &string, &string_len) == FAILURE) { return; } flags = ParseGeometry(string, &geometry_info); imagick_fiddle_with_geometry_info(kernel_type, flags, &geometry_info); #if MagickLibVersion >= 0x700 //TODO - inspect exception info kernel_info = AcquireKernelBuiltIn(kernel_type, &geometry_info, _exception_info); #else kernel_info = AcquireKernelBuiltIn(kernel_type, &geometry_info); #endif createKernelZval(return_value, kernel_info TSRMLS_CC); return; } /* }}} */ /* {{{ proto void ImagickKernel::addKernel(ImagickKernel kernel) Attach another kernel to this kernel to allow them to both be applied in a single morphology or filter function. Returns the new combined kernel. */ PHP_METHOD(ImagickKernel, addKernel) { zval *objvar; KernelInfo *kernel_info_add_clone; KernelInfo *kernel_info; KernelInfo *kernel_info_target; php_imagickkernel_object *kernel; php_imagickkernel_object *internp; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objvar, php_imagickkernel_sc_entry) == FAILURE) { return; } kernel = Z_IMAGICKKERNEL_P(objvar); internp = Z_IMAGICKKERNEL_P(getThis()); if (kernel->kernel_info == NULL) { zend_throw_exception(php_imagickkernel_exception_class_entry, "ImagickKernel is empty, cannot be used", (long)0 TSRMLS_CC); RETURN_NULL(); } kernel_info = internp->kernel_info; do { kernel_info_target = kernel_info; kernel_info = kernel_info->next; } while (kernel_info != NULL); kernel_info_add_clone = CloneKernelInfo(kernel->kernel_info); kernel_info_target->next = kernel_info_add_clone; return; } /* }}} */ /* {{{ proto ImagickKernel[] ImagickKernel::separate(void) Separates a linked set of kernels and returns an array of ImagickKernels. */ PHP_METHOD(ImagickKernel, separate) { php_imagickkernel_object *internp; KernelInfo *kernel_info; KernelInfo *kernel_info_copy; int number_values; KernelValueType * values_copy; #if PHP_VERSION_ID >= 70000 zval separate_object; #else zval *separate_object; #endif if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKKERNEL_P(getThis()); IMAGICK_KERNEL_NOT_NULL_EMPTY(internp); kernel_info = internp->kernel_info; array_init(return_value); while (kernel_info != NULL) { number_values = kernel_info->width * kernel_info->height; values_copy = (KernelValueType *)AcquireAlignedMemory(kernel_info->width, kernel_info->height*sizeof(KernelValueType)); memcpy(values_copy, kernel_info->values, number_values * sizeof(KernelValueType)); kernel_info_copy = imagick_createKernel( values_copy, kernel_info->width, kernel_info->height, kernel_info->x, kernel_info->y ); #if PHP_VERSION_ID >= 70000 createKernelZval(&separate_object, kernel_info_copy TSRMLS_CC); add_next_index_zval(return_value, &separate_object); #else MAKE_STD_ZVAL(separate_object); createKernelZval(separate_object, kernel_info_copy TSRMLS_CC); add_next_index_zval(return_value, separate_object); #endif kernel_info = kernel_info->next; } return; } /* }}} */ /* {{{ proto [] ImagickKernel::getMatrix(void) Get the 2d matrix of values used in this kernel. The elements are either float for elements that are used or 'false' if the element should be skipped. */ PHP_METHOD(ImagickKernel, getMatrix) { php_imagickkernel_object *internp; if (zend_parse_parameters_none() == FAILURE) { return; } internp = Z_IMAGICKKERNEL_P(getThis()); IMAGICK_KERNEL_NOT_NULL_EMPTY(internp); array_init(return_value); php_imagickkernelvalues_to_zval(return_value, internp->kernel_info); return; } /* }}} */ /* {{{ proto [] ImagickKernel::scale(float scaling_factor[, int NORMALIZE_KERNEL_FLAG]) ScaleKernelInfo() scales the given kernel list by the given amount, with or without normalization of the sum of the kernel values (as per given flags). The exact behaviour of this function depends on the normalization type being used please see http://www.imagemagick.org/api/morphology.php#ScaleKernelInfo for details. Flag should be one of NORMALIZE_KERNEL_VALUE, NORMALIZE_KERNEL_CORRELATE, NORMALIZE_KERNEL_PERCENT or not set. */ PHP_METHOD(ImagickKernel, scale) { php_imagickkernel_object *internp; double scale; im_long normalize_flag = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|l", &scale, &normalize_flag) == FAILURE) { return; } internp = Z_IMAGICKKERNEL_P(getThis()); IMAGICK_KERNEL_NOT_NULL_EMPTY(internp); ScaleKernelInfo(internp->kernel_info, scale, normalize_flag); return; } /* }}} */ /* {{{ proto [] ImagickKernel::addUnityKernel(float scale) Adds a given amount of the 'Unity' Convolution Kernel to the given pre-scaled and normalized Kernel. This in effect adds that amount of the original image into the resulting convolution kernel. The resulting effect is to convert the defined kernels into blended soft-blurs, unsharp kernels or into sharpening kernels. */ PHP_METHOD(ImagickKernel, addUnityKernel) { php_imagickkernel_object *internp; double scale; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &scale) == FAILURE) { return; } internp = Z_IMAGICKKERNEL_P(getThis()); IMAGICK_KERNEL_NOT_NULL_EMPTY(internp); UnityAddKernelInfo(internp->kernel_info, scale); return; } /* }}} */ #endif imagick-3.6.0/imagick_helpers.c0000644000000000000000000023524314145213431015123 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" MagickBooleanType php_imagick_progress_monitor(const char *text, const MagickOffsetType offset, const MagickSizeType span, void *client_data) { FILE *fp; php_imagick_object *intern = (php_imagick_object *)client_data; if (!intern) { return MagickFalse; } if (!intern->progress_monitor_name) { return MagickFalse; } fp = fopen(intern->progress_monitor_name, "a+"); if (!fp) { return MagickFalse; } fprintf(fp, "text: %s, offset: %lld, span: %lld\n", text, offset, span); fclose(fp); return MagickTrue; } void php_imagick_cleanup_progress_callback(php_imagick_callback* progress_callback TSRMLS_DC) { if (progress_callback) { if (progress_callback->previous_callback) { php_imagick_cleanup_progress_callback(progress_callback->previous_callback TSRMLS_CC); efree(progress_callback->previous_callback); } #if PHP_VERSION_ID >= 70000 zval_ptr_dtor(&progress_callback->user_callback); #else zval_ptr_dtor(&progress_callback->user_callback); #endif } } MagickBooleanType php_imagick_progress_monitor_callable(const char *text, const MagickOffsetType offset, const MagickSizeType span, void *userData) { int error; zend_fcall_info fci; zend_fcall_info_cache fci_cache; #if PHP_VERSION_ID >= 70000 zval zargs[2]; zval retval; #else zval **zargs[2]; zval *retval_ptr; #endif //We can get the data both via the passed param and via //IMAGICK_G(progress_callback) - this should be quicker php_imagick_callback *callback = (php_imagick_callback*)userData; // This suppresses an 'unused parameter' warning. // We could maybe use text. (void)text; #if PHP_VERSION_ID >= 70000 && defined(ZTS) if( NULL == tsrm_get_ls_cache() ) { return MagickTrue; } #endif #if PHP_VERSION_ID < 70000 TSRMLS_FETCH_FROM_CTX(callback->thread_ctx); #endif fci_cache = empty_fcall_info_cache; fci = empty_fcall_info; fci.size = sizeof(fci); #if PHP_VERSION_ID < 70100 fci.function_table = EG(function_table); #endif #if PHP_VERSION_ID >= 70000 //fci.function_name = *callback->user_callback; ZVAL_COPY_VALUE(&fci.function_name, &callback->user_callback); fci.retval = &retval; #else retval_ptr = NULL; fci.function_name = callback->user_callback; fci.retval_ptr_ptr = &retval_ptr; #endif fci.param_count = 2; fci.params = zargs; #if PHP_VERSION_ID >= 70000 ZVAL_LONG(&zargs[0], offset); ZVAL_LONG(&zargs[1], span); #else zargs[0] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[0]); ZVAL_LONG(*zargs[0], offset); zargs[1] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[1]); ZVAL_LONG(*zargs[1], span); #endif error = zend_call_function(&fci, &fci_cache TSRMLS_CC); if (error == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the callback"); //Abort processing as user callback is no longer callable return MagickFalse; } #if PHP_VERSION_ID >= 70000 if (Z_TYPE(retval) == IS_FALSE) { //User returned false - tell Imagick to abort processing. return MagickFalse; } #else zval_ptr_dtor(zargs[0]); zval_ptr_dtor(zargs[1]); if (retval_ptr) { if (Z_TYPE_P(retval_ptr) == IS_BOOL) { if (Z_LVAL_P(retval_ptr) == 0) { //User returned false - tell Imagick to abort processing. return MagickFalse; } } } #endif return MagickTrue; } /* This is not universally safe to use, but is safe enough for values that will be encountered for image dimensions. */ static inline double im_round_helper(double value) { if (value >= 0.0) { // Prevent zero width/height images if (value < 1) { return 1; } return floor(value + 0.5); } else { return ceil(value - 0.5); } } zend_bool php_imagick_thumbnail_dimensions(MagickWand *magick_wand, zend_bool bestfit, im_long desired_width, im_long desired_height, im_long *new_width, im_long *new_height, zend_bool legacy) { im_long orig_width, orig_height; orig_width = MagickGetImageWidth(magick_wand); orig_height = MagickGetImageHeight(magick_wand); if ((orig_width == desired_width) && (orig_height == desired_height)) { *new_width = desired_width; *new_height = desired_height; return 1; } if (bestfit) { double ratio_x, ratio_y; if (desired_width <= 0 || desired_height <= 0) { return 0; } ratio_x = (double) desired_width / (double) orig_width; ratio_y = (double) desired_height / (double) orig_height; //in the case of square images there should be no rounding error if (ratio_x == ratio_y) { *new_width = desired_width; *new_height = desired_height; } else if (ratio_x < ratio_y) { *new_width = desired_width; if (legacy) { *new_height = ratio_x * ((double) orig_height); } else { *new_height = im_round_helper(ratio_x * ((double) orig_height)); } } else { *new_height = desired_height; if (legacy) { *new_width = ratio_y * ((double) orig_width); } else { *new_width = im_round_helper(ratio_y * ((double) orig_width)); } } *new_width = (*new_width < 1) ? 1 : *new_width; *new_height = (*new_height < 1) ? 1 : *new_height; } else { double ratio; if (desired_width <= 0 && desired_height <= 0) { return 0; } if (desired_width <= 0 || desired_height <= 0) { if (desired_width <= 0) { ratio = (double) orig_height / (double) desired_height; if (legacy) { *new_width = ((double) orig_width) / ratio; } else { *new_width = im_round_helper(((double) orig_width) / ratio); } *new_height = desired_height; } else { ratio = (double) orig_width / (double) desired_width; if (legacy) { *new_height = ((double) orig_height) / ratio; } else { *new_height = im_round_helper(((double) orig_height) / ratio); } *new_width = desired_width; } } else { *new_width = desired_width; *new_height = desired_height; } } return 1; } zend_bool php_imagick_validate_map(const char *map TSRMLS_DC) { zend_bool match; const char *p = map; char allow_map[] = { 'R', 'G', 'B', 'A', 'O', 'C', 'Y', 'M', 'K', 'I', 'P' }; while (*p != '\0') { char *it = allow_map; match = 0; while(*it != '\0') { if (*(it++) == *p) { match = 1; break; } } if (!match) { return 0; } p++; } return 1; } double *php_imagick_zval_to_double_array(zval *param_array, im_long *num_elements TSRMLS_DC) { double *double_array; long i = 0; #if PHP_VERSION_ID >= 70000 zval *pzvalue; #else zval **ppzval; #endif *num_elements = zend_hash_num_elements(Z_ARRVAL_P(param_array)); if (*num_elements == 0) { return NULL; } double_array = ecalloc(*num_elements, sizeof(double)); #if PHP_VERSION_ID >= 70000 ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(param_array), pzvalue) { ZVAL_DEREF(pzvalue); double_array[i] = zval_get_double(pzvalue); i++; } ZEND_HASH_FOREACH_END(); #else for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(param_array)); zend_hash_get_current_data(Z_ARRVAL_P(param_array), (void **) &ppzval) == SUCCESS; zend_hash_move_forward(Z_ARRVAL_P(param_array)), i++) { zval tmp_zval, *tmp_pzval; double value = 0.0; if (Z_TYPE_PP(ppzval) == IS_DOUBLE) { value = Z_DVAL_PP(ppzval); } else { tmp_zval = **ppzval; zval_copy_ctor(&tmp_zval); tmp_pzval = &tmp_zval; convert_to_double(tmp_pzval); value = Z_DVAL_P(tmp_pzval); zval_dtor (tmp_pzval); } double_array[i] = value; } #endif return double_array; } im_long *php_imagick_zval_to_long_array(zval *param_array, im_long *num_elements TSRMLS_DC) { im_long *long_array; im_long i = 0; #if PHP_VERSION_ID >= 70000 zval *pzvalue; #else zval **ppzval; #endif *num_elements = zend_hash_num_elements(Z_ARRVAL_P(param_array)); if (*num_elements == 0) { return NULL; } long_array = ecalloc(*num_elements, sizeof(im_long)); #if PHP_VERSION_ID >= 70000 ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(param_array), pzvalue) { ZVAL_DEREF(pzvalue); long_array[i] = zval_get_long(pzvalue); i++; } ZEND_HASH_FOREACH_END(); #else for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(param_array)); zend_hash_get_current_data(Z_ARRVAL_P(param_array), (void **) &ppzval) == SUCCESS; zend_hash_move_forward(Z_ARRVAL_P(param_array)), i++) { zval tmp_zval, *tmp_pzval; im_long value = 0; if (Z_TYPE_PP(ppzval) == IS_DOUBLE) { value = Z_LVAL_PP(ppzval); } else { tmp_zval = **ppzval; zval_copy_ctor(&tmp_zval); tmp_pzval = &tmp_zval; convert_to_long(tmp_pzval); value = Z_LVAL_P(tmp_pzval); zval_dtor (tmp_pzval); } long_array[i] = value; } #endif return long_array; } unsigned char *php_imagick_zval_to_char_array(zval *param_array, im_long *num_elements TSRMLS_DC) { unsigned char *char_array; im_long i = 0; #if PHP_VERSION_ID >= 70000 zval *pzvalue; #else zval **ppzval; #endif *num_elements = zend_hash_num_elements(Z_ARRVAL_P(param_array)); if (*num_elements == 0) { return NULL; } char_array = ecalloc(*num_elements, sizeof(unsigned char)); #if PHP_VERSION_ID >= 70000 ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(param_array), pzvalue) { ZVAL_DEREF(pzvalue); char_array[i] = zval_get_long(pzvalue); i++; } ZEND_HASH_FOREACH_END(); #else for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(param_array)); zend_hash_get_current_data(Z_ARRVAL_P(param_array), (void **) &ppzval) == SUCCESS; zend_hash_move_forward(Z_ARRVAL_P(param_array)), i++) { zval tmp_zval, *tmp_pzval; im_long value = 0; if (Z_TYPE_PP(ppzval) == IS_DOUBLE) { value = Z_LVAL_PP(ppzval); } else { tmp_zval = **ppzval; zval_copy_ctor(&tmp_zval); tmp_pzval = &tmp_zval; convert_to_long(tmp_pzval); value = Z_LVAL_P(tmp_pzval); zval_dtor (tmp_pzval); } char_array[i] = value; } #endif return char_array; } zend_bool php_imagick_check_font(char *font, int font_len TSRMLS_DC) { zend_bool retval = 0; char **fonts; unsigned long i = 0; size_t num_fonts = 0; /* Check that user is only able to set a proper font */ fonts = MagickQueryFonts("*", &num_fonts); for(i = 0 ; i < num_fonts ; i++) { /* Let's see if the font is among configured fonts */ if (strncasecmp(fonts[i], font, font_len) == 0) { retval = 1; break; } } IMAGICK_FREE_MAGICK_MEMORY(fonts); return retval; } php_imagick_rw_result_t php_imagick_file_access_check (const char *filename TSRMLS_DC) { if (strlen(filename) >= MAXPATHLEN) return IMAGICK_RW_FILENAME_TOO_LONG; #if defined(CHECKUID_CHECK_FILE_AND_DIR) if (PG(safe_mode) && (!php_checkuid_ex(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR, CHECKUID_NO_ERRORS))) return IMAGICK_RW_SAFE_MODE_ERROR; #endif if (php_check_open_basedir_ex(filename, 0 TSRMLS_CC)) return IMAGICK_RW_OPEN_BASEDIR_ERROR; if (VCWD_ACCESS(filename, F_OK) != 0) return IMAGICK_RW_PATH_DOES_NOT_EXIST; if (VCWD_ACCESS(filename, R_OK) != 0) return IMAGICK_RW_PERMISSION_DENIED; return IMAGICK_RW_OK; } static void s_rw_fail_to_exception (php_imagick_rw_result_t rc, const char *filename TSRMLS_DC) { switch (rc) { case IMAGICK_RW_SAFE_MODE_ERROR: zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "Safe mode restricts user to read the file: %s", filename); break; case IMAGICK_RW_OPEN_BASEDIR_ERROR: zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "open_basedir restriction in effect. File(%s) is not within the allowed path(s)", filename); break; case IMAGICK_RW_PERMISSION_DENIED: zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "Permission denied to: %s", filename); break; case IMAGICK_RW_FILENAME_TOO_LONG: zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "Filename too long: %s", filename); break; case IMAGICK_RW_PATH_DOES_NOT_EXIST: zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "The path does not exist: %s", filename); break; case IMAGICK_RW_PATH_IS_DIR: zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "The path is a directory: %s", filename); break; default: zend_throw_exception_ex(php_imagick_exception_class_entry, 1 TSRMLS_CC, "Unknown error"); break; } } void php_imagick_rw_fail_to_exception (MagickWand *magick_wand, php_imagick_rw_result_t rc, const char *filename TSRMLS_DC) { if (rc == IMAGICK_RW_UNDERLYING_LIBRARY) { php_imagick_convert_imagick_exception (magick_wand, "Failed to read the file" TSRMLS_CC); return; } s_rw_fail_to_exception (rc, filename TSRMLS_CC); } void php_imagick_imagickdraw_rw_fail_to_exception (DrawingWand *drawing_wand, php_imagick_rw_result_t rc, const char *filename TSRMLS_DC) { if (rc == IMAGICK_RW_UNDERLYING_LIBRARY) { php_imagick_convert_imagickdraw_exception (drawing_wand, "Failed to read the file" TSRMLS_CC); return; } s_rw_fail_to_exception (rc, filename TSRMLS_CC); } PointInfo *php_imagick_zval_to_pointinfo_array(zval *coordinate_array, int *num_elements TSRMLS_DC) { PointInfo *coordinates; long elements, sub_elements, i; HashTable *sub_array; #if PHP_VERSION_ID >= 70000 zval *pzvalue; #else HashTable *coords; zval **ppzval; #endif i = 0; elements = zend_hash_num_elements(Z_ARRVAL_P(coordinate_array)); if (elements < 1) { coordinates = (PointInfo *)NULL; *num_elements = 0; return coordinates; } *num_elements = elements; coordinates = emalloc(sizeof(PointInfo) * elements); #if PHP_VERSION_ID >= 70000 ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(coordinate_array), pzvalue) { zval *pz_x, *pz_y; ZVAL_DEREF(pzvalue); /* If its something than array lets error here */ if(Z_TYPE_P(pzvalue) != IS_ARRAY) { efree(coordinates); *num_elements = 0; return NULL; } /* Subarray should have two elements. X and Y */ sub_elements = zend_hash_num_elements(Z_ARRVAL_P(pzvalue)); /* Exactly two elements */ if (sub_elements != 2) { efree(coordinates); *num_elements = 0; return NULL; } /* Subarray values */ sub_array = Z_ARRVAL_P(pzvalue); /* Get X */ if ((pz_x = zend_hash_str_find(sub_array, "x", sizeof("x")-1)) == NULL) { efree(coordinates); *num_elements = 0; return NULL; } /* Get Y */ if ((pz_y = zend_hash_str_find(sub_array, "y", sizeof("y")-1)) == NULL) { efree(coordinates); *num_elements = 0; return NULL; } /* Assign X and Y */ coordinates[i].x = zval_get_double(pz_x); coordinates[i].y = zval_get_double(pz_y); i++; } ZEND_HASH_FOREACH_END(); #else coords = Z_ARRVAL_P(coordinate_array); zend_hash_internal_pointer_reset_ex(coords, (HashPosition *) 0); for (i = 0, zend_hash_internal_pointer_reset(coords); zend_hash_get_current_data(coords, (void **) &ppzval) == SUCCESS; zend_hash_move_forward(coords), i++ ) { zval **ppz_x, **ppz_y; zval tmp_zx, *tmp_pzx, tmp_zy, *tmp_pzy; /* If its something than array lets error here */ if(Z_TYPE_PP(ppzval) != IS_ARRAY) { efree(coordinates); *num_elements = 0; return NULL; } /* Subarray should have two elements. X and Y */ sub_elements = zend_hash_num_elements(Z_ARRVAL_PP(ppzval)); /* Exactly two elements */ if (sub_elements != 2) { efree(coordinates); *num_elements = 0; return NULL; } /* Subarray values */ sub_array = Z_ARRVAL_PP(ppzval); /* Get X */ if (zend_hash_find(sub_array, "x", sizeof("x"), (void**)&ppz_x) == FAILURE) { efree(coordinates); *num_elements = 0; return NULL; } tmp_zx = **ppz_x; zval_copy_ctor(&tmp_zx); tmp_pzx = &tmp_zx; convert_to_double(tmp_pzx); /* Get Y */ if (zend_hash_find(sub_array, "y", sizeof("y"), (void**)&ppz_y) == FAILURE) { efree(coordinates); *num_elements = 0; return NULL; } tmp_zy = **ppz_y; zval_copy_ctor(&tmp_zy); tmp_pzy = &tmp_zy; convert_to_double(tmp_pzy); /* Assign X and Y */ coordinates[i].x = Z_DVAL(tmp_zx); coordinates[i].y = Z_DVAL(tmp_zy); } #endif return coordinates; } void php_imagick_throw_exception (php_imagick_class_type_t type, const char *description TSRMLS_DC) { int code; zend_class_entry *ce = NULL; switch (type) { case IMAGICK_CLASS: default: ce = php_imagick_exception_class_entry; code = 1; break; case IMAGICKDRAW_CLASS: ce = php_imagickdraw_exception_class_entry; code = 2; break; case IMAGICKPIXELITERATOR_CLASS: ce = php_imagickpixeliterator_exception_class_entry; code = 3; break; case IMAGICKPIXEL_CLASS: ce = php_imagickpixel_exception_class_entry; code = 4; break; #ifdef IMAGICK_WITH_KERNEL case IMAGICKKERNEL_CLASS: ce = php_imagickkernel_exception_class_entry; code = 5; break; #endif } zend_throw_exception(ce, description, code TSRMLS_CC); } static void s_convert_exception (char *description, const char *default_message, long severity, int code TSRMLS_DC) { // No description provided or empty one if (!description || (strlen (description) == 0)) { if (description) { description = MagickRelinquishMemory (description); } zend_throw_exception(php_imagick_exception_class_entry, default_message, code TSRMLS_CC); return; } zend_throw_exception(php_imagick_exception_class_entry, description, severity TSRMLS_CC); MagickRelinquishMemory (description); } /** Convert ImageMagick MagickWand exception to PHP exception */ void php_imagick_convert_imagick_exception (MagickWand *magick_wand, const char *default_message TSRMLS_DC) { ExceptionType severity; char *description; description = MagickGetException(magick_wand, &severity); MagickClearException (magick_wand); s_convert_exception (description, default_message, severity, 1 TSRMLS_CC); } void php_imagick_convert_imagickdraw_exception (DrawingWand *drawing_wand, const char *default_message TSRMLS_DC) { ExceptionType severity; char *description; description = DrawGetException(drawing_wand, &severity); DrawClearException (drawing_wand); s_convert_exception (description, default_message, severity, 2 TSRMLS_CC); } void php_imagick_convert_imagickpixeliterator_exception (PixelIterator *pixel_iterator, const char *default_message TSRMLS_DC) { ExceptionType severity; char *description; description = PixelGetIteratorException(pixel_iterator, &severity); PixelClearIteratorException (pixel_iterator); s_convert_exception (description, default_message, severity, 3 TSRMLS_CC); } void php_imagick_convert_imagickpixel_exception (PixelWand *pixel_wand, const char *default_message TSRMLS_DC) { ExceptionType severity; char *description; description = PixelGetException(pixel_wand, &severity); PixelClearException (pixel_wand); s_convert_exception (description, default_message, severity, 4 TSRMLS_CC); } PixelWand *php_imagick_zval_to_pixelwand (zval *param, php_imagick_class_type_t caller, zend_bool *allocated TSRMLS_DC) { PixelWand *pixel_wand = NULL; *allocated = 0; #if PHP_VERSION_ID >= 70000 ZVAL_DEREF(param); #endif if (Z_TYPE_P (param) == IS_LONG || Z_TYPE_P (param) == IS_DOUBLE) { zval var; var = *param; zval_copy_ctor(&var); convert_to_string(&var); param = &var; } switch (Z_TYPE_P(param)) { case IS_STRING: { pixel_wand = NewPixelWand(); if (!pixel_wand) { zend_error(E_ERROR, "Failed to allocate PixelWand structure"); } *allocated = 1; if (PixelSetColor (pixel_wand, Z_STRVAL_P(param)) == MagickFalse) { pixel_wand = DestroyPixelWand(pixel_wand); php_imagick_throw_exception (caller, "Unrecognized color string" TSRMLS_CC); return NULL; } } break; case IS_OBJECT: if (instanceof_function(Z_OBJCE_P(param), php_imagickpixel_sc_entry TSRMLS_CC)) { php_imagickpixel_object *intern = Z_IMAGICKPIXEL_P(param); pixel_wand = intern->pixel_wand; } else php_imagick_throw_exception(caller, "The parameter must be an instance of ImagickPixel or a string" TSRMLS_CC); break; default: php_imagick_throw_exception(caller, "Invalid color parameter provided" TSRMLS_CC); } return pixel_wand; } PixelWand *php_imagick_zval_to_opacity (zval *param, php_imagick_class_type_t caller, zend_bool *allocated TSRMLS_DC) { PixelWand *pixel_wand = NULL; *allocated = 0; #if PHP_VERSION_ID >= 70000 ZVAL_DEREF(param); #endif if (Z_TYPE_P (param) == IS_STRING) { zval var; var = *param; zval_copy_ctor(&var); convert_to_double(&var); param = &var; } switch (Z_TYPE_P(param)) { case IS_LONG: case IS_DOUBLE: { pixel_wand = NewPixelWand(); if (!pixel_wand) { zend_error(E_ERROR, "Failed to allocate PixelWand structure"); } #if MagickLibVersion >= 0x700 //TOOD - this should be one minus? Or should we just make a BC break // and make users do it in user land? PixelSetAlpha(pixel_wand, Z_DVAL_P(param)); #else PixelSetOpacity(pixel_wand, Z_DVAL_P(param)); #endif *allocated = 1; } break; case IS_OBJECT: if (instanceof_function(Z_OBJCE_P(param), php_imagickpixel_sc_entry TSRMLS_CC)) { php_imagickpixel_object *intern = Z_IMAGICKPIXEL_P(param); pixel_wand = intern->pixel_wand; } else php_imagick_throw_exception(caller, "The parameter must be an instance of ImagickPixel or a string" TSRMLS_CC); break; default: php_imagick_throw_exception(caller, "Invalid color parameter provided" TSRMLS_CC); } return pixel_wand; } /** * Changes the locale to IMAGICK_LC_NUMERIC_LOCALE if imagick.locale_fix is on * and returns the locale set before calling this function. * If locale is not changed, NULL is returned * */ char *php_imagick_set_locale (TSRMLS_D) { char *current_locale; if (!IMAGICK_G(locale_fix)) return NULL; current_locale = setlocale(LC_NUMERIC, NULL); if (current_locale != NULL) { if (strcmp (current_locale, IMAGICK_LC_NUMERIC_LOCALE) != 0) { setlocale (LC_NUMERIC, IMAGICK_LC_NUMERIC_LOCALE); return estrdup (current_locale); } } return NULL; } void php_imagick_restore_locale (const char *old_locale) { if (!old_locale) return; if (strcmp (old_locale, IMAGICK_LC_NUMERIC_LOCALE) != 0) setlocale (LC_NUMERIC, old_locale); } PixelWand *php_imagick_clone_pixelwand (PixelWand *source) { #if MagickLibVersion >= 0x635 return ClonePixelWand(source); #else PixelWand *target = NewPixelWand (); if (!target) return NULL; PixelSetColorCount (target, PixelGetColorCount (source)); PixelSetRed (target, PixelGetRed (source)); PixelSetGreen (target, PixelGetGreen (source)); PixelSetBlue (target, PixelGetBlue (source)); PixelSetOpacity (target, PixelGetOpacity (source)); PixelSetAlpha (target, PixelGetAlpha (source)); return target; #endif } void php_imagick_replace_magickwand (php_imagick_object *obj, MagickWand *new_wand) { if (!obj->magick_wand) obj->magick_wand = new_wand; else { obj->magick_wand = DestroyMagickWand(obj->magick_wand); obj->magick_wand = new_wand; } } void php_imagick_replace_drawingwand (php_imagickdraw_object *obj, DrawingWand *new_wand) { if (!obj->drawing_wand) obj->drawing_wand = new_wand; else { obj->drawing_wand = DestroyDrawingWand(obj->drawing_wand); obj->drawing_wand = new_wand; } } void php_imagick_replace_pixelwand (php_imagickpixel_object *obj, PixelWand *new_wand) { if (obj->pixel_wand && obj->initialized_via_iterator != 1) { obj->pixel_wand = DestroyPixelWand(obj->pixel_wand); obj->pixel_wand = new_wand; } else obj->pixel_wand = new_wand; } zend_bool php_imagick_ensure_not_empty (MagickWand *magick_wand) { if (MagickGetNumberImages(magick_wand) == 0) { TSRMLS_FETCH (); php_imagick_throw_exception (IMAGICK_CLASS, "Can not process empty Imagick object" TSRMLS_CC); return 0; } return 1; } zend_bool php_imagickpixel_ensure_not_null(PixelWand *pixel_wand) { if (pixel_wand == NULL) { TSRMLS_FETCH (); php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Can not process empty ImagickPixel object" TSRMLS_CC); return 0; } return 1; } void php_imagick_initialize_constants(TSRMLS_D) { #define IMAGICK_REGISTER_CONST_LONG(const_name, value)\ zend_declare_class_constant_long(php_imagick_sc_entry, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); #define IMAGICK_REGISTER_CONST_STRING(const_name, value)\ zend_declare_class_constant_string(php_imagick_sc_entry, const_name, sizeof(const_name)-1, value TSRMLS_CC); /* Constants defined in php_imagick.h */ IMAGICK_REGISTER_CONST_LONG("COLOR_BLACK", PHP_IMAGICK_COLOR_BLACK); IMAGICK_REGISTER_CONST_LONG("COLOR_BLUE", PHP_IMAGICK_COLOR_BLUE); IMAGICK_REGISTER_CONST_LONG("COLOR_CYAN", PHP_IMAGICK_COLOR_CYAN); IMAGICK_REGISTER_CONST_LONG("COLOR_GREEN", PHP_IMAGICK_COLOR_GREEN); IMAGICK_REGISTER_CONST_LONG("COLOR_RED", PHP_IMAGICK_COLOR_RED); IMAGICK_REGISTER_CONST_LONG("COLOR_YELLOW", PHP_IMAGICK_COLOR_YELLOW); IMAGICK_REGISTER_CONST_LONG("COLOR_MAGENTA", PHP_IMAGICK_COLOR_MAGENTA); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("COLOR_OPACITY", PHP_IMAGICK_COLOR_OPACITY); #endif IMAGICK_REGISTER_CONST_LONG("COLOR_ALPHA", PHP_IMAGICK_COLOR_ALPHA); IMAGICK_REGISTER_CONST_LONG("COLOR_FUZZ", PHP_IMAGICK_COLOR_FUZZ); /* Returning the version as a constant string */ IMAGICK_REGISTER_CONST_LONG("IMAGICK_EXTNUM", PHP_IMAGICK_EXTNUM); IMAGICK_REGISTER_CONST_STRING("IMAGICK_EXTVER", PHP_IMAGICK_VERSION); #if defined(MagickQuantumRange) IMAGICK_REGISTER_CONST_LONG("QUANTUM_RANGE", atoi (MagickQuantumRange)); #endif /* Are we using PHP allocations */ #ifdef PHP_IMAGICK_ZEND_MM IMAGICK_REGISTER_CONST_LONG("USE_ZEND_MM", 1); #else IMAGICK_REGISTER_CONST_LONG("USE_ZEND_MM", 0); #endif /* ImageMagick defined constants */ IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DEFAULT", OverCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_UNDEFINED", UndefinedCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_NO", NoCompositeOp); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_ADD", AddCompositeOp); #endif IMAGICK_REGISTER_CONST_LONG("COMPOSITE_ATOP", AtopCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_BLEND", BlendCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_BUMPMAP", BumpmapCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_CLEAR", ClearCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COLORBURN", ColorBurnCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COLORDODGE", ColorDodgeCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COLORIZE", ColorizeCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYBLACK", CopyBlackCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYBLUE", CopyBlueCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPY", CopyCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYCYAN", CopyCyanCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYGREEN", CopyGreenCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYMAGENTA", CopyMagentaCompositeOp); #if MagickLibVersion >= 0x700 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYALPHA", CopyAlphaCompositeOp); //TOOD - is this semantically correct? IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYOPACITY", CopyAlphaCompositeOp); #else IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYOPACITY", CopyOpacityCompositeOp); #endif IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYRED", CopyRedCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_COPYYELLOW", CopyYellowCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DARKEN", DarkenCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DSTATOP", DstAtopCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DST", DstCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DSTIN", DstInCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DSTOUT", DstOutCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DSTOVER", DstOverCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DIFFERENCE", DifferenceCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DISPLACE", DisplaceCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DISSOLVE", DissolveCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_EXCLUSION", ExclusionCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_HARDLIGHT", HardLightCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_HUE", HueCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_IN", InCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_LIGHTEN", LightenCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_LUMINIZE", LuminizeCompositeOp); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MINUS", MinusCompositeOp); #endif IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MODULATE", ModulateCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MULTIPLY", MultiplyCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_OUT", OutCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_OVER", OverCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_OVERLAY", OverlayCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_PLUS", PlusCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_REPLACE", ReplaceCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SATURATE", SaturateCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SCREEN", ScreenCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SOFTLIGHT", SoftLightCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SRCATOP", SrcAtopCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SRC", SrcCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SRCIN", SrcInCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SRCOUT", SrcOutCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SRCOVER", SrcOverCompositeOp); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SUBTRACT", SubtractCompositeOp); #endif IMAGICK_REGISTER_CONST_LONG("COMPOSITE_THRESHOLD", ThresholdCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_XOR", XorCompositeOp); #if MagickLibVersion >= 0x634 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_CHANGEMASK", ChangeMaskCompositeOp); #endif #if MagickLibVersion >= 0x636 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_LINEARLIGHT", LinearLightCompositeOp); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DIVIDE", DivideCompositeOp); #endif #endif #if MagickLibVersion >= 0x654 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DISTORT", DistortCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_BLUR", BlurCompositeOp); #endif #if MagickLibVersion >= 0x655 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_PEGTOPLIGHT", PegtopLightCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_VIVIDLIGHT", VividLightCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_PINLIGHT", PinLightCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_LINEARDODGE", LinearDodgeCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_LINEARBURN", LinearBurnCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MATHEMATICS", MathematicsCompositeOp); #endif #if MagickLibVersion >= 0x662 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MODULUSADD", ModulusAddCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MODULUSSUBTRACT", ModulusSubtractCompositeOp); #endif #if MagickLibVersion >= 0x670 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MINUSDST", MinusDstCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DIVIDEDST", DivideDstCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DIVIDESRC", DivideSrcCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_MINUSSRC", MinusSrcCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_DARKENINTENSITY", DarkenIntensityCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_LIGHTENINTENSITY", LightenIntensityCompositeOp); #endif #if MagickLibVersion >= 0x690 IMAGICK_REGISTER_CONST_LONG("COMPOSITE_HARDMIX", HardMixCompositeOp); #endif #if (MagickLibVersion >= 0x700 && MagickLibVersion >= 0x708) || (MagickLibVersion < 0x700 && MagickLibVersion >= 0x69A) IMAGICK_REGISTER_CONST_LONG("COMPOSITE_STEREO", StereoCompositeOp); #endif #if MagickLibVersion >= 0x70A IMAGICK_REGISTER_CONST_LONG("COMPOSITE_FREEZE", FreezeCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_INTERPOLATE", InterpolateCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_NEGATE", NegateCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_REFLECT", ReflectCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SOFTBURN", SoftBurnCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_SOFTDODGE", SoftDodgeCompositeOp); IMAGICK_REGISTER_CONST_LONG("COMPOSITE_STAMP", StampCompositeOp); #endif #if MagickLibVersion >= 0x70B IMAGICK_REGISTER_CONST_LONG("COMPOSITE_RMSE", RMSECompositeOp); #endif IMAGICK_REGISTER_CONST_LONG("MONTAGEMODE_FRAME", FrameMode); IMAGICK_REGISTER_CONST_LONG("MONTAGEMODE_UNFRAME", UnframeMode); IMAGICK_REGISTER_CONST_LONG("MONTAGEMODE_CONCATENATE", ConcatenateMode); IMAGICK_REGISTER_CONST_LONG("STYLE_NORMAL", NormalStyle); IMAGICK_REGISTER_CONST_LONG("STYLE_ITALIC", ItalicStyle); IMAGICK_REGISTER_CONST_LONG("STYLE_OBLIQUE", ObliqueStyle); IMAGICK_REGISTER_CONST_LONG("STYLE_ANY", AnyStyle); #if (MagickLibVersion >= 0x700 && MagickLibVersion >= 0x709) || (MagickLibVersion < 0x700 && MagickLibVersion >= 0x69B) IMAGICK_REGISTER_CONST_LONG("STYLE_BOLD", BoldStyle); #endif IMAGICK_REGISTER_CONST_LONG("FILTER_UNDEFINED", UndefinedFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_POINT", PointFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_BOX", BoxFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_TRIANGLE", TriangleFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_HERMITE", HermiteFilter); #if MagickLibVersion >= 0x701 IMAGICK_REGISTER_CONST_LONG("FILTER_HANNING", HannFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_HANN", HannFilter); #else IMAGICK_REGISTER_CONST_LONG("FILTER_HANNING", HanningFilter); #endif IMAGICK_REGISTER_CONST_LONG("FILTER_HAMMING", HammingFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_BLACKMAN", BlackmanFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_GAUSSIAN", GaussianFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_QUADRATIC", QuadraticFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_CUBIC", CubicFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_CATROM", CatromFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_MITCHELL", MitchellFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_LANCZOS", LanczosFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_BESSEL", BesselFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_SINC", SincFilter); #if MagickLibVersion >= 0x637 IMAGICK_REGISTER_CONST_LONG("FILTER_KAISER", KaiserFilter); #if MagickLibVersion >= 0x701 IMAGICK_REGISTER_CONST_LONG("FILTER_WELSH", WelshFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_WELCH", WelchFilter); #else IMAGICK_REGISTER_CONST_LONG("FILTER_WELSH", WelshFilter); #endif IMAGICK_REGISTER_CONST_LONG("FILTER_PARZEN", ParzenFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_LAGRANGE", LagrangeFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_SENTINEL", SentinelFilter); #endif #if MagickLibVersion >= 0x638 IMAGICK_REGISTER_CONST_LONG("FILTER_BOHMAN", BohmanFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_BARTLETT", BartlettFilter); #endif #if MagickLibVersion >= 0x666 IMAGICK_REGISTER_CONST_LONG("FILTER_JINC", JincFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_SINCFAST", SincFastFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_ROBIDOUX", RobidouxFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_LANCZOSSHARP", LanczosSharpFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_LANCZOS2", Lanczos2Filter); IMAGICK_REGISTER_CONST_LONG("FILTER_LANCZOS2SHARP", Lanczos2SharpFilter); #endif #if MagickLibVersion >= 0x677 IMAGICK_REGISTER_CONST_LONG("FILTER_ROBIDOUXSHARP", RobidouxSharpFilter); IMAGICK_REGISTER_CONST_LONG("FILTER_COSINE", CosineFilter); #endif #if MagickLibVersion >= 0x678 IMAGICK_REGISTER_CONST_LONG("FILTER_SPLINE", SplineFilter); #endif #if MagickLibVersion >= 0x681 IMAGICK_REGISTER_CONST_LONG("FILTER_LANCZOSRADIUS", LanczosRadiusFilter); #endif #if MagickLibVersion >= 0x707 IMAGICK_REGISTER_CONST_LONG("FILTER_CUBIC_SPLINE", CubicSplineFilter); #endif IMAGICK_REGISTER_CONST_LONG("IMGTYPE_UNDEFINED", UndefinedType); IMAGICK_REGISTER_CONST_LONG("IMGTYPE_BILEVEL", BilevelType); IMAGICK_REGISTER_CONST_LONG("IMGTYPE_GRAYSCALE", GrayscaleType); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("IMGTYPE_GRAYSCALEMATTE", GrayscaleMatteType); #else IMAGICK_REGISTER_CONST_LONG("IMGTYPE_GRAYSCALEALPHA", GrayscaleAlphaType); //@TODO - this is only here for legacy support IMAGICK_REGISTER_CONST_LONG("IMGTYPE_GRAYSCALEMATTE", GrayscaleAlphaType); #endif IMAGICK_REGISTER_CONST_LONG("IMGTYPE_PALETTE", PaletteType); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("IMGTYPE_PALETTEMATTE", PaletteMatteType); #else IMAGICK_REGISTER_CONST_LONG("IMGTYPE_PALETTEMATTE", PaletteAlphaType); //@TODO - this is only here for legacy support IMAGICK_REGISTER_CONST_LONG("IMGTYPE_PALETTEALPHA", PaletteAlphaType); #endif IMAGICK_REGISTER_CONST_LONG("IMGTYPE_TRUECOLOR", TrueColorType); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("IMGTYPE_TRUECOLORMATTE", TrueColorMatteType); #else IMAGICK_REGISTER_CONST_LONG("IMGTYPE_TRUECOLORALPHA", TrueColorAlphaType); //@TODO - this is only here for legacy support IMAGICK_REGISTER_CONST_LONG("IMGTYPE_TRUECOLORMATTE", TrueColorAlphaType); #endif IMAGICK_REGISTER_CONST_LONG("IMGTYPE_COLORSEPARATION", ColorSeparationType); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("IMGTYPE_COLORSEPARATIONMATTE", ColorSeparationMatteType); #else IMAGICK_REGISTER_CONST_LONG("IMGTYPE_COLORSEPARATIONALPHA", ColorSeparationAlphaType); //@TODO - this is only here for legacy support IMAGICK_REGISTER_CONST_LONG("IMGTYPE_COLORSEPARATIONMATTE", ColorSeparationAlphaType); #endif IMAGICK_REGISTER_CONST_LONG("IMGTYPE_OPTIMIZE", OptimizeType); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("IMGTYPE_PALETTEBILEVELMATTE", PaletteBilevelMatteType); #else IMAGICK_REGISTER_CONST_LONG("IMGTYPE_PALETTEBILEVELALPHA", PaletteBilevelAlphaType); //@TODO - this is only here for legacy support IMAGICK_REGISTER_CONST_LONG("IMGTYPE_PALETTEBILEVELMATTE", PaletteBilevelAlphaType); #endif IMAGICK_REGISTER_CONST_LONG("RESOLUTION_UNDEFINED", UndefinedResolution); IMAGICK_REGISTER_CONST_LONG("RESOLUTION_PIXELSPERINCH", PixelsPerInchResolution); IMAGICK_REGISTER_CONST_LONG("RESOLUTION_PIXELSPERCENTIMETER", PixelsPerCentimeterResolution); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_UNDEFINED", UndefinedCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_NO", NoCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_BZIP", BZipCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_FAX", FaxCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_GROUP4", Group4Compression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_JPEG", JPEGCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_JPEG2000", JPEG2000Compression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_LOSSLESSJPEG", LosslessJPEGCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_LZW", LZWCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_RLE", RLECompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_ZIP", ZipCompression); #if MagickLibVersion > 0x639 IMAGICK_REGISTER_CONST_LONG("COMPRESSION_DXT1", DXT1Compression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_DXT3", DXT3Compression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_DXT5", DXT5Compression); #endif #if MagickLibVersion >= 0x656 IMAGICK_REGISTER_CONST_LONG("COMPRESSION_ZIPS", ZipSCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_PIZ", PizCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_PXR24", Pxr24Compression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_B44", B44Compression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_B44A", B44ACompression); #endif #if MagickLibVersion >= 0x667 IMAGICK_REGISTER_CONST_LONG("COMPRESSION_LZMA", LZMACompression); #endif #if MagickLibVersion >= 0x670 IMAGICK_REGISTER_CONST_LONG("COMPRESSION_JBIG1", JBIG1Compression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_JBIG2", JBIG2Compression); #endif #if MagickLibVersion >= 0x709 IMAGICK_REGISTER_CONST_LONG("COMPRESSION_ZSTD", ZstdCompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_WEBP", WebPCompression); #endif #if MagickLibVersion >= 0x70C IMAGICK_REGISTER_CONST_LONG("COMPRESSION_DWAA", DWAACompression); IMAGICK_REGISTER_CONST_LONG("COMPRESSION_DWAB", DWABCompression); #endif #if MagickLibVersion >= 0x711 // Technically >= 7.1.0-13 but we still don't have a mechanism for // detecting patch versions. IMAGICK_REGISTER_CONST_LONG("COMPRESSION_BC7", BC7Compression); #endif IMAGICK_REGISTER_CONST_LONG("PAINT_POINT", PointMethod); IMAGICK_REGISTER_CONST_LONG("PAINT_REPLACE", ReplaceMethod); IMAGICK_REGISTER_CONST_LONG("PAINT_FLOODFILL", FloodfillMethod); IMAGICK_REGISTER_CONST_LONG("PAINT_FILLTOBORDER", FillToBorderMethod); IMAGICK_REGISTER_CONST_LONG("PAINT_RESET", ResetMethod); IMAGICK_REGISTER_CONST_LONG("GRAVITY_NORTHWEST", NorthWestGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_NORTH", NorthGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_NORTHEAST", NorthEastGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_WEST", WestGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_CENTER", CenterGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_EAST", EastGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_SOUTHWEST", SouthWestGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_SOUTH", SouthGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_SOUTHEAST", SouthEastGravity); IMAGICK_REGISTER_CONST_LONG("GRAVITY_FORGET", ForgetGravity); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("GRAVITY_STATIC", StaticGravity); #endif IMAGICK_REGISTER_CONST_LONG("STRETCH_NORMAL", NormalStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_ULTRACONDENSED", UltraCondensedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_EXTRACONDENSED", ExtraCondensedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_CONDENSED", CondensedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_SEMICONDENSED", SemiCondensedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_SEMIEXPANDED", SemiExpandedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_EXPANDED", ExpandedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_EXTRAEXPANDED", ExtraExpandedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_ULTRAEXPANDED", UltraExpandedStretch); IMAGICK_REGISTER_CONST_LONG("STRETCH_ANY", AnyStretch); IMAGICK_REGISTER_CONST_LONG("ALIGN_UNDEFINED", UndefinedAlign); IMAGICK_REGISTER_CONST_LONG("ALIGN_LEFT", LeftAlign); IMAGICK_REGISTER_CONST_LONG("ALIGN_CENTER", CenterAlign); IMAGICK_REGISTER_CONST_LONG("ALIGN_RIGHT", RightAlign); IMAGICK_REGISTER_CONST_LONG("DECORATION_NO", NoDecoration); IMAGICK_REGISTER_CONST_LONG("DECORATION_UNDERLINE", UnderlineDecoration); IMAGICK_REGISTER_CONST_LONG("DECORATION_OVERLINE", OverlineDecoration); IMAGICK_REGISTER_CONST_LONG("DECORATION_LINETROUGH", LineThroughDecoration); //TODO remove? IMAGICK_REGISTER_CONST_LONG("DECORATION_LINETHROUGH", LineThroughDecoration); IMAGICK_REGISTER_CONST_LONG("NOISE_UNIFORM", UniformNoise); IMAGICK_REGISTER_CONST_LONG("NOISE_GAUSSIAN", GaussianNoise); IMAGICK_REGISTER_CONST_LONG("NOISE_MULTIPLICATIVEGAUSSIAN", MultiplicativeGaussianNoise); IMAGICK_REGISTER_CONST_LONG("NOISE_IMPULSE", ImpulseNoise); IMAGICK_REGISTER_CONST_LONG("NOISE_LAPLACIAN", LaplacianNoise); IMAGICK_REGISTER_CONST_LONG("NOISE_POISSON", PoissonNoise); #if MagickLibVersion > 0x635 IMAGICK_REGISTER_CONST_LONG("NOISE_RANDOM", RandomNoise); #endif IMAGICK_REGISTER_CONST_LONG("CHANNEL_UNDEFINED", UndefinedChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_RED", RedChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_GRAY", GrayChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_CYAN", CyanChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_GREEN", GreenChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_MAGENTA", MagentaChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_BLUE", BlueChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_YELLOW", YellowChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_ALPHA", AlphaChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_OPACITY", OpacityChannel); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("CHANNEL_MATTE", MatteChannel); /* deprecated, needs to throw E_STRICT if used */ #endif IMAGICK_REGISTER_CONST_LONG("CHANNEL_BLACK", BlackChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_INDEX", IndexChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_ALL", AllChannels); IMAGICK_REGISTER_CONST_LONG("CHANNEL_DEFAULT", DefaultChannels); IMAGICK_REGISTER_CONST_LONG("CHANNEL_RGBA", RedChannel | GreenChannel | BlueChannel | AlphaChannel); #if MagickLibVersion >= 0x644 IMAGICK_REGISTER_CONST_LONG("CHANNEL_TRUEALPHA", TrueAlphaChannel); IMAGICK_REGISTER_CONST_LONG("CHANNEL_RGBS", RGBChannels); #endif #if MagickLibVersion >= 0x655 IMAGICK_REGISTER_CONST_LONG("CHANNEL_GRAY_CHANNELS", GrayChannels); #endif #if MagickLibVersion >= 0x656 IMAGICK_REGISTER_CONST_LONG("CHANNEL_SYNC", SyncChannels); #endif #if MagickLibVersion >= 0x700 IMAGICK_REGISTER_CONST_LONG("CHANNEL_READ_MASK", ReadMaskChannel); /* Pixel is Not Readable? */ IMAGICK_REGISTER_CONST_LONG("CHANNEL_WRITE_MASK", WriteMaskChannel); /* Pixel is Write Protected? */ IMAGICK_REGISTER_CONST_LONG("CHANNEL_META", MetaChannel); /* ???? */ #endif #if MagickLibVersion >= 0x708 IMAGICK_REGISTER_CONST_LONG("CHANNEL_COMPOSITE_MASK", CompositeMaskChannel); /* SVG mask */ #endif #if MagickLibVersion >= 0x670 IMAGICK_REGISTER_CONST_LONG("CHANNEL_COMPOSITES", CompositeChannels); #endif #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("METRIC_UNDEFINED", UndefinedMetric); #endif IMAGICK_REGISTER_CONST_LONG("METRIC_ABSOLUTEERRORMETRIC", AbsoluteErrorMetric); IMAGICK_REGISTER_CONST_LONG("METRIC_MEANABSOLUTEERROR", MeanAbsoluteErrorMetric); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("METRIC_MEANERRORPERPIXELMETRIC", MeanErrorPerPixelMetric); #else IMAGICK_REGISTER_CONST_LONG("METRIC_MEANERRORPERPIXELMETRIC", MeanErrorPerPixelErrorMetric); #endif IMAGICK_REGISTER_CONST_LONG("METRIC_MEANSQUAREERROR", MeanSquaredErrorMetric); IMAGICK_REGISTER_CONST_LONG("METRIC_PEAKABSOLUTEERROR", PeakAbsoluteErrorMetric); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("METRIC_PEAKSIGNALTONOISERATIO", PeakSignalToNoiseRatioMetric); #else IMAGICK_REGISTER_CONST_LONG("METRIC_PEAKSIGNALTONOISERATIO", PeakSignalToNoiseRatioErrorMetric); #endif IMAGICK_REGISTER_CONST_LONG("METRIC_ROOTMEANSQUAREDERROR", RootMeanSquaredErrorMetric); #if MagickLibVersion >= 0x687 IMAGICK_REGISTER_CONST_LONG("METRIC_NORMALIZEDCROSSCORRELATIONERRORMETRIC", NormalizedCrossCorrelationErrorMetric); IMAGICK_REGISTER_CONST_LONG("METRIC_FUZZERROR", FuzzErrorMetric); #endif #if MagickLibVersion >= 0x690 IMAGICK_REGISTER_CONST_LONG("METRIC_PERCEPTUALHASH_ERROR", PerceptualHashErrorMetric); #endif #if MagickLibVersion >= 0x707 IMAGICK_REGISTER_CONST_LONG("METRIC_STRUCTURAL_SIMILARITY_ERROR", StructuralSimilarityErrorMetric); IMAGICK_REGISTER_CONST_LONG("METRIC_STRUCTURAL_DISSIMILARITY_ERROR", StructuralDissimilarityErrorMetric); #endif IMAGICK_REGISTER_CONST_LONG("PIXEL_CHAR", CharPixel); IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_CHAR", CharPixel); IMAGICK_REGISTER_CONST_LONG("PIXEL_DOUBLE", DoublePixel); IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_DOUBLE", DoublePixel); IMAGICK_REGISTER_CONST_LONG("PIXEL_FLOAT", FloatPixel); IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_FLOAT", FloatPixel); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("PIXEL_INTEGER", IntegerPixel); IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_INTEGER", IntegerPixel); #endif IMAGICK_REGISTER_CONST_LONG("PIXEL_LONG", LongPixel); IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_LONG", LongPixel); IMAGICK_REGISTER_CONST_LONG("PIXEL_QUANTUM", QuantumPixel); IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_QUANTUM", QuantumPixel); IMAGICK_REGISTER_CONST_LONG("PIXEL_SHORT", ShortPixel); IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_SHORT", ShortPixel); //For now we deliberately DO NOT support the longlong pixel type. //64 bit integers and PHP do not play nicely. //IMAGICK_REGISTER_CONST_LONG("PIXEL_LONGLONG", ..); //IMAGICK_REGISTER_CONST_LONG("PIXELSTORAGE_LONGLONG", ..); IMAGICK_REGISTER_CONST_LONG("EVALUATE_UNDEFINED", UndefinedEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_ADD", AddEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_AND", AndEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_DIVIDE", DivideEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_LEFTSHIFT", LeftShiftEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_MAX", MaxEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_MIN", MinEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_MULTIPLY", MultiplyEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_OR", OrEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_RIGHTSHIFT", RightShiftEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_SET", SetEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_SUBTRACT", SubtractEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_XOR", XorEvaluateOperator); #if MagickLibVersion > 0x643 IMAGICK_REGISTER_CONST_LONG("EVALUATE_POW", PowEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_LOG", LogEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_THRESHOLD", ThresholdEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_THRESHOLDBLACK", ThresholdBlackEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_THRESHOLDWHITE", ThresholdWhiteEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_GAUSSIANNOISE", GaussianNoiseEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_IMPULSENOISE", ImpulseNoiseEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_LAPLACIANNOISE", LaplacianNoiseEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_MULTIPLICATIVENOISE", MultiplicativeNoiseEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_POISSONNOISE", PoissonNoiseEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_UNIFORMNOISE", UniformNoiseEvaluateOperator); #endif #if MagickLibVersion > 0x648 IMAGICK_REGISTER_CONST_LONG("EVALUATE_COSINE", CosineEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_SINE", SineEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_ADDMODULUS", AddModulusEvaluateOperator); #endif #if MagickLibVersion >= 0x661 IMAGICK_REGISTER_CONST_LONG("EVALUATE_MEAN", MeanEvaluateOperator); #endif #if MagickLibVersion >= 0x664 IMAGICK_REGISTER_CONST_LONG("EVALUATE_ABS", AbsEvaluateOperator); #endif #if MagickLibVersion >= 0x666 IMAGICK_REGISTER_CONST_LONG("EVALUATE_EXPONENTIAL", ExponentialEvaluateOperator); IMAGICK_REGISTER_CONST_LONG("EVALUATE_MEDIAN", MedianEvaluateOperator); #endif #if MagickLibVersion >= 0x676 IMAGICK_REGISTER_CONST_LONG("EVALUATE_SUM", SumEvaluateOperator); #endif #if MagickLibVersion >= 0x690 IMAGICK_REGISTER_CONST_LONG("EVALUATE_ROOT_MEAN_SQUARE", RootMeanSquareEvaluateOperator); #endif #if MagickLibVersion >= 0x70B IMAGICK_REGISTER_CONST_LONG("EVALUATE_INVERSE_LOG", InverseLogEvaluateOperator); #endif IMAGICK_REGISTER_CONST_LONG("COLORSPACE_UNDEFINED", UndefinedColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_RGB", RGBColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_GRAY", GRAYColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_TRANSPARENT", TransparentColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_OHTA", OHTAColorspace); #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LAB", LABColorspace); #endif #endif IMAGICK_REGISTER_CONST_LONG("COLORSPACE_XYZ", XYZColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_YCBCR", YCbCrColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_YCC", YCCColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_YIQ", YIQColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_YPBPR", YPbPrColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_YUV", YUVColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_CMYK", CMYKColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_SRGB", sRGBColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_HSB", HSBColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_HSL", HSLColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_HWB", HWBColorspace); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("COLORSPACE_REC601LUMA", Rec601LumaColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_REC709LUMA", Rec709LumaColorspace); #endif IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LOG", LogColorspace); #if MagickLibVersion >= 0x642 IMAGICK_REGISTER_CONST_LONG("COLORSPACE_CMY", CMYColorspace); #endif #if MagickLibVersion >= 0X679 IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LUV", LuvColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_HCL", HCLColorspace); #endif #if MagickLibVersion >= 0x680 IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LCH", LCHColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LMS", LMSColorspace); #endif #if MagickLibVersion >= 0x686 IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LCHAB", LCHabColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LCHUV", LCHuvColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_SCRGB", scRGBColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_HSI", HSIColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_HSV", HSVColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_HCLP", HCLpColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_YDBDR", YDbDrColorspace); #endif IMAGICK_REGISTER_CONST_LONG("COLORSPACE_REC601YCBCR", Rec601YCbCrColorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_REC709YCBCR", Rec709YCbCrColorspace); #if MagickLibVersion >= 0x690 IMAGICK_REGISTER_CONST_LONG("COLORSPACE_XYY", xyYColorspace); #endif #if (MagickLibVersion >= 0x700 && MagickLibVersion >= 0x708) || (MagickLibVersion < 0x700 && MagickLibVersion >= 0x699) IMAGICK_REGISTER_CONST_LONG("COLORSPACE_LINEARGRAY", LinearGRAYColorspace); #endif #if MagickLibVersion >= 0x70B IMAGICK_REGISTER_CONST_LONG("COLORSPACE_DISPLAYP3", DisplayP3Colorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_ADOBE98", Adobe98Colorspace); IMAGICK_REGISTER_CONST_LONG("COLORSPACE_PROPHOTO", ProPhotoColorspace); #endif #if MagickLibVersion >= 0x70A IMAGICK_REGISTER_CONST_LONG("COLORSPACE_JZAZBZ", JzazbzColorspace); #endif IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_UNDEFINED", UndefinedVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_BACKGROUND", BackgroundVirtualPixelMethod); #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_CONSTANT", ConstantVirtualPixelMethod); /* deprecated */ #endif IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_EDGE", EdgeVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_MIRROR", MirrorVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_TILE", TileVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_TRANSPARENT", TransparentVirtualPixelMethod); #if MagickLibVersion > 0x641 IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_MASK", MaskVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_BLACK", BlackVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_GRAY", GrayVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_WHITE", WhiteVirtualPixelMethod); #endif #if MagickLibVersion > 0x642 IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_HORIZONTALTILE", HorizontalTileVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_VERTICALTILE", VerticalTileVirtualPixelMethod); #endif #if MagickLibVersion >= 0x651 IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_HORIZONTALTILEEDGE", HorizontalTileEdgeVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_VERTICALTILEEDGE", VerticalTileEdgeVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_CHECKERTILE", CheckerTileVirtualPixelMethod); #endif // These were missed, but have been present for 12 years, so assuming // they are going to be available in all version of ImageMagick people // are using. IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_DITHER", DitherVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("VIRTUALPIXELMETHOD_RANDOM", RandomVirtualPixelMethod); IMAGICK_REGISTER_CONST_LONG("PREVIEW_UNDEFINED", UndefinedPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_ROTATE", RotatePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SHEAR", ShearPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_ROLL", RollPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_HUE", HuePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SATURATION", SaturationPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_BRIGHTNESS", BrightnessPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_GAMMA", GammaPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SPIFF", SpiffPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_DULL", DullPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_GRAYSCALE", GrayscalePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_QUANTIZE", QuantizePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_DESPECKLE", DespecklePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_REDUCENOISE", ReduceNoisePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_ADDNOISE", AddNoisePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SHARPEN", SharpenPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_BLUR", BlurPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_THRESHOLD", ThresholdPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_EDGEDETECT", EdgeDetectPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SPREAD", SpreadPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SOLARIZE", SolarizePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SHADE", ShadePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_RAISE", RaisePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SEGMENT", SegmentPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_SWIRL", SwirlPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_IMPLODE", ImplodePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_WAVE", WavePreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_OILPAINT", OilPaintPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_CHARCOALDRAWING", CharcoalDrawingPreview); IMAGICK_REGISTER_CONST_LONG("PREVIEW_JPEG", JPEGPreview); IMAGICK_REGISTER_CONST_LONG("RENDERINGINTENT_UNDEFINED", UndefinedIntent); IMAGICK_REGISTER_CONST_LONG("RENDERINGINTENT_SATURATION", SaturationIntent); IMAGICK_REGISTER_CONST_LONG("RENDERINGINTENT_PERCEPTUAL", PerceptualIntent); IMAGICK_REGISTER_CONST_LONG("RENDERINGINTENT_ABSOLUTE", AbsoluteIntent); IMAGICK_REGISTER_CONST_LONG("RENDERINGINTENT_RELATIVE", RelativeIntent); IMAGICK_REGISTER_CONST_LONG("INTERLACE_UNDEFINED", UndefinedInterlace); IMAGICK_REGISTER_CONST_LONG("INTERLACE_NO", NoInterlace); IMAGICK_REGISTER_CONST_LONG("INTERLACE_LINE", LineInterlace); IMAGICK_REGISTER_CONST_LONG("INTERLACE_PLANE", PlaneInterlace); IMAGICK_REGISTER_CONST_LONG("INTERLACE_PARTITION", PartitionInterlace); #if MagickLibVersion > 0x633 IMAGICK_REGISTER_CONST_LONG("INTERLACE_GIF", GIFInterlace); IMAGICK_REGISTER_CONST_LONG("INTERLACE_JPEG", JPEGInterlace); IMAGICK_REGISTER_CONST_LONG("INTERLACE_PNG", PNGInterlace); #endif IMAGICK_REGISTER_CONST_LONG("FILLRULE_UNDEFINED", UndefinedRule); IMAGICK_REGISTER_CONST_LONG("FILLRULE_EVENODD", EvenOddRule); IMAGICK_REGISTER_CONST_LONG("FILLRULE_NONZERO", NonZeroRule); IMAGICK_REGISTER_CONST_LONG("PATHUNITS_UNDEFINED", UndefinedPathUnits); IMAGICK_REGISTER_CONST_LONG("PATHUNITS_USERSPACE", UserSpace); IMAGICK_REGISTER_CONST_LONG("PATHUNITS_USERSPACEONUSE", UserSpaceOnUse); IMAGICK_REGISTER_CONST_LONG("PATHUNITS_OBJECTBOUNDINGBOX", ObjectBoundingBox); IMAGICK_REGISTER_CONST_LONG("LINECAP_UNDEFINED", UndefinedCap); IMAGICK_REGISTER_CONST_LONG("LINECAP_BUTT", ButtCap); IMAGICK_REGISTER_CONST_LONG("LINECAP_ROUND", RoundCap); IMAGICK_REGISTER_CONST_LONG("LINECAP_SQUARE", SquareCap); IMAGICK_REGISTER_CONST_LONG("LINEJOIN_UNDEFINED", UndefinedJoin); IMAGICK_REGISTER_CONST_LONG("LINEJOIN_MITER", MiterJoin); IMAGICK_REGISTER_CONST_LONG("LINEJOIN_ROUND", RoundJoin); IMAGICK_REGISTER_CONST_LONG("LINEJOIN_BEVEL", BevelJoin); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_UNDEFINED", UndefinedResource); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_AREA", AreaResource); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_DISK", DiskResource); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_FILE", FileResource); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_MAP", MapResource); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_MEMORY", MemoryResource); #if MagickLibVersion >= 0x675 IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_TIME", TimeResource); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_THROTTLE", ThrottleResource); #endif #if MagickLibVersion > 0x678 IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_THREAD", ThreadResource); #endif #if MagickLibVersion > 0x691 IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_WIDTH", WidthResource); IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_HEIGHT", HeightResource); #endif #if (MagickLibVersion >= 0x700 && MagickLibVersion >= 0x708) || (MagickLibVersion < 0x700 && MagickLibVersion >= 0x69A) IMAGICK_REGISTER_CONST_LONG("RESOURCETYPE_LISTLENGTH", ListLengthResource); #endif IMAGICK_REGISTER_CONST_LONG("DISPOSE_UNRECOGNIZED", UnrecognizedDispose); IMAGICK_REGISTER_CONST_LONG("DISPOSE_UNDEFINED", UndefinedDispose); IMAGICK_REGISTER_CONST_LONG("DISPOSE_NONE", NoneDispose); IMAGICK_REGISTER_CONST_LONG("DISPOSE_BACKGROUND", BackgroundDispose); IMAGICK_REGISTER_CONST_LONG("DISPOSE_PREVIOUS", PreviousDispose); #if MagickLibVersion > 0x631 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_UNDEFINED", UndefinedInterpolatePixel); IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_AVERAGE", AverageInterpolatePixel); /* Average 4 nearest neighbours */ #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_BICUBIC", BicubicInterpolatePixel); /* Catmull-Rom interpolation */ #endif IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_BILINEAR", BilinearInterpolatePixel); /* Triangular filter interpolation */ #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_FILTER", FilterInterpolatePixel); /* Use resize filter - (very slow) */ #endif IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_INTEGER", IntegerInterpolatePixel); /* Integer (floor) interpolation */ IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_MESH", MeshInterpolatePixel); /* Triangular mesh interpolation */ #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_NEARESTNEIGHBOR", NearestNeighborInterpolatePixel); #endif #endif #if MagickLibVersion > 0x634 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_SPLINE", SplineInterpolatePixel); /* Cubic Spline (blurred) interpolation */ #endif #if MagickLibVersion > 0x690 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_AVERAGE_9", Average9InterpolatePixel); /* Average 9 nearest neighbours */ IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_AVERAGE_16", Average16InterpolatePixel); /* Average 16 nearest neighbours */ IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_BLEND", BlendInterpolatePixel); /* blend of nearest 1, 2 or 4 pixels */ IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_BACKGROUND_COLOR", BackgroundInterpolatePixel); /* just return background color */ #if MagickLibVersion >= 0x687 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_CATROM", CatromInterpolatePixel); /* Catmull-Rom interpolation */ #endif #endif #if MagickLibVersion >= 0x701 IMAGICK_REGISTER_CONST_LONG("INTERPOLATE_NEAREST_PIXEL", NearestInterpolatePixel); /* NearestInterpolatePixel */ #endif #if MagickLibVersion > 0x628 IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_UNDEFINED", UndefinedLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_COALESCE", CoalesceLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_COMPAREANY", CompareAnyLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_COMPARECLEAR", CompareClearLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_COMPAREOVERLAY", CompareOverlayLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_DISPOSE", DisposeLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_OPTIMIZE", OptimizeLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_OPTIMIZEPLUS", OptimizePlusLayer); #endif #if MagickLibVersion > 0x632 IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_OPTIMIZETRANS", OptimizeTransLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_COMPOSITE", CompositeLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_OPTIMIZEIMAGE", OptimizeImageLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_REMOVEDUPS", RemoveDupsLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_REMOVEZERO", RemoveZeroLayer); #endif #if MagickLibVersion >= 0x644 IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_TRIMBOUNDS", TrimBoundsLayer); #endif #if MagickLibVersion > 0x629 IMAGICK_REGISTER_CONST_LONG("ORIENTATION_UNDEFINED", UndefinedOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_TOPLEFT", TopLeftOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_TOPRIGHT", TopRightOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_BOTTOMRIGHT", BottomRightOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_BOTTOMLEFT", BottomLeftOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_LEFTTOP", LeftTopOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_RIGHTTOP", RightTopOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_RIGHTBOTTOM", RightBottomOrientation); IMAGICK_REGISTER_CONST_LONG("ORIENTATION_LEFTBOTTOM", LeftBottomOrientation); #endif #if MagickLibVersion > 0x635 IMAGICK_REGISTER_CONST_LONG("DISTORTION_UNDEFINED", UndefinedDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_AFFINE", AffineDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_AFFINEPROJECTION", AffineProjectionDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_ARC", ArcDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_BILINEAR", BilinearDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_PERSPECTIVE", PerspectiveDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_PERSPECTIVEPROJECTION", PerspectiveProjectionDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_SCALEROTATETRANSLATE", ScaleRotateTranslateDistortion); #endif #if MagickLibVersion > 0x645 IMAGICK_REGISTER_CONST_LONG("DISTORTION_POLYNOMIAL", PolynomialDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_POLAR", PolarDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_DEPOLAR", DePolarDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_BARREL", BarrelDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_SHEPARDS", ShepardsDistortion); // SentinelDistortion is not a real distortion type. It is a guard value // that shouldn't have been exposed in Imagick. TODO remove at next // minor version. IMAGICK_REGISTER_CONST_LONG("DISTORTION_SENTINEL", SentinelDistortion); #endif #if MagickLibVersion >= 0x70B IMAGICK_REGISTER_CONST_LONG("DISTORTION_RIGID_AFFINE", RigidAffineDistortion); #endif #if MagickLibVersion >= 0x644 IMAGICK_REGISTER_CONST_LONG("DISTORTION_BARRELINVERSE", BarrelInverseDistortion); #endif #if MagickLibVersion >= 0x654 IMAGICK_REGISTER_CONST_LONG("DISTORTION_BILINEARFORWARD", BilinearForwardDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_BILINEARREVERSE", BilinearReverseDistortion); #endif #if MagickLibVersion >= 0x670 IMAGICK_REGISTER_CONST_LONG("DISTORTION_RESIZE", ResizeDistortion); #endif #if MagickLibVersion >= 0x671 IMAGICK_REGISTER_CONST_LONG("DISTORTION_CYLINDER2PLANE", Cylinder2PlaneDistortion); IMAGICK_REGISTER_CONST_LONG("DISTORTION_PLANE2CYLINDER", Plane2CylinderDistortion); #endif #if MagickLibVersion > 0x636 IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_MERGE", MergeLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_FLATTEN", FlattenLayer); IMAGICK_REGISTER_CONST_LONG("LAYERMETHOD_MOSAIC", MosaicLayer); #endif #if MagickLibVersion > 0x637 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_ACTIVATE", ActivateAlphaChannel); #if MagickLibVersion >= 0x700 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_ON", OnAlphaChannel); #else IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_RESET", ResetAlphaChannel); #endif IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_SET", SetAlphaChannel); #endif #if MagickLibVersion > 0x645 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_UNDEFINED", UndefinedAlphaChannel); #if MagickLibVersion >= 0x700 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_DISCRETE", DiscreteAlphaChannel); #endif IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_COPY", CopyAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_DEACTIVATE", DeactivateAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_EXTRACT", ExtractAlphaChannel); #if MagickLibVersion >= 0x700 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_OFF", OffAlphaChannel); #endif IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_OPAQUE", OpaqueAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_SHAPE", ShapeAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_TRANSPARENT", TransparentAlphaChannel); #if MagickLibVersion >= 0x690 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_ASSOCIATE", AssociateAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_DISSOCIATE", DisassociateAlphaChannel); #endif /* DiscreteAlphaChannel, CopyAlphaChannel, DisassociateAlphaChannel, DeactivateAlphaChannel, ExtractAlphaChannel, ExtractAlphaChannel, OffAlphaChannel, OpaqueAlphaChannel, OnAlphaChannel, ResetAlphaChannel, // deprecated */ IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_UNDEFINED", UndefinedColorInterpolate); IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_BARYCENTRIC", BarycentricColorInterpolate); IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_BILINEAR", BilinearColorInterpolate); IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_POLYNOMIAL", PolynomialColorInterpolate); IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_SPEPARDS", ShepardsColorInterpolate); IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_VORONOI", VoronoiColorInterpolate); #if MagickLibVersion >= 0x687 IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_INVERSE", InverseColorInterpolate); #endif #if MagickLibVersion >= 0x693 IMAGICK_REGISTER_CONST_LONG("SPARSECOLORMETHOD_MANHATTAN", ManhattanColorInterpolate); #endif IMAGICK_REGISTER_CONST_LONG("DITHERMETHOD_UNDEFINED", UndefinedDitherMethod); IMAGICK_REGISTER_CONST_LONG("DITHERMETHOD_NO", NoDitherMethod); IMAGICK_REGISTER_CONST_LONG("DITHERMETHOD_RIEMERSMA", RiemersmaDitherMethod); IMAGICK_REGISTER_CONST_LONG("DITHERMETHOD_FLOYDSTEINBERG", FloydSteinbergDitherMethod); #endif #if MagickLibVersion > 0x648 IMAGICK_REGISTER_CONST_LONG("FUNCTION_UNDEFINED", UndefinedFunction); IMAGICK_REGISTER_CONST_LONG("FUNCTION_POLYNOMIAL", PolynomialFunction); IMAGICK_REGISTER_CONST_LONG("FUNCTION_SINUSOID", SinusoidFunction); #endif #if MagickLibVersion >= 0x653 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_BACKGROUND", BackgroundAlphaChannel); IMAGICK_REGISTER_CONST_LONG("FUNCTION_ARCSIN", ArcsinFunction); IMAGICK_REGISTER_CONST_LONG("FUNCTION_ARCTAN", ArctanFunction); #endif #if MagickLibVersion >= 0x678 #if MagickLibVersion < 0x700 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_FLATTEN", FlattenAlphaChannel); #endif IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_REMOVE", RemoveAlphaChannel); #endif #if MagickLibVersion > 0x683 IMAGICK_REGISTER_CONST_LONG("STATISTIC_GRADIENT", GradientStatistic); IMAGICK_REGISTER_CONST_LONG("STATISTIC_MAXIMUM", MaximumStatistic); IMAGICK_REGISTER_CONST_LONG("STATISTIC_MEAN", MeanStatistic); IMAGICK_REGISTER_CONST_LONG("STATISTIC_MEDIAN", MedianStatistic); IMAGICK_REGISTER_CONST_LONG("STATISTIC_MINIMUM", MinimumStatistic); IMAGICK_REGISTER_CONST_LONG("STATISTIC_MODE", ModeStatistic); IMAGICK_REGISTER_CONST_LONG("STATISTIC_NONPEAK", NonpeakStatistic); IMAGICK_REGISTER_CONST_LONG("STATISTIC_STANDARD_DEVIATION", StandardDeviationStatistic); #endif #if MagickLibVersion >= 0x690 IMAGICK_REGISTER_CONST_LONG("STATISTIC_ROOT_MEAN_SQUARE", RootMeanSquareStatistic); #endif #if MagickLibVersion >= 0x70C IMAGICK_REGISTER_CONST_LONG("STATISTIC_CONTRAST", ContrastStatistic); #endif #ifdef IMAGICK_WITH_KERNEL /* Convolve / Correlate weighted sums */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_CONVOLVE", ConvolveMorphology); /* Weighted Sum with reflected kernel */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_CORRELATE", CorrelateMorphology); /* Weighted Sum using a sliding window */ /* Low-level Morphology methods */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_ERODE", ErodeMorphology); /* Minimum Value in Neighbourhood */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_DILATE", DilateMorphology); /* Maximum Value in Neighbourhood */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_ERODE_INTENSITY", ErodeIntensityMorphology); /* Pixel Pick using GreyScale Erode */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_DILATE_INTENSITY", DilateIntensityMorphology); /* Pixel Pick using GreyScale Dialate */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_DISTANCE", DistanceMorphology); /* Add Kernel Value, take Minimum */ /* Second-level Morphology methods */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_OPEN", OpenMorphology); /* Dilate then Erode */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_CLOSE", CloseMorphology); /* Erode then Dilate */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_OPEN_INTENSITY", OpenIntensityMorphology); /* Pixel Pick using GreyScale Open */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_CLOSE_INTENSITY", CloseIntensityMorphology); /* Pixel Pick using GreyScale Close */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_SMOOTH", SmoothMorphology); /* Open then Close */ /* Difference Morphology methods */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_EDGE_IN", EdgeInMorphology); /* Dilate difference from Original */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_EDGE_OUT", EdgeOutMorphology); /* Erode difference from Original */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_EDGE", EdgeMorphology); /* Dilate difference with Erode */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_TOP_HAT", TopHatMorphology); /* Close difference from Original */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_BOTTOM_HAT", BottomHatMorphology); /* Open difference from Original */ /* Recursive Morphology methods */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_HIT_AND_MISS", HitAndMissMorphology); /* Foreground/Background pattern matching */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_THINNING", ThinningMorphology); /* Remove matching pixels from image */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_THICKEN", ThickenMorphology); /* Add matching pixels from image */ /* Experimental Morphology methods */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_VORONOI", VoronoiMorphology); /* distance matte channel copy nearest color */ IMAGICK_REGISTER_CONST_LONG("MORPHOLOGY_ITERATIVE", IterativeDistanceMorphology); /* Add Kernel Value, take Minimum */ /* The no-op or 'original image' kernel */ IMAGICK_REGISTER_CONST_LONG("KERNEL_UNITY", UnityKernel); /* Convolution Kernels, Gaussian Based */ IMAGICK_REGISTER_CONST_LONG("KERNEL_GAUSSIAN", GaussianKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_DIFFERENCE_OF_GAUSSIANS", DoGKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_LAPLACIAN_OF_GAUSSIANS", LoGKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_BLUR", BlurKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_COMET", CometKernel); /* Convolution Kernels, by Name */ IMAGICK_REGISTER_CONST_LONG("KERNEL_LAPLACIAN", LaplacianKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_SOBEL", SobelKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_FREI_CHEN", FreiChenKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_ROBERTS", RobertsKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_PREWITT", PrewittKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_COMPASS", CompassKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_KIRSCH", KirschKernel); /* Shape Kernels */ IMAGICK_REGISTER_CONST_LONG("KERNEL_DIAMOND", DiamondKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_SQUARE", SquareKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_RECTANGLE", RectangleKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_OCTAGON", OctagonKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_DISK", DiskKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_PLUS", PlusKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_CROSS", CrossKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_RING", RingKernel); /* Hit And Miss Kernels */ IMAGICK_REGISTER_CONST_LONG("KERNEL_PEAKS", PeaksKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_EDGES", EdgesKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_CORNERS", CornersKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_DIAGONALS", DiagonalsKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_LINE_ENDS", LineEndsKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_LINE_JUNCTIONS", LineJunctionsKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_RIDGES", RidgesKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_CONVEX_HULL", ConvexHullKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_THIN_SE", ThinSEKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_SKELETON", SkeletonKernel); /* Distance Measuring Kernels */ IMAGICK_REGISTER_CONST_LONG("KERNEL_CHEBYSHEV", ChebyshevKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_MANHATTAN", ManhattanKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_OCTAGONAL", OctagonalKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_EUCLIDEAN", EuclideanKernel); /* User Specified Kernel Array */ IMAGICK_REGISTER_CONST_LONG("KERNEL_USER_DEFINED", UserDefinedKernel); IMAGICK_REGISTER_CONST_LONG("KERNEL_BINOMIAL", BinomialKernel); /* Draw directions */ IMAGICK_REGISTER_CONST_LONG("DIRECTION_LEFT_TO_RIGHT", LeftToRightDirection); IMAGICK_REGISTER_CONST_LONG("DIRECTION_RIGHT_TO_LEFT", RightToLeftDirection); // The kernel is scaled directly using given scaling factor without change. IMAGICK_REGISTER_CONST_LONG("NORMALIZE_KERNEL_NONE", 0); // Kernel normalization ('normalize_flags' given) is designed to ensure // that any use of the kernel scaling factor with 'Convolve' or 'Correlate' // morphology methods will fall into -1.0 to +1.0 range. IMAGICK_REGISTER_CONST_LONG("NORMALIZE_KERNEL_VALUE", NormalizeValue); // For special kernels designed for locating shapes using 'Correlate', (often // only containing +1 and -1 values, representing foreground/brackground // matching) a special normalization method is provided to scale the positive // values separately to those of the negative values, so the kernel will be // forced to become a zero-sum kernel better suited to such searches. IMAGICK_REGISTER_CONST_LONG("NORMALIZE_KERNEL_CORRELATE", CorrelateNormalizeValue); // Scale the kernel by a percent. IMAGICK_REGISTER_CONST_LONG("NORMALIZE_KERNEL_PERCENT", PercentValue); #endif #if IM_HAVE_IMAGICK_GETSETIMAGEMASK IMAGICK_REGISTER_CONST_LONG("PIXELMASK_READ", ReadPixelMask); IMAGICK_REGISTER_CONST_LONG("PIXELMASK_WRITE", WritePixelMask); #endif #if MagickLibVersion >= 0x708 IMAGICK_REGISTER_CONST_LONG("PIXELMASK_COMPOSITE", CompositePixelMask); #endif #if MagickLibVersion >= 0x707 // AutoThresholdMethod IMAGICK_REGISTER_CONST_LONG("AUTO_THRESHOLD_KAPUR", KapurThresholdMethod); IMAGICK_REGISTER_CONST_LONG("AUTO_THRESHOLD_OTSU", OTSUThresholdMethod); IMAGICK_REGISTER_CONST_LONG("AUTO_THRESHOLD_TRIANGLE", TriangleThresholdMethod); #endif #if MagickLibVersion >= 0x702 // ComplexOperator IMAGICK_REGISTER_CONST_LONG("COMPLEX_OPERATOR_ADD", AddComplexOperator); IMAGICK_REGISTER_CONST_LONG("COMPLEX_OPERATOR_CONJUGATE", ConjugateComplexOperator); IMAGICK_REGISTER_CONST_LONG("COMPLEX_OPERATOR_DIVIDE", DivideComplexOperator); IMAGICK_REGISTER_CONST_LONG("COMPLEX_OPERATOR_MAGNITUDEPHASE", MagnitudePhaseComplexOperator); IMAGICK_REGISTER_CONST_LONG("COMPLEX_OPERATOR_MULTIPLY", MultiplyComplexOperator); IMAGICK_REGISTER_CONST_LONG("COMPLEX_OPERATOR_REALIMAGINARY", RealImaginaryComplexOperator); IMAGICK_REGISTER_CONST_LONG("COMPLEX_OPERATOR_SUBTRACT", SubtractComplexOperator); #endif #undef IMAGICK_REGISTER_CONST_LONG #undef IMAGICK_REGISTER_CONST_STRING } imagick-3.6.0/imagick_file.c0000644000000000000000000002455414145213431014401 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_file.h" #include "php_imagick_macros.h" #include "php_imagick_defs.h" #if ZEND_MODULE_API_NO > 20060613 # define IMAGICK_INIT_ERROR_HANDLING zend_error_handling error_handling # define IMAGICK_SET_ERROR_HANDLING_THROW zend_replace_error_handling(EH_THROW, php_imagick_exception_class_entry, &error_handling TSRMLS_CC) # define IMAGICK_RESTORE_ERROR_HANDLING zend_restore_error_handling(&error_handling TSRMLS_CC) #else # define IMAGICK_INIT_ERROR_HANDLING # define IMAGICK_SET_ERROR_HANDLING_THROW php_set_error_handling(EH_THROW, php_imagick_exception_class_entry TSRMLS_CC) # define IMAGICK_RESTORE_ERROR_HANDLING php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC) #endif #ifndef S_ISDIR # define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR) #endif static zend_bool php_imagick_is_virtual_format(const char *format) { int i, elements; const char *virtual_fmt[] = { "CANVAS", "CAPTION", "CLIPBOARD", "FRACTAL", "GRADIENT", "GRANITE", "HALD", // Identity Hald CLUT Image Select levels like this: hald:[8] for level 8. "INLINE", // Base64-encoded inline image "LABEL", "LOGO", "MAGICK", "MAP", // Colormap intensities and indices Set -depth to set the sample size of the intensities; indices are 16-bit if colors > 256. "MASK", // Image mask "MATTE", "NETSCAPE", "NULL", "PANGO", // Image caption "PLASMA", "PRINT", "RADIAL-GRADIENT", "RADIAL_GRADIENT", "ROSE" "SCAN", "SCANX", "TILE", // Tiled image "UNIQUE", "WIN", #ifndef PHP_WIN32 "X", #endif "XC", }; elements = sizeof (virtual_fmt) / sizeof (virtual_fmt [0]); for (i = 0; i < elements; i++) { if (strcasecmp(format, virtual_fmt[i]) == 0) { return 1; } } return 0; } static zend_bool php_imagick_is_url(const char *filename TSRMLS_DC) { const char *path_for_open; if (php_stream_locate_url_wrapper(filename, &path_for_open, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC)) { return 1; } return 0; } zend_bool php_imagick_file_init(struct php_imagick_file_t *file, const char *filename, size_t filename_len TSRMLS_DC) { char magick_path[MaxTextExtent], head_path[MaxTextExtent], tail_path[MaxTextExtent], buffer[MaxTextExtent]; if (!filename_len) { return 0; } /* Undefined for now */ file->type = ImagickUndefinedType; if (filename_len >= MaxTextExtent) { return 0; } /* Take a copy of the original string */ strlcpy(file->filename, filename, MaxTextExtent); file->filename_len = filename_len; /* Break the path into pieces */ memset(magick_path, 0, MaxTextExtent); GetPathComponent(file->filename, MagickPath, magick_path); /* The path has a format identifier, check for url and virtual format */ if (strlen(magick_path) > 0) { /* Virtual format? */ if (php_imagick_is_virtual_format(magick_path)) { file->type = ImagickVirtualFormat; file->absolute_path = estrdup(""); return 1; } /* Is it an url? */ else if (php_imagick_is_url(filename TSRMLS_CC)) { file->type = ImagickUri; file->absolute_path = estrdup(""); return 1; } } /* This is a normal file path */ file->type = ImagickFile; memset(head_path, 0, MaxTextExtent); memset(tail_path, 0, MaxTextExtent); GetPathComponent(file->filename, HeadPath, head_path); GetPathComponent(file->filename, TailPath, tail_path); (void) snprintf(buffer, MaxTextExtent, "%s/%s", head_path, tail_path); /* The full path to the file */ file->absolute_path = expand_filepath(buffer, NULL TSRMLS_CC); /* Failed to resolve absolute path */ if (!file->absolute_path) { file->absolute_path = estrdup(""); } return 1; } void php_imagick_file_deinit(struct php_imagick_file_t *file) { if (file->absolute_path) { efree(file->absolute_path); file->absolute_path = NULL; } } static int php_imagick_read_image_using_imagemagick(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC) { #if PHP_VERSION_ID < 70000 #if PHP_VERSION_ID >= 50600 #ifdef ZTS // This suppresses an 'unused parameter' warning. (void)tsrm_ls; #endif #endif #endif if (type == ImagickReadImage) { if (MagickReadImage(intern->magick_wand, file->filename) == MagickFalse) { #if PHP_VERSION_ID >= 70000 zend_stat_t st; #else struct stat st; #endif /* Resolved to a filename. Check that it's not a dir */ if (php_sys_stat(file->absolute_path, &st) == 0 && S_ISDIR(st.st_mode)) { return IMAGICK_RW_PATH_IS_DIR; } return IMAGICK_RW_UNDERLYING_LIBRARY; } } else if (type == ImagickPingImage){ if (MagickPingImage(intern->magick_wand, file->filename) == MagickFalse) { return IMAGICK_RW_UNDERLYING_LIBRARY; } } else { return IMAGICK_RW_UNDERLYING_LIBRARY; } MagickSetImageFilename(intern->magick_wand, file->absolute_path); MagickSetLastIterator(intern->magick_wand); return IMAGICK_RW_OK; } static int php_imagick_read_image_using_php_streams(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC) { php_stream *stream; MagickBooleanType status; FILE *fp; IMAGICK_INIT_ERROR_HANDLING; IMAGICK_SET_ERROR_HANDLING_THROW; #if PHP_VERSION_ID >= 70000 stream = php_stream_open_wrapper(file->filename, "rb", (IGNORE_PATH) & ~REPORT_ERRORS, NULL); #else stream = php_stream_open_wrapper(file->filename, "rb", (ENFORCE_SAFE_MODE|IGNORE_PATH) & ~REPORT_ERRORS, NULL); #endif if (!stream) { IMAGICK_RESTORE_ERROR_HANDLING; return IMAGICK_RW_UNDERLYING_LIBRARY; } if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO|PHP_STREAM_CAST_INTERNAL) == FAILURE || php_stream_cast(stream, PHP_STREAM_AS_STDIO|PHP_STREAM_CAST_INTERNAL, (void*)&fp, 0) == FAILURE) { php_stream_close(stream); IMAGICK_RESTORE_ERROR_HANDLING; return IMAGICK_RW_UNDERLYING_LIBRARY; } IMAGICK_RESTORE_ERROR_HANDLING; if (type == ImagickReadImage) { status = MagickReadImageFile(intern->magick_wand, fp); } else if (type == ImagickPingImage){ status = MagickPingImageFile(intern->magick_wand, fp); } else { php_stream_close(stream); return IMAGICK_RW_UNDERLYING_LIBRARY; } if (status == MagickFalse) { php_stream_close(stream); return IMAGICK_RW_UNDERLYING_LIBRARY; } MagickSetImageFilename(intern->magick_wand, file->absolute_path); php_stream_close(stream); if (status == MagickFalse) { return IMAGICK_RW_UNDERLYING_LIBRARY; } MagickSetLastIterator(intern->magick_wand); return IMAGICK_RW_OK; } int php_imagick_safe_mode_check(const char *filename TSRMLS_DC) { #if defined(CHECKUID_CHECK_FILE_AND_DIR) if (PG(safe_mode) && (!php_checkuid_ex(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR, CHECKUID_NO_ERRORS))) { return IMAGICK_RW_SAFE_MODE_ERROR; } #endif if (PG(open_basedir) && php_check_open_basedir_ex(filename, 0 TSRMLS_CC)) { return IMAGICK_RW_OPEN_BASEDIR_ERROR; } return IMAGICK_RW_OK; } php_imagick_rw_result_t php_imagick_read_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC) { php_imagick_rw_result_t rc; if (file->type == ImagickFile) { rc = php_imagick_safe_mode_check(file->absolute_path TSRMLS_CC); if (rc != IMAGICK_RW_OK) { return rc; } } if (file->type == ImagickUri) { return php_imagick_read_image_using_php_streams(intern, file, type TSRMLS_CC); } else { return php_imagick_read_image_using_imagemagick(intern, file, type TSRMLS_CC); } } php_imagick_rw_result_t php_imagick_write_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type, zend_bool adjoin TSRMLS_DC) { php_imagick_rw_result_t rc; MagickBooleanType status = MagickFalse; if (file->type == ImagickFile) { rc = php_imagick_safe_mode_check(file->absolute_path TSRMLS_CC); if (rc != IMAGICK_RW_OK) { return rc; } } if (type == ImagickWriteImage) { status = MagickWriteImage(intern->magick_wand, file->filename); } else if (type == ImagickWriteImages) { status = MagickWriteImages(intern->magick_wand, file->filename, adjoin); } /* Write succeded ? */ if (status == MagickFalse) { return IMAGICK_RW_UNDERLYING_LIBRARY; } /* All went well it seems */ return IMAGICK_RW_OK; } zend_bool php_imagick_stream_handler(php_imagick_object *intern, php_stream *stream, ImagickOperationType type TSRMLS_DC) { FILE *fp; MagickBooleanType status = MagickFalse; IMAGICK_INIT_ERROR_HANDLING; IMAGICK_SET_ERROR_HANDLING_THROW; if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO | PHP_STREAM_CAST_INTERNAL) == FAILURE || php_stream_cast(stream, PHP_STREAM_AS_STDIO | PHP_STREAM_CAST_INTERNAL, (void **)&fp, 0) == FAILURE) { IMAGICK_RESTORE_ERROR_HANDLING; return 0; } IMAGICK_RESTORE_ERROR_HANDLING; /* php_stream_cast returns warning on some streams but still does not return FAILURE */ if (EG(exception)) { return 0; } switch (type) { case ImagickWriteImageFile: status = MagickWriteImageFile(intern->magick_wand, fp); break; case ImagickWriteImagesFile: status = MagickWriteImagesFile(intern->magick_wand, fp); break; case ImagickReadImageFile: status = MagickReadImageFile(intern->magick_wand, fp); break; case ImagickPingImageFile: status = MagickPingImageFile(intern->magick_wand, fp); break; default: return 0; break; } if (status == MagickFalse) { return 0; } return 1; } imagick-3.6.0/php_imagick.h0000644000000000000000000000407414145213431014251 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #ifndef PHP_IMAGICK_H /* Prevent double inclusion */ #define PHP_IMAGICK_H /* Define Extension Properties */ #define PHP_IMAGICK_EXTNAME "imagick" // The version is deliberately left as 'PACKAGE_VERSION' in source code. // It is only replaced with the actual version number that packaged through pecl.php.net #define PHP_IMAGICK_VERSION "3.6.0" #define PHP_IMAGICK_EXTNUM 30600 /* Import configure options when building outside of the PHP source tree */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef ZTS # include "TSRM.h" #endif /* Include PHP Standard Headers */ #include "php.h" /* Define the entry point symbol * ZE will use when loading this module */ extern zend_module_entry imagick_module_entry; #define phpext_imagick_ptr &imagick_module_entry #endif /* PHP_IMAGICK_H */ imagick-3.6.0/php_imagemagick_version_defs.h0000644000000000000000000001104414145213431017644 0ustar rootroot #ifndef PHP_IMAGEMAGICK_VERSION_DEFS_H # define PHP_IMAGEMAGICK_VERSION_DEFS_H // Q) Why are the defines done in this file? // // A) Checking whether an ImageMagick function is available _and_ usable is // annoyingly difficult. It's pretty common for new functions to be introduced // in patch releases, (e.g. 6.5.4-8) rather than in minor releases (6.5.5-0). // // Additionally, the api for new functions often changes quite rapidly in the // first few versions it is available in, which means we can't just check for // the presence of the symbol // // Because of those two things, the sanest thing to do is to support features // based on the minimum minor version from which they are continually // available and stable. // // Any mistake in which version is required for a feature can be fixed in a // single place, rather than having to have duplicated info elsewhere. #if MagickLibVersion >= 0x700 #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD 1 #endif #elif MagickLibVersion >= 0x631 #define IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_SETSEED 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_MEANSHIFTIMAGE 1 #endif #if MagickLibVersion >= 0x710 #define IM_HAVE_IMAGICK_KMEANSIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE 1 #endif #if MagickLibVersion >= 0x710 #define IM_HAVE_IMAGICK_BILATERALBLURIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_CLAHEIMAGE 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_CHANNELFXIMAGE 1 #endif #if MagickLibVersion >= 0x710 #define IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_COMPLEXIMAGES 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_LEVELIMAGECOLORS 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_LEVELIZEIMAGE 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE 1 #endif #if MagickLibVersion >= 0x70B #define IM_HAVE_IMAGICK_WHITEBALANCEIMAGE 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE 1 #endif #if MagickLibVersion >= 0x70A // Technically, this may be available earlier, but the behaviour around // default mask changed. #define IM_HAVE_IMAGICK_GETSETIMAGEMASK 1 // ImageMagick forget to export the header until about 7.0.11-14... WandExport MagickBooleanType MagickSetImageMask( MagickWand *wand, const PixelMask type, const MagickWand *clip_mask ); #endif // The above is sub-optimal as it's hard to read. It'd be better to do // something like the below: //#define MAGICK_LIB_RANGE(NAME, IM6_VERSION, IM7_VERSION) slash //#if MagickLibVersion >= 0x700 slash // #if MagickLibVersion >= IM7_VERSION slash // #define IM_HAVE_##NAME 1 slash // #endif slash //#elif MagickLibVersion >= 0x600 slash // #if MagickLibVersion >= IM6_VERSION slash // #define IM_HAVE_##NAME 1 slash // #endif slash //#endif // MAGICK_LIB_RANGE(IMAGICK_SETIMAGEINTERPOLATEMETHOD, 0x631, 0x702) // But this type of macro expansion is not possible. // // https://stackoverflow.com/questions/48431325/is-it-possible-to-define-macro-inside-macro // "The resulting completely macro-replaced preprocessing token sequence is not // processed as a preprocessing directive even if it resembles one,..." // // An alternative would be to use code generation to build the define file as // part of the build process. However that would involve looking at m4 config files. #if MagickLibVersion >= 0x700 // declare symbols only defined in C source and not in header WandExport MagickBooleanType MagickSetImageMask( MagickWand *wand, const PixelMask type, const MagickWand *clip_mask ); #endif #if MagickLibVersion >= 0x710 // declare symbols only defined in C source and not in header WandExport MagickBooleanType MagickBilateralBlurImage(MagickWand *wand, const double radius,const double sigma,const double intensity_sigma, const double spatial_sigma); #endif #endif /* PHP_IMAGEMAGICK_VERSION_DEFS_H */imagick-3.6.0/php_imagick_defs.h0000644000000000000000000011557114145213431015257 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #ifndef PHP_IMAGICK_DEFS_H /* PHP_IMAGICK_DEFS_H */ # define PHP_IMAGICK_DEFS_H /* Include magic wand header */ #if defined (IM_MAGICKWAND_HEADER_STYLE_SEVEN) # include #elif defined (IM_MAGICKWAND_HEADER_STYLE_OLD) # include #else # include #endif #include "php_imagemagick_version_defs.h" #if MagickLibVersion >= 0x700 #include "shim_im6_to_im7.h" #endif /* Some extra headers */ #include "Zend/zend_exceptions.h" #include "Zend/zend_interfaces.h" #include "ext/standard/php_string.h" #include "ext/standard/info.h" #include "ext/standard/php_filestat.h" #include "php_ini.h" #include "Zend/zend.h" #if PHP_VERSION_ID >= 80000 #define HAVE_LOCALE_H #define TSRMLS_C #define TSRMLS_CC #define TSRMLS_D #define TSRMLS_DC #define TSRMLS_FETCH() #define TSRMLS_SET_CTX(ctx) #endif /* Include locale header */ #ifdef HAVE_LOCALE_H # include #endif #if MagickLibVersion >= 0x680 #define IMAGICK_WITH_KERNEL #endif #if MagickLibVersion >= 0x700 #if !defined(MaxTextExtent) # define MaxTextExtent 4096 /* always >= 4096 */ #endif #endif #if PHP_VERSION_ID >= 70000 #define im_long zend_long #else #define im_long long #endif #if PHP_VERSION_ID >= 70200 #define im_ce_countable zend_ce_countable #else #define im_ce_countable spl_ce_Countable #endif typedef struct _php_imagick_callback { void ***thread_ctx; #if PHP_VERSION_ID >= 70000 zval user_callback; #else zval *user_callback; #endif struct _php_imagick_callback *previous_callback; } php_imagick_callback; /* Globals, needed for the ini settings */ ZEND_BEGIN_MODULE_GLOBALS(imagick) zend_bool locale_fix; zend_bool progress_monitor; zend_bool skip_version_check; zend_bool set_single_thread; zend_bool allow_zero_dimension_images; im_long shutdown_sleep_count; php_imagick_callback *progress_callback; #ifdef PHP_IMAGICK_ZEND_MM MagickWand *keep_alive; #endif ZEND_END_MODULE_GLOBALS(imagick) #ifdef ZTS # define IMAGICK_G(v) TSRMG(imagick_globals_id, zend_imagick_globals *, v) #else # define IMAGICK_G(v) (imagick_globals.v) #endif ZEND_EXTERN_MODULE_GLOBALS(imagick) #ifdef HAVE_LOCALE_H # if defined(PHP_WIN32) # define IMAGICK_LC_NUMERIC_LOCALE "English" # else # define IMAGICK_LC_NUMERIC_LOCALE "C" # endif #endif #if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3 #define zend_parse_parameters_none() zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") #endif /* Class names */ #define PHP_IMAGICK_SC_NAME "Imagick" #define PHP_IMAGICK_EXCEPTION_SC_NAME "ImagickException" #define PHP_IMAGICKDRAW_SC_NAME "ImagickDraw" #define PHP_IMAGICKDRAW_EXCEPTION_SC_NAME "ImagickDrawException" #define PHP_IMAGICKPIXEL_SC_NAME "ImagickPixel" #define PHP_IMAGICKPIXEL_EXCEPTION_SC_NAME "ImagickPixelException" #define PHP_IMAGICKPIXELITERATOR_SC_NAME "ImagickPixelIterator" #define PHP_IMAGICKPIXELITERATOR_EXCEPTION_SC_NAME "ImagickPixelIteratorException" #ifdef IMAGICK_WITH_KERNEL #define PHP_IMAGICKKERNEL_SC_NAME "ImagickKernel" #define PHP_IMAGICKKERNEL_EXCEPTION_SC_NAME "ImagickKernelException" #endif #if PHP_VERSION_ID >= 70000 /* Structure for Imagick object. */ typedef struct _php_imagick_object { MagickWand *magick_wand; char *progress_monitor_name; zend_bool next_out_of_bound; zend_object zo; } php_imagick_object; #else /* Structure for Imagick object. */ typedef struct _php_imagick_object { zend_object zo; MagickWand *magick_wand; char *progress_monitor_name; zend_bool next_out_of_bound; } php_imagick_object; #endif #if PHP_VERSION_ID >= 70000 /* Structure for ImagickDraw object. */ typedef struct _php_imagickdraw_object { DrawingWand *drawing_wand; zend_object zo; } php_imagickdraw_object; #else /* Structure for ImagickDraw object. */ typedef struct _php_imagickdraw_object { zend_object zo; DrawingWand *drawing_wand; } php_imagickdraw_object; #endif #if PHP_VERSION_ID >= 70000 /* Structure for ImagickPixelIterator object. */ typedef struct _php_imagickpixeliterator_object { PixelIterator *pixel_iterator; zend_bool initialized; #if MagickLibVersion <= 0x628 long rows; long iterator_position; #endif zend_object zo; } php_imagickpixeliterator_object; #else /* Structure for ImagickPixelIterator object. */ typedef struct _php_imagickpixeliterator_object { zend_object zo; PixelIterator *pixel_iterator; zend_bool initialized; #if MagickLibVersion <= 0x628 long rows; long iterator_position; #endif } php_imagickpixeliterator_object; #endif #if PHP_VERSION_ID >= 70000 /* Structure for ImagickPixel object. */ typedef struct _php_imagickpixel_object { PixelWand *pixel_wand; zend_bool initialized_via_iterator; zend_object zo; } php_imagickpixel_object; #else /* Structure for ImagickPixel object. */ typedef struct _php_imagickpixel_object { zend_object zo; PixelWand *pixel_wand; zend_bool initialized_via_iterator; } php_imagickpixel_object; #endif #ifdef IMAGICK_WITH_KERNEL #if PHP_VERSION_ID >= 70000 /* Structure for ImagickKernel object. */ typedef struct _php_imagickkernel_object { KernelInfo *kernel_info; zend_object zo; } php_imagickkernel_object; #else /* Structure for ImagickKernel object. */ typedef struct _php_imagickkernel_object { zend_object zo; KernelInfo *kernel_info; } php_imagickkernel_object; #endif #endif //Object fetching. #if PHP_VERSION_ID >= 70000 static inline php_imagick_object *php_imagick_fetch_object(zend_object *obj) { return (php_imagick_object *)((char*)(obj) - XtOffsetOf(php_imagick_object, zo)); } static inline php_imagickdraw_object *php_imagickdraw_fetch_object(zend_object *obj) { return (php_imagickdraw_object *)((char*)(obj) - XtOffsetOf(php_imagickdraw_object, zo)); } static inline php_imagickpixel_object *php_imagickpixel_fetch_object(zend_object *obj) { return (php_imagickpixel_object *)((char*)(obj) - XtOffsetOf(php_imagickpixel_object, zo)); } static inline php_imagickpixeliterator_object *php_imagickpixeliterator_fetch_object(zend_object *obj) { return (php_imagickpixeliterator_object *)((char*)(obj) - XtOffsetOf(php_imagickpixeliterator_object, zo)); } #ifdef IMAGICK_WITH_KERNEL static inline php_imagickkernel_object *php_imagickkernel_fetch_object(zend_object *obj) { return (php_imagickkernel_object *)((char*)(obj) - XtOffsetOf(php_imagickkernel_object, zo)); } #endif #else #define php_imagick_fetch_object(object) ((php_imagick_object *)object) #define php_imagickdraw_fetch_object(object) ((php_imagickdraw_object *)object) #define php_imagickpixel_fetch_object(object) ((php_imagickpixel_object *)object) #define php_imagickpixeliterator_fetch_object(object) ((php_imagickpixeliterator_object *)object) #define php_imagickkernel_fetch_object(object) ((php_imagickkernel_object *)object) #endif // Object access #if PHP_VERSION_ID >= 70000 #define Z_IMAGICK_P(zv) php_imagick_fetch_object(Z_OBJ_P((zv))) #define Z_IMAGICKDRAW_P(zv) php_imagickdraw_fetch_object(Z_OBJ_P((zv))) #define Z_IMAGICKPIXEL_P(zv) php_imagickpixel_fetch_object(Z_OBJ_P((zv))) #define Z_IMAGICKPIXELITERATOR_P(zv) php_imagickpixeliterator_fetch_object(Z_OBJ_P((zv))) #ifdef IMAGICK_WITH_KERNEL #define Z_IMAGICKKERNEL_P(zv) php_imagickkernel_fetch_object(Z_OBJ_P((zv))) #endif #else #define Z_IMAGICK_P(zv) (php_imagick_object *)zend_object_store_get_object(zv TSRMLS_CC) #define Z_IMAGICKDRAW_P(zv) (php_imagickdraw_object *)zend_object_store_get_object(zv TSRMLS_CC) #define Z_IMAGICKPIXEL_P(zv) (php_imagickpixel_object *) zend_object_store_get_object(zv TSRMLS_CC) #define Z_IMAGICKPIXELITERATOR_P(zv) (php_imagickpixeliterator_object *)zend_object_store_get_object(zv TSRMLS_CC) #define Z_IMAGICKKERNEL_P(zv) (php_imagickkernel_object *)zend_object_store_get_object(zv TSRMLS_CC) #endif // String access #if PHP_VERSION_ID >= 70000 #define IM_ZVAL_STRING(zv, charstar) ZVAL_STRING(zv, charstar); #define IM_RETURN_STRING(s) RETURN_STRING(s) #else #define IM_ZVAL_STRING(zv, charstar) ZVAL_STRING(zv, charstar, 1); //RETURN_STRING(s, duplicate) #define IM_RETURN_STRING(s) RETURN_STRING(s, 0) #endif #if PHP_VERSION_ID >= 70000 #define IM_add_assoc_string(zv, key, charstr) add_assoc_string(zv, key, charstr) #define IM_ZVAL_STRINGL(zv, charstr, length) ZVAL_STRINGL(zv, charstr, length) #define IM_add_next_index_string(zv, charstr) add_next_index_string(zv, charstr) #define IM_LEN_TYPE size_t #else #define IM_add_assoc_string(zv, key, charstr) add_assoc_string(zv, key, charstr, 1) #define IM_add_assoc_string(zv, key, charstr) add_assoc_string(zv, key, charstr, 1) #define IM_ZVAL_STRINGL(zv, charstr, length) ZVAL_STRINGL(zv, charstr, length, 1) #define IM_add_next_index_string(zv, charstr) add_next_index_string(zv, charstr, 1) #define IM_add_next_index_zval(zv1, zv2) #define IM_LEN_TYPE int #endif #if PHP_VERSION_ID >= 70000 #define IM_ZEND_OBJECT zend_object #else #define IM_ZEND_OBJECT void #endif /* Define some color constants */ typedef enum _php_imagick_color_t { PHP_IMAGICK_COLOR_MIN = 10, PHP_IMAGICK_COLOR_BLACK, PHP_IMAGICK_COLOR_BLUE, PHP_IMAGICK_COLOR_CYAN, PHP_IMAGICK_COLOR_GREEN, PHP_IMAGICK_COLOR_RED, PHP_IMAGICK_COLOR_YELLOW, PHP_IMAGICK_COLOR_MAGENTA, #if MagickLibVersion < 0x700 PHP_IMAGICK_COLOR_OPACITY, #endif PHP_IMAGICK_COLOR_ALPHA, PHP_IMAGICK_COLOR_FUZZ, PHP_IMAGICK_COLOR_MAX, } php_imagick_color_t; /* Class enum */ typedef enum _php_imagick_class_type_t { IMAGICK_CLASS, IMAGICKDRAW_CLASS, IMAGICKPIXELITERATOR_CLASS, IMAGICKPIXEL_CLASS, #ifdef IMAGICK_WITH_KERNEL IMAGICKKERNEL_CLASS #endif } php_imagick_class_type_t; /* Read / write constants */ typedef enum _php_imagick_rw_result_t { IMAGICK_RW_OK, IMAGICK_RW_SAFE_MODE_ERROR, IMAGICK_RW_OPEN_BASEDIR_ERROR, IMAGICK_RW_UNDERLYING_LIBRARY, IMAGICK_RW_PERMISSION_DENIED, IMAGICK_RW_FILENAME_TOO_LONG, IMAGICK_RW_PATH_DOES_NOT_EXIST, IMAGICK_RW_PATH_IS_DIR, } php_imagick_rw_result_t; /* Class entries */ extern zend_class_entry *php_imagick_sc_entry; extern zend_class_entry *php_imagick_exception_class_entry; extern zend_class_entry *php_imagickdraw_sc_entry; extern zend_class_entry *php_imagickdraw_exception_class_entry; extern zend_class_entry *php_imagickpixel_sc_entry; extern zend_class_entry *php_imagickpixel_exception_class_entry; extern zend_class_entry *php_imagickpixeliterator_sc_entry; extern zend_class_entry *php_imagickpixeliterator_exception_class_entry; #ifdef IMAGICK_WITH_KERNEL extern zend_class_entry *php_imagickkernel_sc_entry; extern zend_class_entry *php_imagickkernel_exception_class_entry; #endif /* Forward declarations (Imagick) */ #if (MagickLibVersion >= 0x700 && MagickLibVersion >= 0x709) #define PHP_IMAGICK_HAVE_HOUGHLINE 1 #else #define PHP_IMAGICK_HAVE_HOUGHLINE 0 #endif /* The conditional methods */ #if MagickLibVersion > 0x628 PHP_METHOD(imagick, pingimageblob); PHP_METHOD(imagick, pingimagefile); PHP_METHOD(imagick, transposeimage); PHP_METHOD(imagick, transverseimage); PHP_METHOD(imagick, trimimage); PHP_METHOD(imagick, waveimage); PHP_METHOD(imagick, vignetteimage); PHP_METHOD(imagick, compareimagelayers); PHP_METHOD(imagick, optimizeimagelayers); PHP_METHOD(imagick, uniqueimagecolors); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, getimagematte); #endif //#if MagickLibVersion < 0x700 #endif PHP_METHOD(imagick, setimagematte); PHP_METHOD(imagick, adaptiveresizeimage); PHP_METHOD(imagick, sketchimage); PHP_METHOD(imagick, shadeimage); PHP_METHOD(imagick, getsizeoffset); PHP_METHOD(imagick, setsizeoffset); PHP_METHOD(imagick, adaptiveblurimage); PHP_METHOD(imagick, contraststretchimage); PHP_METHOD(imagick, adaptivesharpenimage); PHP_METHOD(imagick, randomthresholdimage); PHP_METHOD(imagick, roundcornersimage); PHP_METHOD(imagick, setiteratorindex); PHP_METHOD(imagick, getiteratorindex); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, transformimage); #endif // #if MagickLibVersion < 0x700 #endif #if MagickLibVersion > 0x630 #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setimageopacity); #endif #if MagickLibVersion >= 0x700 PHP_METHOD(imagick, setimagealpha); #endif #if MagickLibVersion < 0x700 PHP_METHOD(imagick, orderedposterizeimage); #endif //#if MagickLibVersion < 0x700 #endif #if MagickLibVersion > 0x631 PHP_METHOD(imagick, polaroidimage); PHP_METHOD(imagick, getimageproperty); PHP_METHOD(imagick, setimageproperty); PHP_METHOD(imagick, deleteimageproperty); PHP_METHOD(imagick, identifyformat); #if IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD PHP_METHOD(imagick, setimageinterpolatemethod); #endif PHP_METHOD(imagick, getimageinterpolatemethod); PHP_METHOD(imagick, linearstretchimage); PHP_METHOD(imagick, getimagelength); PHP_METHOD(imagick, extentimage); #endif #if MagickLibVersion > 0x633 PHP_METHOD(imagick, getimageorientation); PHP_METHOD(imagick, setimageorientation); #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion > 0x634 PHP_METHOD(imagick, paintfloodfillimage); #endif #endif #if MagickLibVersion > 0x635 PHP_METHOD(imagick, clutimage); PHP_METHOD(imagick, getimageproperties); PHP_METHOD(imagick, getimageprofiles); PHP_METHOD(imagick, distortimage); PHP_METHOD(imagick, writeimagefile); PHP_METHOD(imagick, writeimagesfile); PHP_METHOD(imagick, resetimagepage); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setimageclipmask); PHP_METHOD(imagick, getimageclipmask); #endif PHP_METHOD(imagick, animateimages); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, recolorimage); #endif #endif #endif #if MagickLibVersion > 0x636 PHP_METHOD(imagick, setfont); PHP_METHOD(imagick, getfont); PHP_METHOD(imagick, setpointsize); PHP_METHOD(imagick, getpointsize); PHP_METHOD(imagick, mergeimagelayers); #endif #if MagickLibVersion > 0x637 PHP_METHOD(imagick, floodfillpaintimage); PHP_METHOD(imagick, opaquepaintimage); PHP_METHOD(imagick, transparentpaintimage); PHP_METHOD(imagick, setimagealphachannel); #endif #if MagickLibVersion > 0x638 PHP_METHOD(imagick, liquidrescaleimage); PHP_METHOD(imagick, decipherimage); PHP_METHOD(imagick, encipherimage); #endif #if MagickLibVersion > 0x639 PHP_METHOD(imagick, setgravity); PHP_METHOD(imagick, getgravity); PHP_METHOD(imagick, getimagechannelrange); PHP_METHOD(imagick, getimagealphachannel); #endif #if MagickLibVersion > 0x642 PHP_METHOD(imagick, getimagechanneldistortions); #endif #if MagickLibVersion > 0x643 PHP_METHOD(imagick, getimagegravity); PHP_METHOD(imagick, setimagegravity); #endif #if MagickLibVersion > 0x645 PHP_METHOD(imagick, importimagepixels); PHP_METHOD(imagick, deskewimage); #if PHP_IMAGICK_HAVE_HOUGHLINE PHP_METHOD(imagick, houghlineimage); #endif PHP_METHOD(imagick, segmentimage); PHP_METHOD(imagick, sparsecolorimage); PHP_METHOD(imagick, remapimage); #endif #if MagickLibVersion > 0x646 PHP_METHOD(imagick, exportimagepixels); #endif #if MagickLibVersion > 0x648 PHP_METHOD(imagick, getimagechannelkurtosis); PHP_METHOD(imagick, functionimage); #endif #if MagickLibVersion > 0x651 PHP_METHOD(imagick, transformimagecolorspace); #endif #if MagickLibVersion > 0x652 PHP_METHOD(imagick, haldclutimage); #endif #if MagickLibVersion > 0x655 PHP_METHOD(imagick, autolevelimage); PHP_METHOD(imagick, blueshiftimage); #endif #if MagickLibVersion > 0x656 PHP_METHOD(imagick, setimageartifact); PHP_METHOD(imagick, getimageartifact); PHP_METHOD(imagick, deleteimageartifact); PHP_METHOD(imagick, setcolorspace); PHP_METHOD(imagick, getcolorspace); PHP_METHOD(imagick, clampimage); #endif #if MagickLibVersion > 0x667 PHP_METHOD(imagick, smushimages); #endif PHP_METHOD(imagick, __construct); PHP_METHOD(imagick, __tostring); PHP_METHOD(imagick, count); PHP_METHOD(imagick, getpixeliterator); PHP_METHOD(imagick, getpixelregioniterator); PHP_METHOD(imagick, readimage); PHP_METHOD(imagick, readimages); PHP_METHOD(imagick, pingimage); PHP_METHOD(imagick, readimageblob); PHP_METHOD(imagick, readimagefile); PHP_METHOD(imagick, displayimage); PHP_METHOD(imagick, displayimages); PHP_METHOD(imagick, destroy); PHP_METHOD(imagick, clear); PHP_METHOD(imagick, clone); PHP_METHOD(imagick, removeimage); PHP_METHOD(imagick, writeimage); PHP_METHOD(imagick, writeimages); PHP_METHOD(imagick, resetiterator); PHP_METHOD(imagick, setfirstiterator); PHP_METHOD(imagick, setlastiterator); PHP_METHOD(imagick, previousimage); PHP_METHOD(imagick, nextimage); PHP_METHOD(imagick, haspreviousimage); PHP_METHOD(imagick, hasnextimage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setimageindex); PHP_METHOD(imagick, getimageindex); #endif // #if MagickLibVersion < 0x700 #endif PHP_METHOD(imagick, setimageformat); PHP_METHOD(imagick, setimagefilename); PHP_METHOD(imagick, getimagefilename); PHP_METHOD(imagick, getimageformat); PHP_METHOD(imagick, getimagemimetype); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, getimagesize); #endif #endif PHP_METHOD(imagick, getimagegeometry); PHP_METHOD(imagick, getimagecolors); PHP_METHOD(imagick, scaleimage); PHP_METHOD(imagick, blurimage); PHP_METHOD(imagick, thumbnailimage); PHP_METHOD(imagick, cropthumbnailimage); PHP_METHOD(imagick, commentimage); PHP_METHOD(imagick, cropimage); PHP_METHOD(imagick, labelimage); PHP_METHOD(imagick, valid); PHP_METHOD(imagick, current); PHP_METHOD(imagick, drawimage); PHP_METHOD(imagick, getimageblob); PHP_METHOD(imagick, getimagesblob); PHP_METHOD(imagick, setimagecompressionquality); PHP_METHOD(imagick, getimagecompressionquality); PHP_METHOD(imagick, setimagecompression); PHP_METHOD(imagick, getimagecompression); PHP_METHOD(imagick, annotateimage); PHP_METHOD(imagick, compositeimage); PHP_METHOD(imagick, modulateimage); PHP_METHOD(imagick, montageimage); PHP_METHOD(imagick, morphology); PHP_METHOD(imagick, identifyimage); PHP_METHOD(imagick, thresholdimage); PHP_METHOD(imagick, adaptivethresholdimage); PHP_METHOD(imagick, blackthresholdimage); PHP_METHOD(imagick, whitethresholdimage); PHP_METHOD(imagick, appendimages); PHP_METHOD(imagick, charcoalimage); PHP_METHOD(imagick, normalizeimage); PHP_METHOD(imagick, oilpaintimage); PHP_METHOD(imagick, posterizeimage); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, radialblurimage); #endif PHP_METHOD(imagick, raiseimage); PHP_METHOD(imagick, resampleimage); PHP_METHOD(imagick, resizeimage); PHP_METHOD(imagick, rollimage); PHP_METHOD(imagick, rotateimage); PHP_METHOD(imagick, sampleimage); PHP_METHOD(imagick, solarizeimage); PHP_METHOD(imagick, shadowimage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setimageattribute); #endif // #if MagickLibVersion < 0x700 #endif PHP_METHOD(imagick, setimagebackgroundcolor); #if MagickLibVersion >= 0x700 PHP_METHOD(imagick, setimagechannelmask); #endif PHP_METHOD(imagick, setimagecompose); PHP_METHOD(imagick, setimagecompression); PHP_METHOD(imagick, setimagedelay); PHP_METHOD(imagick, setimagedepth); PHP_METHOD(imagick, setimagegamma); PHP_METHOD(imagick, setimageiterations); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setimagemattecolor); #endif // #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setimagepage); PHP_METHOD(imagick, setimageprogressmonitor); #if MagickLibVersion > 0x653 PHP_METHOD(imagick, setprogressmonitor); #endif PHP_METHOD(imagick, setimageresolution); PHP_METHOD(imagick, setimagescene); PHP_METHOD(imagick, setimagetickspersecond); PHP_METHOD(imagick, setimagetype); PHP_METHOD(imagick, setimageunits); PHP_METHOD(imagick, sharpenimage); PHP_METHOD(imagick, shaveimage); PHP_METHOD(imagick, shearimage); PHP_METHOD(imagick, spliceimage); PHP_METHOD(imagick, spreadimage); PHP_METHOD(imagick, swirlimage); PHP_METHOD(imagick, stripimage); PHP_METHOD(imagick, queryformats); PHP_METHOD(imagick, queryfonts); PHP_METHOD(imagick, queryfontmetrics); PHP_METHOD(imagick, steganoimage); PHP_METHOD(imagick, motionblurimage); #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) PHP_METHOD(imagick, mosaicimages); #endif #endif PHP_METHOD(imagick, morphimages); PHP_METHOD(imagick, minifyimage); PHP_METHOD(imagick, addnoiseimage); PHP_METHOD(imagick, affinetransformimage); #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) PHP_METHOD(imagick, averageimages); #endif #endif PHP_METHOD(imagick, borderimage); PHP_METHOD(imagick, calculatecrop); PHP_METHOD(imagick, chopimage); PHP_METHOD(imagick, clipimage); PHP_METHOD(imagick, clippathimage); PHP_METHOD(imagick, coalesceimages); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, colorfloodfillimage); #endif //#if MagickLibVersion < 0x700 #endif PHP_METHOD(imagick, colorizeimage); PHP_METHOD(imagick, compareimagechannels); PHP_METHOD(imagick, compareimages); PHP_METHOD(imagick, contrastimage); PHP_METHOD(imagick, combineimages); PHP_METHOD(imagick, convolveimage); PHP_METHOD(imagick, cyclecolormapimage); PHP_METHOD(imagick, deconstructimages); PHP_METHOD(imagick, despeckleimage); PHP_METHOD(imagick, edgeimage); PHP_METHOD(imagick, embossimage); PHP_METHOD(imagick, enhanceimage); PHP_METHOD(imagick, equalizeimage); PHP_METHOD(imagick, evaluateimage); #if MagickLibVersion >= 0x687 PHP_METHOD(imagick, evaluateimages); #endif #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) PHP_METHOD(imagick, flattenimages); #endif #endif PHP_METHOD(imagick, flipimage); PHP_METHOD(imagick, flopimage); #if MagickLibVersion >= 0x655 PHP_METHOD(imagick, forwardfouriertransformimage); #endif PHP_METHOD(imagick, frameimage); PHP_METHOD(imagick, fximage); PHP_METHOD(imagick, gammaimage); PHP_METHOD(imagick, gaussianblurimage); #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) PHP_METHOD(imagick, getimageattribute); #endif #endif PHP_METHOD(imagick, getimagebackgroundcolor); PHP_METHOD(imagick, getimageblueprimary); PHP_METHOD(imagick, getimagebordercolor); PHP_METHOD(imagick, getimagechanneldepth); PHP_METHOD(imagick, getimagechanneldistortion); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, getimagechannelextrema); #endif // #if MagickLibVersion < 0x700 #endif PHP_METHOD(imagick, getimagechannelmean); PHP_METHOD(imagick, getimagechannelstatistics); PHP_METHOD(imagick, getimagecolormapcolor); PHP_METHOD(imagick, getimagecolorspace); PHP_METHOD(imagick, getimagecompose); PHP_METHOD(imagick, getimagedelay); PHP_METHOD(imagick, getimagedepth); PHP_METHOD(imagick, getimagedistortion); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, getimageextrema); #endif // #if MagickLibVersion < 0x700 #endif PHP_METHOD(imagick, getimagedispose); PHP_METHOD(imagick, getimagegamma); PHP_METHOD(imagick, getimagegreenprimary); PHP_METHOD(imagick, getimageheight); PHP_METHOD(imagick, getimagehistogram); PHP_METHOD(imagick, getimageinterlacescheme); PHP_METHOD(imagick, getimageiterations); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, getimagemattecolor); #endif //#if MagickLibVersion < 0x700 PHP_METHOD(imagick, getimagepage); PHP_METHOD(imagick, getimagepixelcolor); PHP_METHOD(imagick, setImagePixelColor); PHP_METHOD(imagick, getimageprofile); PHP_METHOD(imagick, getimageredprimary); PHP_METHOD(imagick, getimagerenderingintent); PHP_METHOD(imagick, getimageresolution); PHP_METHOD(imagick, getimagescene); PHP_METHOD(imagick, getimagesignature); PHP_METHOD(imagick, getimagetickspersecond); PHP_METHOD(imagick, getimagetype); PHP_METHOD(imagick, getimageunits); PHP_METHOD(imagick, getimagevirtualpixelmethod); PHP_METHOD(imagick, getimagewhitepoint); PHP_METHOD(imagick, getimagewidth); PHP_METHOD(imagick, getnumberimages); PHP_METHOD(imagick, getimagetotalinkdensity); PHP_METHOD(imagick, getimageregion); PHP_METHOD(imagick, implodeimage); #if MagickLibVersion >= 0x658 PHP_METHOD(imagick, inversefouriertransformimage); #endif PHP_METHOD(imagick, levelimage); PHP_METHOD(imagick, magnifyimage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, mapimage); PHP_METHOD(imagick, mattefloodfillimage); #endif // #if MagickLibVersion < 0x700 #endif #if MagickLibVersion < 0x700 PHP_METHOD(imagick, medianfilterimage); #endif PHP_METHOD(imagick, negateimage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 PHP_METHOD(imagick, paintopaqueimage); PHP_METHOD(imagick, painttransparentimage); #endif //#if MagickLibVersion < 0x700 #endif PHP_METHOD(imagick, previewimages); PHP_METHOD(imagick, profileimage); PHP_METHOD(imagick, quantizeimage); PHP_METHOD(imagick, quantizeimages); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, reducenoiseimage); #endif PHP_METHOD(imagick, removeimageprofile); PHP_METHOD(imagick, separateimagechannel); PHP_METHOD(imagick, sepiatoneimage); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setimagebias); PHP_METHOD(imagick, setimagebiasquantum); #endif PHP_METHOD(imagick, setimageblueprimary); PHP_METHOD(imagick, setimagebordercolor); PHP_METHOD(imagick, setimagechanneldepth); PHP_METHOD(imagick, setimagecolormapcolor); PHP_METHOD(imagick, setimagecolorspace); PHP_METHOD(imagick, setimagedispose); PHP_METHOD(imagick, setimageextent); PHP_METHOD(imagick, setimagegreenprimary); PHP_METHOD(imagick, setimageinterlacescheme); PHP_METHOD(imagick, setimageprofile); PHP_METHOD(imagick, setimageredprimary); PHP_METHOD(imagick, setimagerenderingintent); PHP_METHOD(imagick, setimagevirtualpixelmethod); PHP_METHOD(imagick, setimagewhitepoint); PHP_METHOD(imagick, sigmoidalcontrastimage); PHP_METHOD(imagick, stereoimage); PHP_METHOD(imagick, textureimage); PHP_METHOD(imagick, tintimage); PHP_METHOD(imagick, unsharpmaskimage); PHP_METHOD(imagick, getimage); PHP_METHOD(imagick, setimage); PHP_METHOD(imagick, addimage); PHP_METHOD(imagick, newimage); PHP_METHOD(imagick, newpseudoimage); PHP_METHOD(imagick, getcompression); PHP_METHOD(imagick, getcompressionquality); PHP_METHOD(imagick, getcopyright); PHP_METHOD(imagick, getconfigureoptions); #if MagickLibVersion > 0x660 PHP_METHOD(imagick, getfeatures); #endif PHP_METHOD(imagick, getfilename); PHP_METHOD(imagick, getformat); PHP_METHOD(imagick, gethomeurl); PHP_METHOD(imagick, getinterlacescheme); PHP_METHOD(imagick, getoption); PHP_METHOD(imagick, getpackagename); PHP_METHOD(imagick, getpage); PHP_METHOD(imagick, gethdrienabled); PHP_METHOD(imagick, getquantum); PHP_METHOD(imagick, getquantumdepth); PHP_METHOD(imagick, getquantumrange); PHP_METHOD(imagick, getreleasedate); PHP_METHOD(imagick, getresource); PHP_METHOD(imagick, getresourcelimit); PHP_METHOD(imagick, getsamplingfactors); PHP_METHOD(imagick, getsize); PHP_METHOD(imagick, getversion); PHP_METHOD(imagick, setbackgroundcolor); PHP_METHOD(imagick, setcompression); PHP_METHOD(imagick, setcompressionquality); PHP_METHOD(imagick, setfilename); PHP_METHOD(imagick, setformat); PHP_METHOD(imagick, setinterlacescheme); PHP_METHOD(imagick, setoption); PHP_METHOD(imagick, setpage); PHP_METHOD(imagick, setresourcelimit); PHP_METHOD(imagick, setresolution); PHP_METHOD(imagick, setsamplingfactors); PHP_METHOD(imagick, setsize); PHP_METHOD(imagick, settype); PHP_METHOD(imagick, brightnesscontrastimage); #if MagickLibVersion > 0x661 PHP_METHOD(imagick, colormatriximage); #endif PHP_METHOD(imagick, selectiveblurimage); #if MagickLibVersion >= 0x689 PHP_METHOD(imagick, rotationalblurimage); #endif #if MagickLibVersion >= 0x687 PHP_METHOD(imagick, optimizeimagetransparency); #endif #if MagickLibVersion >= 0x683 PHP_METHOD(imagick, statisticimage); #endif #if MagickLibVersion >= 0x652 PHP_METHOD(imagick, subimagematch); #endif PHP_METHOD(imagick, setregistry); PHP_METHOD(imagick, getregistry); PHP_METHOD(imagick, listregistry); PHP_METHOD(imagick, morphology); #if MagickLibVersion < 0x700 PHP_METHOD(imagick, filter); #endif // #if MagickLibVersion < 0x700 PHP_METHOD(imagick, setantialias); PHP_METHOD(imagick, getantialias); #if MagickLibVersion > 0x676 PHP_METHOD(imagick, colordecisionlistimage); #endif #if MagickLibVersion >= 0x660 PHP_METHOD(imagick, autogammaimage); #endif //#if MagickLibVersion >= 0x660 #if MagickLibVersion >= 0x692 PHP_METHOD(imagick, autoorient); PHP_METHOD(imagick, compositeimagegravity); #endif // #if MagickLibVersion >= 0x692 #if MagickLibVersion >= 0x692 PHP_METHOD(imagick, localcontrastimage); #endif // #if MagickLibVersion >= 0x692 #if MagickLibVersion >= 0x700 PHP_METHOD(imagick, identifyimagetype); #endif // #if MagickLibVersion >= 0x700 #if IM_HAVE_IMAGICK_SETSEED PHP_METHOD(imagick, setSeed); #endif #if IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE PHP_METHOD(imagick, waveletDenoiseImage); #endif #if IM_HAVE_IMAGICK_MEANSHIFTIMAGE PHP_METHOD(imagick, meanShiftImage); #endif #if IM_HAVE_IMAGICK_KMEANSIMAGE PHP_METHOD(imagick, kmeansImage); #endif #if IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE PHP_METHOD(imagick, rangeThresholdImage); #endif #if IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE PHP_METHOD(imagick, autoThresholdImage); #endif #if IM_HAVE_IMAGICK_BILATERALBLURIMAGE PHP_METHOD(imagick, bilateralBlurImage); #endif #if IM_HAVE_IMAGICK_CLAHEIMAGE PHP_METHOD(imagick, claheImage); #endif #if IM_HAVE_IMAGICK_CHANNELFXIMAGE PHP_METHOD(imagick, channelFxImage); #endif #if IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE PHP_METHOD(imagick, colorThresholdImage); #endif #if IM_HAVE_IMAGICK_COMPLEXIMAGES PHP_METHOD(imagick, complexImages); #endif #if IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE PHP_METHOD(imagick, interpolativeResizeImage); #endif #if IM_HAVE_IMAGICK_LEVELIMAGECOLORS PHP_METHOD(imagick, levelImageColors); #endif #if IM_HAVE_IMAGICK_LEVELIZEIMAGE PHP_METHOD(imagick, levelizeImage); #endif #if IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE PHP_METHOD(imagick, orderedDitherImage); #endif #if IM_HAVE_IMAGICK_WHITEBALANCEIMAGE PHP_METHOD(imagick, whiteBalanceImage); #endif /* Forward declarations (ImagickDraw) */ #if MagickLibVersion > 0x628 PHP_METHOD(imagickdraw, resetvectorgraphics); #endif #if MagickLibVersion > 0x649 PHP_METHOD(imagickdraw, gettextkerning); PHP_METHOD(imagickdraw, settextkerning); PHP_METHOD(imagickdraw, gettextinterwordspacing); PHP_METHOD(imagickdraw, settextinterwordspacing); #endif #if MagickLibVersion > 0x655 PHP_METHOD(imagickdraw, gettextinterlinespacing); PHP_METHOD(imagickdraw, settextinterlinespacing); #endif PHP_METHOD(imagickdraw, __construct); PHP_METHOD(imagickdraw, setfillcolor); PHP_METHOD(imagickdraw, setfillalpha); PHP_METHOD(imagickdraw, setresolution); PHP_METHOD(imagickdraw, setstrokecolor); PHP_METHOD(imagickdraw, setstrokealpha); PHP_METHOD(imagickdraw, setstrokewidth); PHP_METHOD(imagickdraw, setfont); PHP_METHOD(imagickdraw, setfontfamily); PHP_METHOD(imagickdraw, setfontsize); PHP_METHOD(imagickdraw, setfontstyle); PHP_METHOD(imagickdraw, setfontweight); PHP_METHOD(imagickdraw, getfont); PHP_METHOD(imagickdraw, getfontfamily); PHP_METHOD(imagickdraw, getfontsize); PHP_METHOD(imagickdraw, getfontstyle); PHP_METHOD(imagickdraw, getfontweight); PHP_METHOD(imagickdraw, clear); PHP_METHOD(imagickdraw, destroy); PHP_METHOD(imagickdraw, annotation); PHP_METHOD(imagickdraw, settextantialias); PHP_METHOD(imagickdraw, settextencoding); PHP_METHOD(imagickdraw, rectangle); PHP_METHOD(imagickdraw, roundrectangle); PHP_METHOD(imagickdraw, ellipse); PHP_METHOD(imagickdraw, circle); PHP_METHOD(imagickdraw, skewx); PHP_METHOD(imagickdraw, skewy); PHP_METHOD(imagickdraw, translate); PHP_METHOD(imagickdraw, line); PHP_METHOD(imagickdraw, polygon); PHP_METHOD(imagickdraw, arc); #if MagickLibVersion >= 0x700 PHP_METHOD(imagickdraw, alpha); #else PHP_METHOD(imagickdraw, matte); #endif PHP_METHOD(imagickdraw, point); PHP_METHOD(imagickdraw, getfontstretch); PHP_METHOD(imagickdraw, setfontstretch); PHP_METHOD(imagickdraw, settextalignment); PHP_METHOD(imagickdraw, settextdecoration); PHP_METHOD(imagickdraw, settextundercolor); PHP_METHOD(imagickdraw, setviewbox); PHP_METHOD(imagickdraw, gettextdecoration); PHP_METHOD(imagickdraw, gettextencoding); PHP_METHOD(imagickdraw, clone); PHP_METHOD(imagickdraw, affine); PHP_METHOD(imagickdraw, bezier); PHP_METHOD(imagickdraw, composite); PHP_METHOD(imagickdraw, color); PHP_METHOD(imagickdraw, comment); PHP_METHOD(imagickdraw, getclippath); PHP_METHOD(imagickdraw, getcliprule); PHP_METHOD(imagickdraw, getclipunits); PHP_METHOD(imagickdraw, getfillcolor); PHP_METHOD(imagickdraw, getfillopacity); PHP_METHOD(imagickdraw, getfillrule); PHP_METHOD(imagickdraw, getgravity); PHP_METHOD(imagickdraw, getstrokeantialias); PHP_METHOD(imagickdraw, getstrokecolor); PHP_METHOD(imagickdraw, getstrokedasharray); PHP_METHOD(imagickdraw, getstrokedashoffset); PHP_METHOD(imagickdraw, getstrokelinecap); PHP_METHOD(imagickdraw, getstrokelinejoin); PHP_METHOD(imagickdraw, getstrokemiterlimit); PHP_METHOD(imagickdraw, getstrokeopacity); PHP_METHOD(imagickdraw, getstrokewidth); PHP_METHOD(imagickdraw, gettextalignment); PHP_METHOD(imagickdraw, gettextantialias); PHP_METHOD(imagickdraw, getvectorgraphics); PHP_METHOD(imagickdraw, gettextundercolor); PHP_METHOD(imagickdraw, pathclose); PHP_METHOD(imagickdraw, pathcurvetoabsolute); PHP_METHOD(imagickdraw, pathcurvetorelative); PHP_METHOD(imagickdraw, pathcurvetoquadraticbezierabsolute); PHP_METHOD(imagickdraw, pathcurvetoquadraticbezierrelative); PHP_METHOD(imagickdraw, pathcurvetoquadraticbeziersmoothabsolute); PHP_METHOD(imagickdraw, pathcurvetoquadraticbeziersmoothrelative); PHP_METHOD(imagickdraw, pathcurvetosmoothabsolute); PHP_METHOD(imagickdraw, pathcurvetosmoothrelative); PHP_METHOD(imagickdraw, pathellipticarcabsolute); PHP_METHOD(imagickdraw, pathellipticarcrelative); PHP_METHOD(imagickdraw, pathfinish); PHP_METHOD(imagickdraw, pathlinetoabsolute); PHP_METHOD(imagickdraw, pathlinetorelative); PHP_METHOD(imagickdraw, pathlinetohorizontalabsolute); PHP_METHOD(imagickdraw, pathlinetohorizontalrelative); PHP_METHOD(imagickdraw, pathlinetoverticalabsolute); PHP_METHOD(imagickdraw, pathlinetoverticalrelative); PHP_METHOD(imagickdraw, pathmovetoabsolute); PHP_METHOD(imagickdraw, pathmovetorelative); PHP_METHOD(imagickdraw, pathstart); PHP_METHOD(imagickdraw, polyline); PHP_METHOD(imagickdraw, popclippath); PHP_METHOD(imagickdraw, popdefs); PHP_METHOD(imagickdraw, poppattern); PHP_METHOD(imagickdraw, pushclippath); PHP_METHOD(imagickdraw, pushdefs); PHP_METHOD(imagickdraw, pushpattern); PHP_METHOD(imagickdraw, render); PHP_METHOD(imagickdraw, rotate); PHP_METHOD(imagickdraw, scale); PHP_METHOD(imagickdraw, setclippath); PHP_METHOD(imagickdraw, setcliprule); PHP_METHOD(imagickdraw, setclipunits); PHP_METHOD(imagickdraw, setfillopacity); PHP_METHOD(imagickdraw, setfillpatternurl); PHP_METHOD(imagickdraw, setfillrule); PHP_METHOD(imagickdraw, setgravity); PHP_METHOD(imagickdraw, setstrokepatternurl); PHP_METHOD(imagickdraw, setstrokeantialias); PHP_METHOD(imagickdraw, setstrokedasharray); PHP_METHOD(imagickdraw, setstrokedashoffset); PHP_METHOD(imagickdraw, setstrokelinecap); PHP_METHOD(imagickdraw, setstrokelinejoin); PHP_METHOD(imagickdraw, setstrokemiterlimit); PHP_METHOD(imagickdraw, setstrokeopacity); PHP_METHOD(imagickdraw, setvectorgraphics); PHP_METHOD(imagickdraw, pop); PHP_METHOD(imagickdraw, push); #if MagickLibVersion >= 0x693 PHP_METHOD(imagickdraw, getopacity); PHP_METHOD(imagickdraw, setopacity); #endif //MagickLibVersion >= 0x693 #if MagickLibVersion >= 0x675 PHP_METHOD(imagickdraw, getfontresolution); PHP_METHOD(imagickdraw, setfontresolution); PHP_METHOD(imagickdraw, getbordercolor); PHP_METHOD(imagickdraw, setbordercolor); #endif //#if MagickLibVersion >= 0x675 #if MagickLibVersion >= 0x693 PHP_METHOD(imagickdraw, setdensity); PHP_METHOD(imagickdraw, getdensity); #endif// #if MagickLibVersion >= 0x693 #if MagickLibVersion >= 0x692 PHP_METHOD(imagickdraw, gettextdirection); PHP_METHOD(imagickdraw, settextdirection); #endif //#if MagickLibVersion >= 0x692 /* Imagick Pixel iterator */ PHP_METHOD(imagickpixeliterator, __construct); PHP_METHOD(imagickpixeliterator, newpixeliterator); PHP_METHOD(imagickpixeliterator, newpixelregioniterator); PHP_METHOD(imagickpixeliterator, getpixeliterator); PHP_METHOD(imagickpixeliterator, getpixelregioniterator); PHP_METHOD(imagickpixeliterator, getiteratorrow); PHP_METHOD(imagickpixeliterator, setiteratorrow); PHP_METHOD(imagickpixeliterator, getpreviousiteratorrow); PHP_METHOD(imagickpixeliterator, getcurrentiteratorrow); PHP_METHOD(imagickpixeliterator, getnextiteratorrow); PHP_METHOD(imagickpixeliterator, setiteratorfirstrow); PHP_METHOD(imagickpixeliterator, setiteratorlastrow); PHP_METHOD(imagickpixeliterator, resetiterator); PHP_METHOD(imagickpixeliterator, synciterator); PHP_METHOD(imagickpixeliterator, destroy); PHP_METHOD(imagickpixeliterator, clear); PHP_METHOD(imagickpixeliterator, valid); /* ImagickPixel */ #if MagickLibVersion > 0x628 PHP_METHOD(imagickpixel, gethsl); PHP_METHOD(imagickpixel, sethsl); PHP_METHOD(imagickpixel, getcolorvaluequantum); PHP_METHOD(imagickpixel, setcolorvaluequantum); PHP_METHOD(imagickpixel, getindex); PHP_METHOD(imagickpixel, setindex); #endif PHP_METHOD(imagickpixel, __construct); PHP_METHOD(imagickpixel, setcolor); PHP_METHOD(imagickpixel, clear); PHP_METHOD(imagickpixel, destroy); PHP_METHOD(imagickpixel, ispixelsimilarquantum); PHP_METHOD(imagickpixel, ispixelsimilar); PHP_METHOD(imagickpixel, getcolorvalue); PHP_METHOD(imagickpixel, setcolorvalue); PHP_METHOD(imagickpixel, getcolor); PHP_METHOD(imagickpixel, getcolorquantum); PHP_METHOD(imagickpixel, getcolorasstring); PHP_METHOD(imagickpixel, getcolorcount); PHP_METHOD(imagickpixel, setcolorcount); PHP_METHOD(imagickpixel, clone); #if MagickLibVersion >= 0x693 PHP_METHOD(imagickpixel, setcolorfrompixel); #endif //#if MagickLibVersion >= 0x693 #ifdef IMAGICK_WITH_KERNEL PHP_METHOD(imagickkernel, __construct); PHP_METHOD(imagickkernel, frommatrix); PHP_METHOD(imagickkernel, frombuiltin); PHP_METHOD(imagickkernel, addkernel); PHP_METHOD(imagickkernel, getmatrix); PHP_METHOD(imagickkernel, separate); PHP_METHOD(imagickkernel, scale); PHP_METHOD(imagickkernel, addunitykernel); #endif #if MagickLibVersion < 0x700 #define KernelValueType double #else #define KernelValueType MagickRealType #endif // This is defined as 'UndefinedChannel' so that when the functions go through // the shim functions in shim_im6_to_im7.c I can check for whether the user actually // set the channel or not. #if MagickLibVersion >= 0x700 #define IM_DEFAULT_CHANNEL UndefinedChannel #else #define IM_DEFAULT_CHANNEL DefaultChannels #endif #endif /* PHP_IMAGICK_DEFS_H */ imagick-3.6.0/php_imagick_helpers.h0000644000000000000000000001074414145213431015774 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #ifndef PHP_IMAGICK_HELPERS_H # define PHP_IMAGICK_HELPERS_H void php_imagick_initialize_constants(TSRMLS_D); zend_bool php_imagick_check_font(char *font, int font_len TSRMLS_DC); zend_bool php_imagick_thumbnail_dimensions(MagickWand *magick_wand, zend_bool bestfit, im_long desired_width, im_long desired_height, im_long *new_width, im_long *new_height, zend_bool legacy); PointInfo *php_imagick_zval_to_pointinfo_array(zval *coordinate_array, int *num_elements TSRMLS_DC); double *php_imagick_zval_to_double_array(zval *param_array, im_long *num_elements TSRMLS_DC); im_long *php_imagick_zval_to_long_array(zval *param_array, im_long *num_elements TSRMLS_DC); unsigned char *php_imagick_zval_to_char_array(zval *param_array, im_long *num_elements TSRMLS_DC); MagickBooleanType php_imagick_progress_monitor(const char *text, const MagickOffsetType offset, const MagickSizeType span, void *client_data); void php_imagick_cleanup_progress_callback(php_imagick_callback* progress_callback TSRMLS_DC); MagickBooleanType php_imagick_progress_monitor_callable(const char *text, const MagickOffsetType offset, const MagickSizeType span, void *client_data); zend_bool php_imagick_validate_map(const char *map TSRMLS_DC); php_imagick_rw_result_t php_imagick_file_access_check (const char *filename TSRMLS_DC); PixelWand *php_imagick_zval_to_pixelwand (zval *param, php_imagick_class_type_t caller, zend_bool *allocated TSRMLS_DC); PixelWand *php_imagick_zval_to_opacity (zval *param, php_imagick_class_type_t caller, zend_bool *allocated TSRMLS_DC); char *php_imagick_set_locale (TSRMLS_D); void php_imagick_restore_locale (const char *old_locale); PixelWand *php_imagick_clone_pixelwand (PixelWand *source); void php_imagick_replace_magickwand (php_imagick_object *obj, MagickWand *new_wand); void php_imagick_replace_drawingwand (php_imagickdraw_object *obj, DrawingWand *new_wand); void php_imagick_replace_pixelwand (php_imagickpixel_object *obj, PixelWand *new_wand); zend_bool php_imagick_ensure_not_empty (MagickWand *magick_wand); zend_bool php_imagickpixel_ensure_not_null(PixelWand *pixel_wand); /* Defined in imagickpixeliterator_class.c */ void php_imagick_pixel_iterator_new (PixelIterator *pixel_it, zval *return_value TSRMLS_DC); /* Convert ImageMagick exception types to PHP exceptions */ void php_imagick_convert_imagick_exception (MagickWand *magick_wand, const char *default_message TSRMLS_DC); void php_imagick_convert_imagickdraw_exception (DrawingWand *drawing_wand, const char *default_message TSRMLS_DC); void php_imagick_convert_imagickpixeliterator_exception (PixelIterator *pixel_iterator, const char *default_message TSRMLS_DC); void php_imagick_convert_imagickpixel_exception (PixelWand *pixel_wand, const char *default_message TSRMLS_DC); /* Convert read or write failure to PHP exception */ void php_imagick_rw_fail_to_exception (MagickWand *magick_wand, php_imagick_rw_result_t rc, const char *filename TSRMLS_DC); void php_imagick_imagickdraw_rw_fail_to_exception (DrawingWand *drawing_wand, php_imagick_rw_result_t rc, const char *filename TSRMLS_DC); /* Throw an exception with message */ void php_imagick_throw_exception (php_imagick_class_type_t type, const char *description TSRMLS_DC); #endif /* PHP_IMAGICK_HELPERS_H */ imagick-3.6.0/php_imagick_macros.h0000644000000000000000000000430014145213431015605 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #ifndef PHP_IMAGICK_MACROS_H # define PHP_IMAGICK_MACROS_H #define IMAGICK_FREE_MAGICK_MEMORY(value) \ do { \ if (value) { \ MagickRelinquishMemory(value); \ value = NULL; \ } \ } while (0) #if !defined(E_DEPRECATED) # define E_DEPRECATED E_STRICT #endif #define IMAGICK_METHOD_DEPRECATED(class_name, method_name) \ php_error(E_DEPRECATED, "%s::%s method is deprecated and it's use should be avoided", class_name, method_name); #define IMAGICK_METHOD_DEPRECATED_USE_INSTEAD(class_name, method_name, new_class, new_method) \ php_error(E_DEPRECATED, "%s::%s is deprecated. %s::%s should be used instead", class_name, method_name, new_class, new_method); #define IMAGICK_KERNEL_NOT_NULL_EMPTY(kernel) \ if (kernel->kernel_info == NULL) { \ zend_throw_exception(php_imagickkernel_exception_class_entry, "ImagickKernel is empty, cannot be used", (long)0 TSRMLS_CC); \ RETURN_NULL(); \ } #endif /* PHP_IMAGICK_MACROS_H */ imagick-3.6.0/php_imagick_shared.h0000644000000000000000000000344414145213431015577 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #ifndef _PHP_IMAGICK_SHARED_H_ # define _PHP_IMAGICK_SHARED_H_ /* Should work with ImageMagick 6.x for now */ #include "php.h" #if defined(PHP_WIN32) && defined(IMAGICK_EXPORTS) #define PHP_IMAGICK_API __declspec(dllexport) #else #define PHP_IMAGICK_API PHPAPI #endif /* Allow extensions to use the class entries */ PHP_IMAGICK_API zend_class_entry *php_imagick_get_class_entry(); PHP_IMAGICK_API zend_class_entry *php_imagickdraw_get_class_entry(); PHP_IMAGICK_API zend_class_entry *php_imagickpixel_get_class_entry(); #endif imagick-3.6.0/php_imagick_file.h0000644000000000000000000000560614145213431015252 0ustar rootroot/* +----------------------------------------------------------------------+ | PHP Version 5 / Imagick | +----------------------------------------------------------------------+ | Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar | | ImageMagick (c) ImageMagick Studio LLC | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Mikko Kopppanen | | Scott MacVicar | +----------------------------------------------------------------------+ */ #ifndef PHP_IMAGICK_FILE_H # define PHP_IMAGICK_FILE_H #include "php_imagick.h" #include "php_imagick_defs.h" typedef enum { ImagickUndefinedType, /* Don't know */ ImagickFile, /* Use ImageMagick to read the file */ ImagickUri, /* Use PHP streams to read the file */ ImagickVirtualFormat, /* The file is a virtual, use ImageMagick */ } ImagickFileType; struct php_imagick_file_t { /* The file type */ ImagickFileType type; /* Absolute path to the file, emalloced */ char *absolute_path; size_t absolute_path_len; /* Original filename */ char filename[MaxTextExtent]; size_t filename_len; }; typedef enum { ImagickUndefinedOperation, ImagickReadImage, ImagickPingImage, ImagickWriteImage, ImagickWriteImages, ImagickWriteImageFile, ImagickWriteImagesFile, ImagickReadImageFile, ImagickPingImageFile, } ImagickOperationType; zend_bool php_imagick_file_init(struct php_imagick_file_t *file, const char *filename, size_t filename_len TSRMLS_DC); void php_imagick_file_deinit(struct php_imagick_file_t *file); int php_imagick_safe_mode_check(const char *filename TSRMLS_DC); /* Read operations */ php_imagick_rw_result_t php_imagick_read_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC); /* Write operations */ php_imagick_rw_result_t php_imagick_write_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type, zend_bool adjoin TSRMLS_DC); /* Handle streams */ zend_bool php_imagick_stream_handler(php_imagick_object *intern, php_stream *stream, ImagickOperationType type TSRMLS_DC); #endif /* PHP_IMAGICK_FILE_H */imagick-3.6.0/shim_im6_to_im7.c0000644000000000000000000005727614145213431014776 0ustar rootroot /* +----------------------------------------------------------------------+ | Imagick | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ #include "php_imagick.h" #include "php_imagick_defs.h" #include "php_imagick_macros.h" #include "php_imagick_helpers.h" #include "php_imagick_file.h" #if MagickLibVersion >= 0x700 // Functions that have been replaced by channel aware versions MagickBooleanType MagickAdaptiveBlurImageChannel(MagickWand *wand,const ChannelType channel,const double radius, const double sigma) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickAdaptiveBlurImage(wand, radius, sigma); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickAdaptiveSharpenImageChannel(MagickWand *wand, const ChannelType channel, const double radius, const double sigma) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickAdaptiveSharpenImage(wand, radius, sigma); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickAddNoiseImageChannel(MagickWand *wand,const ChannelType channel,const NoiseType noise_type) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } //TODO - what is the value meant to be? status = MagickAddNoiseImage(wand, noise_type, 1.0); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } // This is not actually an ImageMagick function, but the name is likely to // avoid any symbol clash for the foreseeable. MagickBooleanType MagickAddNoiseImageChannelWithAttenuate(MagickWand *wand,const ChannelType channel,const NoiseType noise_type, double attenuate) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickAddNoiseImage(wand, noise_type, attenuate); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickAutoGammaImageChannel(MagickWand *wand, const ChannelType channel) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickAutoGammaImage(wand); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickAutoLevelImageChannel(MagickWand *wand, const ChannelType channel) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickAutoLevelImage(wand); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickBlurImage(wand, radius,sigma); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickBrightnessContrastImageChannel(MagickWand *wand,const ChannelType channel,const double brightness, const double contrast) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickBrightnessContrastImage(wand, brightness, contrast); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickClampImageChannel(MagickWand *wand, const ChannelType channel) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickClampImage(wand); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickClutImageChannel(MagickWand *wand, const ChannelType channel, const MagickWand *clut_wand) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } //TODO - need to take parameter status = MagickClutImage(wand, clut_wand, AverageInterpolatePixel); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickCompositeImageChannel(MagickWand *wand, const ChannelType channel,const MagickWand *source_wand, const CompositeOperator compose,const ssize_t x,const ssize_t y) { MagickBooleanType status; ChannelType previous_channel_mask; long clip_to_self = 1; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickCompositeImage(wand, source_wand, compose, clip_to_self, x,y); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickWand *MagickCompareImageChannels(MagickWand *wand, const MagickWand *reference, const ChannelType channel, const MetricType metric, double *distortion) { MagickWand *tmp_wand; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } tmp_wand = MagickCompareImages(wand, reference, metric, distortion); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return tmp_wand; } MagickBooleanType MagickContrastStretchImageChannel(MagickWand *wand, const ChannelType channel,const double black_point, const double white_point) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickContrastStretchImage(wand, black_point, white_point); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickConvolveImageChannel(MagickWand *wand, const ChannelType channel, const KernelInfo *kernel){ MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickConvolveImage(wand, kernel); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickEqualizeImageChannel(MagickWand *wand, const ChannelType channel) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickEqualizeImage(wand); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickEvaluateImageChannel(MagickWand *wand, const ChannelType channel,const MagickEvaluateOperator op,const double value) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickEvaluateImage(wand,op,value); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } //MagickBooleanType MagickFilterImageChannel(MagickWand *wand, // const ChannelType channel,const KernelInfo *kernel) { // MagickBooleanType status; // ChannelType previous_channel_mask; // // if (channel != UndefinedChannel) { // previous_channel_mask = MagickSetImageChannelMask(wand, channel); // } // // status = MagickFilterImage(wand, kernel); // // if (channel != UndefinedChannel) { // (void) MagickSetImageChannelMask(wand, previous_channel_mask); // } // // return status; //} MagickBooleanType MagickFloodfillPaintImageChannel(MagickWand *wand, const ChannelType channel,const PixelWand *fill,const double fuzz, const PixelWand *bordercolor,const ssize_t x,const ssize_t y, const MagickBooleanType invert) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickFloodfillPaintImage(wand, fill, fuzz, bordercolor, x, y, invert); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickFunctionImageChannel(MagickWand *wand, const ChannelType channel,const MagickFunction function, const size_t number_arguments,const double *arguments) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickFunctionImage(wand,function,number_arguments,arguments); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickWand *MagickFxImageChannel(MagickWand *wand, const ChannelType channel,const char *expression) { MagickWand *result_wand; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } result_wand = MagickFxImage(wand, expression); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return result_wand; } MagickBooleanType MagickGammaImageChannel(MagickWand *wand, const ChannelType channel,const double gamma) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickGammaImage(wand,gamma); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickGaussianBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickGaussianBlurImage(wand,radius,sigma); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } size_t MagickGetImageChannelDepth(MagickWand *wand, const ChannelType channel) { size_t depth; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } depth = MagickGetImageDepth(wand); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return depth; } MagickBooleanType MagickGetImageChannelMean(MagickWand *wand, const ChannelType channel,double *mean, double *standard_deviation) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickGetImageMean(wand, mean, standard_deviation); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickSetImageChannelDepth(MagickWand *wand, const ChannelType channel, const size_t depth) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickSetImageDepth(wand, depth); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickGetImageChannelDistortion(MagickWand *wand, const MagickWand *reference,const ChannelType channel,const MetricType metric, double *distortion) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickGetImageDistortion(wand, reference, metric, distortion); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickGetImageChannelKurtosis(MagickWand *wand,const ChannelType channel, double *kurtosis,double *skewness) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickGetImageKurtosis(wand,kurtosis,skewness); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickGetImageChannelRange(MagickWand *wand,const ChannelType channel,double *minima, double *maxima) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickGetImageRange(wand, minima, maxima); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickOrderedPosterizeImageChannel(MagickWand *wand,const ChannelType channel, const char *threshold_map) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickOrderedDitherImage(wand, threshold_map); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } ChannelStatistics *MagickGetImageChannelStatistics(MagickWand *wand) { return MagickGetImageStatistics(wand); } MagickBooleanType MagickHaldClutImageChannel(MagickWand *wand, const ChannelType channel,const MagickWand *hald_wand) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickHaldClutImage(wand, hald_wand); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickLevelImageChannel(MagickWand *wand, const ChannelType channel,const double black_point,const double gamma, const double white_point) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickLevelImage(wand,black_point,gamma, white_point); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickMorphologyImageChannel(MagickWand *wand, ChannelType channel,MorphologyMethod method,const ssize_t iterations, KernelInfo *kernel) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickMorphologyImage(wand, method, iterations, kernel); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickMotionBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma, const double angle) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickMotionBlurImage(wand, radius, sigma,angle); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickNegateImageChannel(MagickWand *wand,const ChannelType channel,const MagickBooleanType gray) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickNegateImage(wand, gray); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickNormalizeImageChannel(MagickWand *wand, const ChannelType channel) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickNormalizeImage(wand); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickOpaquePaintImageChannel(MagickWand *wand, const ChannelType channel,const PixelWand *target, const PixelWand *fill,const double fuzz,const MagickBooleanType invert) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickOpaquePaintImage(wand, target, fill, fuzz, invert); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickRandomThresholdImageChannel(MagickWand *wand, const ChannelType channel,const double low,const double high) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickRandomThresholdImage(wand, low, high); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickRotationalBlurImageChannel(MagickWand *wand, const ChannelType channel,const double angle) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickRotationalBlurImage(wand, angle); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickSelectiveBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma, const double threshold) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickSelectiveBlurImage(wand, radius, sigma, threshold); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickSeparateImageChannel(MagickWand *wand,const ChannelType channel) { return MagickSeparateImage(wand, channel); } MagickBooleanType MagickSharpenImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickSharpenImage(wand, radius, sigma); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickSigmoidalContrastImageChannel( MagickWand *wand,const ChannelType channel,const MagickBooleanType sharpen, const double alpha,const double beta) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickSigmoidalContrastImage(wand, sharpen, alpha, beta); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickSolarizeImageChannel(MagickWand *wand, const ChannelType channel,const double threshold) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickSolarizeImage(wand, threshold); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickSparseColorImageChannel(MagickWand *wand, const ChannelType channel,const SparseColorMethod method, const size_t number_arguments,const double *arguments) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickSparseColorImage(wand, method, number_arguments, arguments); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } MagickBooleanType MagickStatisticImageChannel(MagickWand *wand, const ChannelType channel,const StatisticType type,const size_t width, const size_t height) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickStatisticImage(wand, type, width, height); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } //MagickBooleanType MagickThresholdImageChannel(MagickWand *wand, // const ChannelType channel,const double threshold) { // MagickBooleanType status; // ChannelType previous_channel_mask; // // if (channel != UndefinedChannel) { // previous_channel_mask = MagickSetImageChannelMask(wand, channel); // } // // status = MagickThresholdImage(wand, threshold); // // if (channel != UndefinedChannel) { // (void) MagickSetImageChannelMask(wand, previous_channel_mask); // } // // return status; //} MagickBooleanType MagickUnsharpMaskImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma, const double amount,const double threshold) { MagickBooleanType status; ChannelType previous_channel_mask; if (channel != UndefinedChannel) { previous_channel_mask = MagickSetImageChannelMask(wand, channel); } status = MagickUnsharpMaskImage(wand, radius, sigma, amount, threshold); if (channel != UndefinedChannel) { (void) MagickSetImageChannelMask(wand, previous_channel_mask); } return status; } #endifimagick-3.6.0/shim_im6_to_im7.h0000644000000000000000000001610414145213431014764 0ustar rootroot #if MagickLibVersion >= 0x700 // Functions that have been renamed ChannelStatistics *MagickGetImageChannelStatistics(MagickWand *wand); MagickWand *MagickCompareImageChannels( MagickWand *wand, const MagickWand *reference, const ChannelType channel, const MetricType metric, double *distortion ); MagickBooleanType MagickConvolveImageChannel(MagickWand *wand, const ChannelType channel, const KernelInfo *kernel); //Function that used to be channel only MagickBooleanType MagickFloodfillPaintImageChannel(MagickWand *wand, const ChannelType channel,const PixelWand *fill,const double fuzz, const PixelWand *bordercolor,const ssize_t x,const ssize_t y, const MagickBooleanType invert ); MagickBooleanType MagickSparseColorImageChannel(MagickWand *wand, const ChannelType channel,const SparseColorMethod method, const size_t number_arguments,const double *arguments); // Functions that have been replaced by channel aware versions MagickBooleanType MagickAdaptiveBlurImageChannel( MagickWand *magick_wand, const ChannelType channel, const double radius, const double sigma ); MagickBooleanType MagickAdaptiveSharpenImageChannel( MagickWand *wand, const ChannelType channel, const double radius, const double sigma ); MagickBooleanType MagickAddNoiseImageChannel( MagickWand *wand, const ChannelType channel, const NoiseType noise_type ); MagickBooleanType MagickAddNoiseImageChannelWithAttenuate( MagickWand *wand, const ChannelType channel, const NoiseType noise_type, double attenuate ); MagickBooleanType MagickAutoGammaImageChannel(MagickWand *wand, const ChannelType channel); MagickBooleanType MagickAutoLevelImageChannel(MagickWand *wand, const ChannelType channel); MagickBooleanType MagickBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma); MagickBooleanType MagickBrightnessContrastImageChannel(MagickWand *wand, const ChannelType channel,const double brightness, const double contrast); MagickBooleanType MagickClampImageChannel(MagickWand *wand, const ChannelType channel); MagickBooleanType MagickClutImageChannel(MagickWand *wand, const ChannelType channel,const MagickWand *clut_wand); MagickBooleanType MagickCompositeImageChannel(MagickWand *wand, const ChannelType channel,const MagickWand *composite_wand, const CompositeOperator compose,const ssize_t x,const ssize_t y); MagickBooleanType MagickContrastStretchImageChannel(MagickWand *wand, const ChannelType channel,const double black_point, const double white_point); MagickBooleanType MagickEqualizeImageChannel(MagickWand *wand, const ChannelType channel); MagickBooleanType MagickEvaluateImageChannel(MagickWand *wand, const ChannelType channel,const MagickEvaluateOperator op, const double value); MagickBooleanType MagickGetImageChannelDistortion(MagickWand *wand, const MagickWand *reference,const ChannelType channel,const MetricType metric, double *distortion); MagickBooleanType MagickGetImageChannelKurtosis(MagickWand *wand,const ChannelType channel, double *kurtosis,double *skewness); MagickBooleanType MagickGetImageChannelRange(MagickWand *wand,const ChannelType channel,double *minima, double *maxima); size_t MagickGetImageChannelDepth(MagickWand *wand, const ChannelType channel); MagickBooleanType MagickSetImageChannelDepth(MagickWand *wand, const ChannelType channel, const size_t depth); MagickBooleanType MagickGetImageChannelMean(MagickWand *wand, const ChannelType channel,double *mean, double *standard_deviation); //MagickBooleanType MagickFilterImageChannel(MagickWand *wand, // const ChannelType channel,const KernelInfo *kernel); MagickBooleanType MagickOrderedPosterizeImageChannel(MagickWand *wand,const ChannelType channel, const char *threshold_map); MagickBooleanType MagickFloodfillPaintImageChannel( MagickWand *wand, const ChannelType channel, const PixelWand *fill,const double fuzz, const PixelWand *bordercolor,const ssize_t x,const ssize_t y, const MagickBooleanType invert ); MagickBooleanType MagickFunctionImageChannel(MagickWand *wand, const ChannelType channel,const MagickFunction function, const size_t number_arguments,const double *arguments); MagickWand *MagickFxImageChannel( MagickWand *wand, const ChannelType channel, const char *expression ); MagickBooleanType MagickGammaImageChannel(MagickWand *wand, const ChannelType channel,const double gamma); MagickBooleanType MagickGaussianBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma); MagickBooleanType MagickHaldClutImageChannel(MagickWand *wand, const ChannelType channel,const MagickWand *hald_wand); MagickBooleanType MagickLevelImageChannel(MagickWand *wand, const ChannelType channel,const double black_point,const double gamma, const double white_point); MagickBooleanType MagickMorphologyImageChannel(MagickWand *wand, ChannelType channel,MorphologyMethod method,const ssize_t iterations, KernelInfo *kernel); MagickBooleanType MagickMotionBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma, const double angle); MagickBooleanType MagickNegateImageChannel(MagickWand *wand, const ChannelType channel,const MagickBooleanType gray); MagickBooleanType MagickNormalizeImageChannel(MagickWand *wand, const ChannelType channel); MagickBooleanType MagickOpaquePaintImageChannel(MagickWand *wand, const ChannelType channel,const PixelWand *target, const PixelWand *fill,const double fuzz,const MagickBooleanType invert); MagickBooleanType MagickOrderedPosterizeImageChannel(MagickWand *wand, const ChannelType channel,const char *threshold_map); MagickBooleanType MagickRandomThresholdImageChannel(MagickWand *wand, const ChannelType channel,const double low,const double high); MagickBooleanType MagickRotationalBlurImageChannel(MagickWand *wand, const ChannelType channel,const double angle); MagickBooleanType MagickSelectiveBlurImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma, const double threshold); MagickBooleanType MagickSharpenImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma); MagickBooleanType MagickSigmoidalContrastImageChannel(MagickWand *wand, const ChannelType channel,const MagickBooleanType sharpen, const double alpha,const double beta); MagickBooleanType MagickSolarizeImageChannel(MagickWand *wand, const ChannelType channel,const double threshold); MagickBooleanType MagickStatisticImageChannel(MagickWand *wand, const ChannelType channel,const StatisticType type,const size_t width, const size_t height); MagickBooleanType MagickThresholdImageChannel(MagickWand *wand, const ChannelType channel,const double threshold); MagickBooleanType MagickUnsharpMaskImageChannel(MagickWand *wand, const ChannelType channel,const double radius,const double sigma, const double amount,const double threshold); PixelInterpolateMethod MagickGetImageInterpolateMethod(MagickWand *); MagickBooleanType MagickSetImageInterpolateMethod(MagickWand *wand, const PixelInterpolateMethod method); double DrawGetStrokeOpacity(const DrawingWand *wand); #endifimagick-3.6.0/shim_php7_to_php8.h0000644000000000000000000000120014145213431015321 0ustar rootroot #if PHP_VERSION_ID < 80100 #define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ ZEND_BEGIN_ARG_INFO_EX(name, return_reference, required_num_args, allow_null) #endif #if PHP_VERSION_ID < 80000 // Allow the generated stubs to work on previous versions of PHP #define ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, type_hint, allow_null, default_value) \ ZEND_ARG_INFO(pass_by_ref, name) #define ZEND_ARG_OBJ_TYPE_MASK(pass_by_ref, name, class_name, type_mask, default_value) \ ZEND_ARG_INFO(pass_by_ref, name) #define MAY_BE_STRING "" #endif imagick-3.6.0/ImagickPixel_arginfo.h0000644000000000000000000002403414145213431016047 0ustar rootroot/* This is a generated file, edit the .stub.php file instead. * Stub hash: regen with 'sh regen_arginfo.sh' * file has been fixedup for different versions */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel___construct, 0, 0, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, color, IS_STRING, 1, "null") #else ZEND_ARG_INFO(0, color) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_clear, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_clear, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixel_destroy arginfo_class_ImagickPixel_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_getColor, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_getColor, 0, 0, 0) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, normalized, IS_LONG, 0, "0") #else ZEND_ARG_INFO(0, normalized) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_getColorAsString, 0, 0, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_getColorAsString, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_getColorCount, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_getColorCount, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_getColorQuantum, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_getColorQuantum, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_getColorValue, 0, 1, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_getColorValue, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color, IS_LONG, 0) #else ZEND_ARG_INFO(0, color) #endif ZEND_END_ARG_INFO() #if MAGICKCORE_HDRI_ENABLE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_getColorValueQuantum, 0, 1, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_getColorValueQuantum, 0, 0, 1) #endif #else #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_getColorValueQuantum, 0, 1, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_getColorValueQuantum, 0, 0, 1) #endif #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color, IS_LONG, 0) #else ZEND_ARG_INFO(0, color) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixel_getHSL arginfo_class_ImagickPixel_getColorQuantum #define arginfo_class_ImagickPixel_getIndex arginfo_class_ImagickPixel_getColorCount #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_isPixelSimilar, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_isPixelSimilar, 0, 0, 2) #endif ZEND_ARG_OBJ_TYPE_MASK(0, color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_isPixelSimilarQuantum, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_isPixelSimilarQuantum, 0, 0, 2) #endif ZEND_ARG_OBJ_TYPE_MASK(0, color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz_quantum_range_scaled_by_square_root_of_three, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz_quantum_range_scaled_by_square_root_of_three) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixel_isSimilar arginfo_class_ImagickPixel_isPixelSimilarQuantum #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_setColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_setColor, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color, IS_STRING, 0) #else ZEND_ARG_INFO(0, color) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_setColorCount, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_setColorCount, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color_count, IS_LONG, 0) #else ZEND_ARG_INFO(0, color_count) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_setColorValue, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_setColorValue, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color, IS_LONG, 0) #else ZEND_ARG_INFO(0, color) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, value) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_setColorValueQuantum, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_setColorValueQuantum, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color, IS_LONG, 0) #else ZEND_ARG_INFO(0, color) #endif #if MAGICKCORE_HDRI_ENABLE #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, value) #endif #else #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) #else ZEND_ARG_INFO(0, value) #endif #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_setHSL, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_setHSL, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, hue, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, hue) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, saturation, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, saturation) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, luminosity, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, luminosity) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_setIndex, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_setIndex, 0, 0, 1) #endif #if MAGICKCORE_HDRI_ENABLE #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, index, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, index) #endif #else #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) #else ZEND_ARG_INFO(0, index) #endif #endif ZEND_END_ARG_INFO() #if MagickLibVersion >= 0x693 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixel_setColorFromPixel, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixel_setColorFromPixel, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, pixel, ImagickPixel, 0) ZEND_END_ARG_INFO() #endif ZEND_METHOD(ImagickPixel, __construct); ZEND_METHOD(ImagickPixel, clear); ZEND_METHOD(ImagickPixel, getColor); ZEND_METHOD(ImagickPixel, getColorAsString); ZEND_METHOD(ImagickPixel, getColorCount); ZEND_METHOD(ImagickPixel, getColorQuantum); ZEND_METHOD(ImagickPixel, getColorValue); ZEND_METHOD(ImagickPixel, getColorValueQuantum); ZEND_METHOD(ImagickPixel, getHSL); ZEND_METHOD(ImagickPixel, getIndex); ZEND_METHOD(ImagickPixel, isPixelSimilar); ZEND_METHOD(ImagickPixel, isPixelSimilarQuantum); ZEND_METHOD(ImagickPixel, setColor); ZEND_METHOD(ImagickPixel, setColorCount); ZEND_METHOD(ImagickPixel, setColorValue); ZEND_METHOD(ImagickPixel, setColorValueQuantum); ZEND_METHOD(ImagickPixel, setHSL); ZEND_METHOD(ImagickPixel, setIndex); #if MagickLibVersion >= 0x693 ZEND_METHOD(ImagickPixel, setColorFromPixel); #endif static const zend_function_entry class_ImagickPixel_methods[] = { ZEND_ME(ImagickPixel, __construct, arginfo_class_ImagickPixel___construct, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, clear, arginfo_class_ImagickPixel_clear, ZEND_ACC_PUBLIC) ZEND_MALIAS(ImagickPixel, destroy, clear, arginfo_class_ImagickPixel_destroy, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getColor, arginfo_class_ImagickPixel_getColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getColorAsString, arginfo_class_ImagickPixel_getColorAsString, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getColorCount, arginfo_class_ImagickPixel_getColorCount, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getColorQuantum, arginfo_class_ImagickPixel_getColorQuantum, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getColorValue, arginfo_class_ImagickPixel_getColorValue, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getColorValueQuantum, arginfo_class_ImagickPixel_getColorValueQuantum, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getHSL, arginfo_class_ImagickPixel_getHSL, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, getIndex, arginfo_class_ImagickPixel_getIndex, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, isPixelSimilar, arginfo_class_ImagickPixel_isPixelSimilar, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, isPixelSimilarQuantum, arginfo_class_ImagickPixel_isPixelSimilarQuantum, ZEND_ACC_PUBLIC) ZEND_MALIAS(ImagickPixel, isSimilar, isPixelSimilarQuantum, arginfo_class_ImagickPixel_isSimilar, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, setColor, arginfo_class_ImagickPixel_setColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, setColorCount, arginfo_class_ImagickPixel_setColorCount, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, setColorValue, arginfo_class_ImagickPixel_setColorValue, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, setColorValueQuantum, arginfo_class_ImagickPixel_setColorValueQuantum, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, setHSL, arginfo_class_ImagickPixel_setHSL, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixel, setIndex, arginfo_class_ImagickPixel_setIndex, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x693 ZEND_ME(ImagickPixel, setColorFromPixel, arginfo_class_ImagickPixel_setColorFromPixel, ZEND_ACC_PUBLIC) #endif ZEND_FE_END };imagick-3.6.0/Imagick_arginfo.h0000644000000000000000000063377514145213431015067 0ustar rootroot/* This is a generated file, edit the .stub.php file instead. * Stub hash: regen with 'sh regen_arginfo.sh' * file has been fixedup for different versions */ #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_optimizeImageLayers, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_optimizeImageLayers, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_compareImageLayers, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_compareImageLayers, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, metric, IS_LONG, 0) #else ZEND_ARG_INFO(0, metric) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_pingImageBlob, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_pingImageBlob, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, image, IS_STRING, 0) #else ZEND_ARG_INFO(0, image) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_pingImageFile, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_pingImageFile, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filehandle, IS_MIXED, 0) #else ZEND_ARG_INFO(0, filehandle) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null") #else ZEND_ARG_INFO(0, filename) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_transposeImage arginfo_class_Imagick_optimizeImageLayers #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_transverseImage arginfo_class_Imagick_optimizeImageLayers #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_trimImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_trimImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_waveImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_waveImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, amplitude, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, amplitude) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, length, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, length) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_vignetteImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_vignetteImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, black_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, black_point) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, white_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, white_point) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_uniqueImageColors arginfo_class_Imagick_optimizeImageLayers #endif #if MagickLibVersion > 0x628 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageMatte, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageMatte, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageMatte, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageMatte, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, matte, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, matte) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_adaptiveResizeImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_adaptiveResizeImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bestfit, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, bestfit) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_sketchImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_sketchImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_shadeImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_shadeImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gray, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, gray) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, azimuth, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, azimuth) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, elevation, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, elevation) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getSizeOffset, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getSizeOffset, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setSizeOffset, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setSizeOffset, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) #else ZEND_ARG_INFO(0, offset) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_adaptiveBlurImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_adaptiveBlurImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_contrastStretchImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_contrastStretchImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, black_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, black_point) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, white_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, white_point) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_adaptiveSharpenImage arginfo_class_Imagick_adaptiveBlurImage #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_randomThresholdImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_randomThresholdImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, low, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, low) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, high, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, high) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_roundCornersImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_roundCornersImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x_rounding, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x_rounding) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y_rounding, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y_rounding) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, stroke_width, IS_DOUBLE, 0, "10") #else ZEND_ARG_INFO(0, stroke_width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, displace, IS_DOUBLE, 0, "5") #else ZEND_ARG_INFO(0, displace) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, size_correction, IS_DOUBLE, 0, "-6") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_roundCorners arginfo_class_Imagick_roundCornersImage #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setIteratorIndex, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setIteratorIndex, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) #else ZEND_ARG_INFO(0, index) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_getIteratorIndex arginfo_class_Imagick_getSizeOffset #endif #if MagickLibVersion > 0x628 && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_transformImage, 0, 2, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_transformImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, crop, IS_STRING, 0) #else ZEND_ARG_INFO(0, crop) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, geometry, IS_STRING, 0) #else ZEND_ARG_INFO(0, geometry) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x630 && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageOpacity, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageOpacity, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, opacity, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, opacity) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x630 && MagickLibVersion >= 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageAlpha, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageAlpha, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, alpha, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, alpha) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x630 && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_orderedPosterizeImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_orderedPosterizeImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold_map, IS_STRING, 0) #else ZEND_ARG_INFO(0, threshold_map) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_polaroidImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_polaroidImage, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, settings, ImagickDraw, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageProperty, 0, 1, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageProperty, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) #else ZEND_ARG_INFO(0, name) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageProperty, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageProperty, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) #else ZEND_ARG_INFO(0, name) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) #else ZEND_ARG_INFO(0, value) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_deleteImageProperty, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_deleteImageProperty, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) #else ZEND_ARG_INFO(0, name) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_identifyFormat, 0, 1, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_identifyFormat, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) #else ZEND_ARG_INFO(0, format) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 && IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageInterpolateMethod, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageInterpolateMethod, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) #else ZEND_ARG_INFO(0, method) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageInterpolateMethod, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageInterpolateMethod, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_linearStretchImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_linearStretchImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, black_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, black_point) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, white_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, white_point) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x631 #define arginfo_class_Imagick_getImageLength arginfo_class_Imagick_getImageInterpolateMethod #endif #if MagickLibVersion > 0x631 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_extentImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_extentImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x633 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageOrientation, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageOrientation, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x633 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageOrientation, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageOrientation, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, orientation, IS_LONG, 0) #else ZEND_ARG_INFO(0, orientation) #endif ZEND_END_ARG_INFO() #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion > 0x634 && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_paintFloodfillImage, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_paintFloodfillImage, 0, 0, 5) #endif ZEND_ARG_OBJ_TYPE_MASK(0, fill_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_ARG_OBJ_TYPE_MASK(0, border_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_clutImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_clutImage, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, lookup_table, Imagick, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageProperties, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageProperties, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"*\"") #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, include_values, _IS_BOOL, 0, "true") #else ZEND_ARG_INFO(0, include_values) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 #define arginfo_class_Imagick_getImageProfiles arginfo_class_Imagick_getImageProperties #endif #if MagickLibVersion > 0x635 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_distortImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_distortImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, distortion, IS_LONG, 0) #else ZEND_ARG_INFO(0, distortion) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, arguments, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, arguments) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bestfit, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, bestfit) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_writeImageFile, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImageFile, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filehandle, IS_MIXED, 0) #else ZEND_ARG_INFO(0, filehandle) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 1, "null") #else ZEND_ARG_INFO(0, format) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 #define arginfo_class_Imagick_writeImagesFile arginfo_class_Imagick_writeImageFile #endif #if MagickLibVersion > 0x635 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_resetImagePage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_resetImagePage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, page, IS_STRING, 0) #else ZEND_ARG_INFO(0, page) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageClipMask, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageClipMask, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, clip_mask, imagick, 0) ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getImageClipMask, 0, 0, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageClipMask, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_animateImages, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_animateImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x_server, IS_STRING, 0) #else ZEND_ARG_INFO(0, x_server) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x635 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_recolorImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_recolorImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, matrix, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, matrix) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x636 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setFont, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setFont, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, font, IS_STRING, 0) #else ZEND_ARG_INFO(0, font) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x636 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getFont, 0, 0, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getFont, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x636 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setPointSize, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setPointSize, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, point_size, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, point_size) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x636 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getPointSize, 0, 0, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getPointSize, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x636 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_mergeImageLayers, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_mergeImageLayers, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, layermethod, IS_LONG, 0) #else ZEND_ARG_INFO(0, layermethod) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x637 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageAlphaChannel, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageAlphaChannel, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, alphachannel, IS_LONG, 0) #else ZEND_ARG_INFO(0, alphachannel) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x637 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_floodfillPaintImage, 0, 6, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_floodfillPaintImage, 0, 0, 6) #endif ZEND_ARG_OBJ_TYPE_MASK(0, fill_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_ARG_OBJ_TYPE_MASK(0, border_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, invert, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, invert) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 1, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x637 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_opaquePaintImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_opaquePaintImage, 0, 0, 4) #endif ZEND_ARG_OBJ_TYPE_MASK(0, target_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_ARG_OBJ_TYPE_MASK(0, fill_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, invert, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, invert) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x637 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_transparentPaintImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_transparentPaintImage, 0, 0, 4) #endif ZEND_ARG_OBJ_TYPE_MASK(0, target_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, alpha, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, alpha) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, invert, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, invert) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x638 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_liquidRescaleImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_liquidRescaleImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, delta_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, delta_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rigidity, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, rigidity) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x638 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_encipherImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_encipherImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 0) #else ZEND_ARG_INFO(0, passphrase) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x638 #define arginfo_class_Imagick_decipherImage arginfo_class_Imagick_encipherImage #endif #if MagickLibVersion > 0x639 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setGravity, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setGravity, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gravity, IS_LONG, 0) #else ZEND_ARG_INFO(0, gravity) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x639 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getGravity, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getGravity, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x639 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageChannelRange, 0, 1, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageChannelRange, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x639 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageAlphaChannel, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageAlphaChannel, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x642 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageChannelDistortions, 0, 2, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageChannelDistortions, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, reference_image, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, metric, IS_LONG, 0) #else ZEND_ARG_INFO(0, metric) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x643 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageGravity, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageGravity, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gravity, IS_LONG, 0) #else ZEND_ARG_INFO(0, gravity) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x643 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageGravity, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageGravity, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x645 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_importImagePixels, 0, 7, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_importImagePixels, 0, 0, 7) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, map, IS_STRING, 0) #else ZEND_ARG_INFO(0, map) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pixelstorage, IS_LONG, 0) #else ZEND_ARG_INFO(0, pixelstorage) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pixels, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, pixels) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x645 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_deskewImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_deskewImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, threshold) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x645 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_segmentImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_segmentImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, colorspace, IS_LONG, 0) #else ZEND_ARG_INFO(0, colorspace) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, cluster_threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, cluster_threshold) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, smooth_threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, smooth_threshold) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, verbose, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, verbose) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x645 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_sparseColorImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_sparseColorImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sparsecolormethod, IS_LONG, 0) #else ZEND_ARG_INFO(0, sparsecolormethod) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, arguments, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, arguments) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x645 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_remapImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_remapImage, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, replacement, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dither_method, IS_LONG, 0) #else ZEND_ARG_INFO(0, dither_method) #endif ZEND_END_ARG_INFO() #endif #if PHP_IMAGICK_HAVE_HOUGHLINE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_houghLineImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_houghLineImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, threshold) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x646 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_exportImagePixels, 0, 6, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_exportImagePixels, 0, 0, 6) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, map, IS_STRING, 0) #else ZEND_ARG_INFO(0, map) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pixelstorage, IS_LONG, 0) #else ZEND_ARG_INFO(0, pixelstorage) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x648 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageChannelKurtosis, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageChannelKurtosis, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x648 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_functionImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_functionImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, function, IS_LONG, 0) #else ZEND_ARG_INFO(0, function) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, parameters, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, parameters) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x651 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_transformImageColorspace, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_transformImageColorspace, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, colorspace, IS_LONG, 0) #else ZEND_ARG_INFO(0, colorspace) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x652 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_haldClutImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_haldClutImage, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, clut, Imagick, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x655 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_autoLevelImage, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_autoLevelImage, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x655 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_blueShiftImage, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_blueShiftImage, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, factor, IS_DOUBLE, 0, "1.5") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x656 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageArtifact, 0, 1, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageArtifact, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, artifact, IS_STRING, 0) #else ZEND_ARG_INFO(0, artifact) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x656 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageArtifact, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageArtifact, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, artifact, IS_STRING, 0) #else ZEND_ARG_INFO(0, artifact) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) #else ZEND_ARG_INFO(0, value) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x656 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_deleteImageArtifact, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_deleteImageArtifact, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, artifact, IS_STRING, 0) #else ZEND_ARG_INFO(0, artifact) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x656 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getColorspace, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getColorspace, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x656 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setColorspace, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setColorspace, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, colorspace, IS_LONG, 0) #else ZEND_ARG_INFO(0, colorspace) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x656 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_clampImage, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_clampImage, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x667 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_smushImages, 0, 2, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_smushImages, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, stack, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, stack) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) #else ZEND_ARG_INFO(0, offset) #endif ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick___construct, 0, 0, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_MASK(0, files, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_NULL, "null") #else ZEND_ARG_INFO(0, files) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick___toString, 0, 0, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick___toString, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 50600 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_count, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_count, 0, 0, 0) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") #else ZEND_ARG_INFO(0, mode) #endif ZEND_END_ARG_INFO() #endif #if !(PHP_VERSION_ID >= 50600) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_count, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_count, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getPixelIterator, 0, 0, ImagickPixelIterator, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getPixelIterator, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getPixelRegionIterator, 0, 4, ImagickPixelIterator, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getPixelRegionIterator, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_readImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_readImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) #else ZEND_ARG_INFO(0, filename) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_readImages, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_readImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filenames, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, filenames) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_readImageBlob, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_readImageBlob, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, image, IS_STRING, 0) #else ZEND_ARG_INFO(0, image) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null") #else ZEND_ARG_INFO(0, filename) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageFormat, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageFormat, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) #else ZEND_ARG_INFO(0, format) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_scaleImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_scaleImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bestfit, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, bestfit) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_writeImage, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImage, 0, 0, 0) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null") #else ZEND_ARG_INFO(0, filename) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_writeImages, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImages, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) #else ZEND_ARG_INFO(0, filename) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, adjoin, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, adjoin) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_blurImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_blurImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_thumbnailImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_thumbnailImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 1) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 1) #else ZEND_ARG_INFO(0, rows) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bestfit, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, bestfit) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fill, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, fill) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_cropThumbnailImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_cropThumbnailImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageFilename arginfo_class_Imagick___toString #define arginfo_class_Imagick_setImageFilename arginfo_class_Imagick_readImage #define arginfo_class_Imagick_getImageFormat arginfo_class_Imagick___toString #define arginfo_class_Imagick_getImageMimeType arginfo_class_Imagick___toString #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_removeImage, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_removeImage, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_destroy arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_clear arginfo_class_Imagick_removeImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_clone, 0, 0, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_clone, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageSize, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageSize, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageBlob arginfo_class_Imagick___toString #define arginfo_class_Imagick_getImagesBlob arginfo_class_Imagick___toString #define arginfo_class_Imagick_setFirstIterator arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_setLastIterator arginfo_class_Imagick_removeImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_resetIterator, 0, 0, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_resetIterator, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_previousImage arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_nextImage arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_hasPreviousImage arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_hasNextImage arginfo_class_Imagick_removeImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageIndex, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageIndex, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) #else ZEND_ARG_INFO(0, index) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageIndex arginfo_class_Imagick_getImageSize #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_commentImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_commentImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, comment, IS_STRING, 0) #else ZEND_ARG_INFO(0, comment) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_cropImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_cropImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_labelImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_labelImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, label, IS_STRING, 0) #else ZEND_ARG_INFO(0, label) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageGeometry, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageGeometry, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_drawImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_drawImage, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, drawing, ImagickDraw, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageCompressionQuality, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageCompressionQuality, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, quality, IS_LONG, 0) #else ZEND_ARG_INFO(0, quality) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageCompressionQuality arginfo_class_Imagick_getImageSize #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageCompression, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageCompression, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, compression, IS_LONG, 0) #else ZEND_ARG_INFO(0, compression) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageCompression arginfo_class_Imagick_getImageSize #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_annotateImage, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_annotateImage, 0, 0, 5) #endif ZEND_ARG_OBJ_INFO(0, settings, ImagickDraw, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) #else ZEND_ARG_INFO(0, text) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_compositeImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_compositeImage, 0, 0, 4) #endif ZEND_ARG_OBJ_INFO(0, composite_image, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, composite, IS_LONG, 0) #else ZEND_ARG_INFO(0, composite) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_modulateImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_modulateImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, brightness, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, brightness) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, saturation, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, saturation) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, hue, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, hue) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageColors arginfo_class_Imagick_getImageSize #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_montageImage, 0, 5, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_montageImage, 0, 0, 5) #endif ZEND_ARG_OBJ_INFO(0, settings, ImagickDraw, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, tile_geometry, IS_STRING, 0) #else ZEND_ARG_INFO(0, tile_geometry) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, thumbnail_geometry, IS_STRING, 0) #else ZEND_ARG_INFO(0, thumbnail_geometry) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, monatgemode, IS_LONG, 0) #else ZEND_ARG_INFO(0, monatgemode) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, frame, IS_STRING, 0) #else ZEND_ARG_INFO(0, frame) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_identifyImage, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_identifyImage, 0, 0, 0) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, append_raw_output, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, append_raw_output) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_thresholdImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_thresholdImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, threshold) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_adaptiveThresholdImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_adaptiveThresholdImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) #else ZEND_ARG_INFO(0, offset) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_blackThresholdImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_blackThresholdImage, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, threshold_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_class_Imagick_whiteThresholdImage arginfo_class_Imagick_blackThresholdImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_appendImages, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_appendImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, stack, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, stack) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_charcoalImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_charcoalImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_normalizeImage, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_normalizeImage, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_oilPaintImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_oilPaintImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_posterizeImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_posterizeImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, levels, IS_LONG, 0) #else ZEND_ARG_INFO(0, levels) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dither, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, dither) #endif ZEND_END_ARG_INFO() #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_radialBlurImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_radialBlurImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_raiseImage, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_raiseImage, 0, 0, 5) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, raise, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, raise) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_resampleImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_resampleImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x_resolution, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x_resolution) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y_resolution, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y_resolution) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filter, IS_LONG, 0) #else ZEND_ARG_INFO(0, filter) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, blur, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, blur) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_resizeImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_resizeImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filter, IS_LONG, 0) #else ZEND_ARG_INFO(0, filter) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, blur, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, blur) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bestfit, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, bestfit) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_rollImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_rollImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_rotateImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_rotateImage, 0, 0, 2) #endif ZEND_ARG_OBJ_TYPE_MASK(0, background_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, degrees, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, degrees) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_sampleImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_sampleImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_solarizeImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_solarizeImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_LONG, 0) #else ZEND_ARG_INFO(0, threshold) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_shadowImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_shadowImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, opacity, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, opacity) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageAttribute, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageAttribute, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) #else ZEND_ARG_INFO(0, key) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) #else ZEND_ARG_INFO(0, value) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageBackgroundColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageBackgroundColor, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, background_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #if MagickLibVersion >= 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageChannelMask, 0, 1, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageChannelMask, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageCompose, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageCompose, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, compose, IS_LONG, 0) #else ZEND_ARG_INFO(0, compose) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageDelay, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageDelay, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, delay, IS_LONG, 0) #else ZEND_ARG_INFO(0, delay) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageDepth, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageDepth, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, depth, IS_LONG, 0) #else ZEND_ARG_INFO(0, depth) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageGamma, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageGamma, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gamma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, gamma) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageIterations, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageIterations, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0) #else ZEND_ARG_INFO(0, iterations) #endif ZEND_END_ARG_INFO() #if MagickLibVersion < 0x700 || MagickLibVersion >= 0x705 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageMatteColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageMatteColor, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, matte_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #endif #define arginfo_class_Imagick_setImagePage arginfo_class_Imagick_cropImage #define arginfo_class_Imagick_setImageProgressMonitor arginfo_class_Imagick_readImage #if MagickLibVersion > 0x653 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setProgressMonitor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setProgressMonitor, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) #else ZEND_ARG_INFO(0, callback) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageResolution, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageResolution, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x_resolution, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x_resolution) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y_resolution, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y_resolution) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageScene, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageScene, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, scene, IS_LONG, 0) #else ZEND_ARG_INFO(0, scene) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageTicksPerSecond, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageTicksPerSecond, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, ticks_per_second, IS_LONG, 0) #else ZEND_ARG_INFO(0, ticks_per_second) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageType, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageType, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, image_type, IS_LONG, 0) #else ZEND_ARG_INFO(0, image_type) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageUnits, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageUnits, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, units, IS_LONG, 0) #else ZEND_ARG_INFO(0, units) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_sharpenImage arginfo_class_Imagick_blurImage #define arginfo_class_Imagick_shaveImage arginfo_class_Imagick_sampleImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_shearImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_shearImage, 0, 0, 3) #endif ZEND_ARG_OBJ_TYPE_MASK(0, background_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x_shear, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x_shear) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y_shear, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y_shear) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_spliceImage arginfo_class_Imagick_cropImage #define arginfo_class_Imagick_pingImage arginfo_class_Imagick_readImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_readImageFile, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_readImageFile, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, filehandle, IS_MIXED, 0) #else ZEND_ARG_INFO(0, filehandle) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null") #else ZEND_ARG_INFO(0, filename) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_displayImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_displayImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, servername, IS_STRING, 0) #else ZEND_ARG_INFO(0, servername) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_displayImages arginfo_class_Imagick_displayImage #define arginfo_class_Imagick_spreadImage arginfo_class_Imagick_oilPaintImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_swirlImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_swirlImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, degrees, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, degrees) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_stripImage arginfo_class_Imagick_removeImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_queryFormats, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_queryFormats, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"*\"") ZEND_END_ARG_INFO() #define arginfo_class_Imagick_queryFonts arginfo_class_Imagick_queryFormats #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_queryFontMetrics, 0, 2, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_queryFontMetrics, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, settings, ImagickDraw, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) #else ZEND_ARG_INFO(0, text) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, multiline, _IS_BOOL, 1, "null") #else ZEND_ARG_INFO(0, multiline) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_steganoImage, 0, 2, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_steganoImage, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, watermark, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) #else ZEND_ARG_INFO(0, offset) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_addNoiseImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_addNoiseImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, noise, IS_LONG, 0) #else ZEND_ARG_INFO(0, noise) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_addNoiseImageWithAttenuate, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_addNoiseImageWithAttenuate, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, noise, IS_LONG, 0) #else ZEND_ARG_INFO(0, noise) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, attenuate, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, attenuate) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_motionBlurImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_motionBlurImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_mosaicImages, 0, 0, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_mosaicImages, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_morphImages, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_morphImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, number_frames, IS_LONG, 0) #else ZEND_ARG_INFO(0, number_frames) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_minifyImage arginfo_class_Imagick_removeImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_affineTransformImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_affineTransformImage, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, settings, ImagickDraw, 0) ZEND_END_ARG_INFO() #define arginfo_class_Imagick_averageImages arginfo_class_Imagick_clone #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_borderImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_borderImage, 0, 0, 3) #endif ZEND_ARG_OBJ_TYPE_MASK(0, border_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif ZEND_END_ARG_INFO() #if MagickLibVersion >= 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_borderImageWithComposite, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_borderImageWithComposite, 0, 0, 4) #endif ZEND_ARG_OBJ_TYPE_MASK(0, border_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, composite, IS_LONG, 0) #else ZEND_ARG_INFO(0, composite) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_calculateCrop, 0, 4, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_calculateCrop, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, original_width, IS_LONG, 0) #else ZEND_ARG_INFO(0, original_width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, original_height, IS_LONG, 0) #else ZEND_ARG_INFO(0, original_height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, desired_width, IS_LONG, 0) #else ZEND_ARG_INFO(0, desired_width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, desired_height, IS_LONG, 0) #else ZEND_ARG_INFO(0, desired_height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_chopImage arginfo_class_Imagick_cropImage #define arginfo_class_Imagick_clipImage arginfo_class_Imagick_removeImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_clipPathImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_clipPathImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0) #else ZEND_ARG_INFO(0, pathname) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, inside, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, inside) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_clipImagePath, 0, 2, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_clipImagePath, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0) #else ZEND_ARG_INFO(0, pathname) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, inside, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, inside) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_coalesceImages arginfo_class_Imagick_clone #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_colorFloodfillImage, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_colorFloodfillImage, 0, 0, 5) #endif ZEND_ARG_OBJ_TYPE_MASK(0, fill_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_ARG_OBJ_TYPE_MASK(0, border_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_colorizeImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_colorizeImage, 0, 0, 2) #endif ZEND_ARG_OBJ_TYPE_MASK(0, colorize_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_ARG_OBJ_TYPE_MASK(0, opacity_color, ImagickPixel, MAY_BE_STRING|MAY_BE_FALSE, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 1, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_compareImageChannels, 0, 3, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_compareImageChannels, 0, 0, 3) #endif ZEND_ARG_OBJ_INFO(0, reference, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, metric, IS_LONG, 0) #else ZEND_ARG_INFO(0, metric) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_compareImages, 0, 2, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_compareImages, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, reference, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, metric, IS_LONG, 0) #else ZEND_ARG_INFO(0, metric) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_contrastImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_contrastImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sharpen, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, sharpen) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_combineImages, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_combineImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, colorspace, IS_LONG, 0) #else ZEND_ARG_INFO(0, colorspace) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_convolveImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_convolveImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, kernel, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, kernel) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_cycleColormapImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_cycleColormapImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, displace, IS_LONG, 0) #else ZEND_ARG_INFO(0, displace) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_deconstructImages arginfo_class_Imagick_clone #define arginfo_class_Imagick_despeckleImage arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_edgeImage arginfo_class_Imagick_oilPaintImage #define arginfo_class_Imagick_embossImage arginfo_class_Imagick_charcoalImage #define arginfo_class_Imagick_enhanceImage arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_equalizeImage arginfo_class_Imagick_removeImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_evaluateImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_evaluateImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, evaluate, IS_LONG, 0) #else ZEND_ARG_INFO(0, evaluate) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, constant, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, constant) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if MagickLibVersion >= 0x687 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_evaluateImages, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_evaluateImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, evaluate, IS_LONG, 0) #else ZEND_ARG_INFO(0, evaluate) #endif ZEND_END_ARG_INFO() #endif #define arginfo_class_Imagick_flattenImages arginfo_class_Imagick_clone #define arginfo_class_Imagick_flipImage arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_flopImage arginfo_class_Imagick_removeImage #if MagickLibVersion >= 0x655 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_forwardFourierTransformImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_forwardFourierTransformImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, magnitude, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, magnitude) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_frameImage, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_frameImage, 0, 0, 5) #endif ZEND_ARG_OBJ_TYPE_MASK(0, matte_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, inner_bevel, IS_LONG, 0) #else ZEND_ARG_INFO(0, inner_bevel) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, outer_bevel, IS_LONG, 0) #else ZEND_ARG_INFO(0, outer_bevel) #endif ZEND_END_ARG_INFO() #if MagickLibVersion >= 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_frameImageWithComposite, 0, 6, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_frameImageWithComposite, 0, 0, 6) #endif ZEND_ARG_OBJ_TYPE_MASK(0, matte_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, inner_bevel, IS_LONG, 0) #else ZEND_ARG_INFO(0, inner_bevel) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, outer_bevel, IS_LONG, 0) #else ZEND_ARG_INFO(0, outer_bevel) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, composite, IS_LONG, 0) #else ZEND_ARG_INFO(0, composite) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_fxImage, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_fxImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, expression, IS_STRING, 0) #else ZEND_ARG_INFO(0, expression) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_gammaImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_gammaImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gamma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, gamma) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #define arginfo_class_Imagick_gaussianBlurImage arginfo_class_Imagick_blurImage #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageAttribute, 0, 1, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageAttribute, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) #else ZEND_ARG_INFO(0, key) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getImageBackgroundColor, 0, 0, ImagickPixel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageBackgroundColor, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageBluePrimary arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getImageBorderColor arginfo_class_Imagick_getImageBackgroundColor #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageChannelDepth, 0, 1, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageChannelDepth, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageChannelDistortion, 0, 3, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageChannelDistortion, 0, 0, 3) #endif ZEND_ARG_OBJ_INFO(0, reference, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, metric, IS_LONG, 0) #else ZEND_ARG_INFO(0, metric) #endif ZEND_END_ARG_INFO() #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageChannelExtrema, 0, 1, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageChannelExtrema, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageChannelMean, 0, 1, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageChannelMean, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageChannelStatistics arginfo_class_Imagick_getImageGeometry #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getImageColormapColor, 0, 1, ImagickPixel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageColormapColor, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) #else ZEND_ARG_INFO(0, index) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageColorspace arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageCompose arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageDelay arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageDepth arginfo_class_Imagick_getImageSize #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageDistortion, 0, 2, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageDistortion, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, reference, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, metric, IS_LONG, 0) #else ZEND_ARG_INFO(0, metric) #endif ZEND_END_ARG_INFO() #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageExtrema, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageExtrema, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #define arginfo_class_Imagick_getImageDispose arginfo_class_Imagick_getImageSize #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageGamma, 0, 0, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageGamma, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageGreenPrimary arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getImageHeight arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageHistogram arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getImageInterlaceScheme arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageIterations arginfo_class_Imagick_getImageSize #if MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getImageMatteColor, 0, 0, ImagickPixel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageMatteColor, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #define arginfo_class_Imagick_getImagePage arginfo_class_Imagick_getImageGeometry #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getImagePixelColor, 0, 2, ImagickPixel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImagePixelColor, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #if IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_setImagePixelColor, 0, 3, ImagickPixel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImagePixelColor, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_ARG_OBJ_TYPE_MASK(0, color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getImageProfile, 0, 1, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageProfile, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) #else ZEND_ARG_INFO(0, name) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImageRedPrimary arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getImageRenderingIntent arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageResolution arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getImageScene arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageSignature arginfo_class_Imagick___toString #define arginfo_class_Imagick_getImageTicksPerSecond arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageType arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageUnits arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageVirtualPixelMethod arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageWhitePoint arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getImageWidth arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getNumberImages arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getImageTotalInkDensity arginfo_class_Imagick_getImageGamma #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getImageRegion, 0, 4, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageRegion, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_implodeImage arginfo_class_Imagick_oilPaintImage #if MagickLibVersion >= 0x658 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_inverseFourierTransformImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_inverseFourierTransformImage, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, complement, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, magnitude, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, magnitude) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_levelImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_levelImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, black_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, black_point) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gamma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, gamma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, white_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, white_point) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #define arginfo_class_Imagick_magnifyImage arginfo_class_Imagick_removeImage #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_mapImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_mapImage, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, map, imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dither, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, dither) #endif ZEND_END_ARG_INFO() #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_matteFloodfillImage, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_matteFloodfillImage, 0, 0, 5) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, alpha, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, alpha) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_ARG_OBJ_TYPE_MASK(0, border_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_medianFilterImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_medianFilterImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_negateImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_negateImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gray, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, gray) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_paintOpaqueImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_paintOpaqueImage, 0, 0, 3) #endif ZEND_ARG_OBJ_TYPE_MASK(0, target_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_ARG_OBJ_TYPE_MASK(0, fill_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_paintTransparentImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_paintTransparentImage, 0, 0, 3) #endif ZEND_ARG_OBJ_TYPE_MASK(0, target_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, alpha, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, alpha) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fuzz, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, fuzz) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_previewImages, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_previewImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, preview, IS_LONG, 0) #else ZEND_ARG_INFO(0, preview) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_profileImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_profileImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) #else ZEND_ARG_INFO(0, name) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, profile, IS_STRING, 1) #else ZEND_ARG_INFO(0, profile) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_quantizeImage, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_quantizeImage, 0, 0, 5) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, number_colors, IS_LONG, 0) #else ZEND_ARG_INFO(0, number_colors) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, colorspace, IS_LONG, 0) #else ZEND_ARG_INFO(0, colorspace) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, tree_depth, IS_LONG, 0) #else ZEND_ARG_INFO(0, tree_depth) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dither, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, dither) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, measure_error, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, measure_error) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_quantizeImages arginfo_class_Imagick_quantizeImage #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_reduceNoiseImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_reduceNoiseImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif ZEND_END_ARG_INFO() #endif #define arginfo_class_Imagick_removeImageProfile arginfo_class_Imagick_getImageProfile #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_separateImageChannel, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_separateImageChannel, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_sepiaToneImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_sepiaToneImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, threshold) #endif ZEND_END_ARG_INFO() #if MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageBias, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageBias, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bias, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, bias) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageBiasQuantum, 0, 1, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageBiasQuantum, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bias, IS_STRING, 0) #else ZEND_ARG_INFO(0, bias) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageBluePrimary, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageBluePrimary, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageBorderColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageBorderColor, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, border_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageChannelDepth, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageChannelDepth, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 0) #else ZEND_ARG_INFO(0, channel) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, depth, IS_LONG, 0) #else ZEND_ARG_INFO(0, depth) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageColormapColor, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageColormapColor, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) #else ZEND_ARG_INFO(0, index) #endif ZEND_ARG_OBJ_TYPE_MASK(0, color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageColorspace, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageColorspace, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, colorspace, IS_LONG, 0) #else ZEND_ARG_INFO(0, colorspace) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageDispose, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageDispose, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dispose, IS_LONG, 0) #else ZEND_ARG_INFO(0, dispose) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_setImageExtent arginfo_class_Imagick_sampleImage #define arginfo_class_Imagick_setImageGreenPrimary arginfo_class_Imagick_setImageBluePrimary #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageInterlaceScheme, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageInterlaceScheme, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, interlace, IS_LONG, 0) #else ZEND_ARG_INFO(0, interlace) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageProfile, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageProfile, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) #else ZEND_ARG_INFO(0, name) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, profile, IS_STRING, 0) #else ZEND_ARG_INFO(0, profile) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_setImageRedPrimary arginfo_class_Imagick_setImageBluePrimary #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageRenderingIntent, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageRenderingIntent, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rendering_intent, IS_LONG, 0) #else ZEND_ARG_INFO(0, rendering_intent) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageVirtualPixelMethod, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageVirtualPixelMethod, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) #else ZEND_ARG_INFO(0, method) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_setImageWhitePoint arginfo_class_Imagick_setImageBluePrimary #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_sigmoidalContrastImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_sigmoidalContrastImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sharpen, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, sharpen) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, alpha, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, alpha) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, beta, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, beta) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_stereoImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_stereoImage, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, offset_image, Imagick, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_textureImage, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_textureImage, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, texture, Imagick, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_tintImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_tintImage, 0, 0, 2) #endif ZEND_ARG_OBJ_TYPE_MASK(0, tint_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_ARG_OBJ_TYPE_MASK(0, opacity_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, legacy, _IS_BOOL, 0, "false") #else ZEND_ARG_INFO(0, legacy) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_unsharpMaskImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_unsharpMaskImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, amount, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, amount) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, threshold) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getImage arginfo_class_Imagick_clone #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_addImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_addImage, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, image, Imagick, 0) ZEND_END_ARG_INFO() #define arginfo_class_Imagick_setImage arginfo_class_Imagick_addImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_newImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif ZEND_ARG_OBJ_TYPE_MASK(0, background_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 0, "null") #else ZEND_ARG_INFO(0, format) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_newPseudoImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newPseudoImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pseudo_format, IS_STRING, 0) #else ZEND_ARG_INFO(0, pseudo_format) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getCompression arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getCompressionQuality arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getCopyright arginfo_class_Imagick___toString #define arginfo_class_Imagick_getConfigureOptions arginfo_class_Imagick_queryFormats #if MagickLibVersion > 0x660 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getFeatures, 0, 0, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getFeatures, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #define arginfo_class_Imagick_getFilename arginfo_class_Imagick___toString #define arginfo_class_Imagick_getFormat arginfo_class_Imagick___toString #define arginfo_class_Imagick_getHomeURL arginfo_class_Imagick___toString #define arginfo_class_Imagick_getInterlaceScheme arginfo_class_Imagick_getImageSize #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getOption, 0, 1, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getOption, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) #else ZEND_ARG_INFO(0, key) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getPackageName arginfo_class_Imagick___toString #define arginfo_class_Imagick_getPage arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getQuantum arginfo_class_Imagick_getImageSize #define arginfo_class_Imagick_getHdriEnabled arginfo_class_Imagick_removeImage #define arginfo_class_Imagick_getQuantumDepth arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getQuantumRange arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getReleaseDate arginfo_class_Imagick___toString #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getResource, 0, 1, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getResource, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) #else ZEND_ARG_INFO(0, type) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_getResourceLimit arginfo_class_Imagick_getResource #define arginfo_class_Imagick_getSamplingFactors arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getSize arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_getVersion arginfo_class_Imagick_getImageGeometry #define arginfo_class_Imagick_setBackgroundColor arginfo_class_Imagick_setImageBackgroundColor #define arginfo_class_Imagick_setCompression arginfo_class_Imagick_setImageCompression #define arginfo_class_Imagick_setCompressionQuality arginfo_class_Imagick_setImageCompressionQuality #define arginfo_class_Imagick_setFilename arginfo_class_Imagick_readImage #define arginfo_class_Imagick_setFormat arginfo_class_Imagick_setImageFormat #define arginfo_class_Imagick_setInterlaceScheme arginfo_class_Imagick_setImageInterlaceScheme #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setOption, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setOption, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) #else ZEND_ARG_INFO(0, key) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) #else ZEND_ARG_INFO(0, value) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_setPage arginfo_class_Imagick_cropImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setResourceLimit, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setResourceLimit, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) #else ZEND_ARG_INFO(0, type) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0) #else ZEND_ARG_INFO(0, limit) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_setResolution arginfo_class_Imagick_setImageResolution #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setSamplingFactors, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setSamplingFactors, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, factors, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, factors) #endif ZEND_END_ARG_INFO() #define arginfo_class_Imagick_setSize arginfo_class_Imagick_sampleImage #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setType, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setType, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, imgtype, IS_LONG, 0) #else ZEND_ARG_INFO(0, imgtype) #endif ZEND_END_ARG_INFO() #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_key arginfo_class_Imagick_getSizeOffset #endif #if MagickLibVersion > 0x628 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_next, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_rewind arginfo_class_Imagick_next #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_valid arginfo_class_Imagick_optimizeImageLayers #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_current, 0, 0, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_current, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x659 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_brightnessContrastImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_brightnessContrastImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, brightness, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, brightness) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, contrast, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, contrast) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion > 0x661 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_colorMatrixImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_colorMatrixImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color_matrix, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, color_matrix) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_selectiveBlurImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_selectiveBlurImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, threshold) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x689 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_rotationalBlurImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_rotationalBlurImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x683 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_statisticImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_statisticImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) #else ZEND_ARG_INFO(0, type) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_subimageMatch, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_subimageMatch, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, image, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(1, offset, IS_ARRAY, 1, "null") #else ZEND_ARG_INFO(1, offset) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(1, similarity, IS_DOUBLE, 1, "null") #else ZEND_ARG_INFO(1, similarity) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, threshold, IS_DOUBLE, 0, "0.0") #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, metric, IS_LONG, 0, "0") #else ZEND_ARG_INFO(0, metric) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652 #define arginfo_class_Imagick_similarityImage arginfo_class_Imagick_subimageMatch #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setRegistry, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setRegistry, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) #else ZEND_ARG_INFO(0, key) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) #else ZEND_ARG_INFO(0, value) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getRegistry, 0, 1, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getRegistry, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) #else ZEND_ARG_INFO(0, key) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_listRegistry, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_listRegistry, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x680 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_morphology, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_morphology, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, morphology, IS_LONG, 0) #else ZEND_ARG_INFO(0, morphology) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0) #else ZEND_ARG_INFO(0, iterations) #endif ZEND_ARG_OBJ_INFO(0, kernel, ImagickKernel, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && defined(IMAGICK_WITH_KERNEL) && MagickLibVersion < 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_filter, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_filter, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, kernel, ImagickKernel, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_UNDEFINED") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setAntialias, 0, 1, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setAntialias, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, antialias, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, antialias) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 #define arginfo_class_Imagick_getAntialias arginfo_class_Imagick_optimizeImageLayers #endif #if MagickLibVersion > 0x628 && MagickLibVersion > 0x676 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_colorDecisionListImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_colorDecisionListImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color_correction_collection, IS_STRING, 0) #else ZEND_ARG_INFO(0, color_correction_collection) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x687 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_optimizeImageTransparency, 0, 0, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_optimizeImageTransparency, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x660 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_autoGammaImage, 0, 0, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_autoGammaImage, 0, 0, 0) #endif ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 1, "Imagick::CHANNEL_ALL") ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_autoOrient, 0, 0, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_autoOrient, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 #define arginfo_class_Imagick_autoOrientate arginfo_class_Imagick_autoOrient #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_compositeImageGravity, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_compositeImageGravity, 0, 0, 3) #endif ZEND_ARG_OBJ_INFO(0, image, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, composite_constant, IS_LONG, 0) #else ZEND_ARG_INFO(0, composite_constant) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gravity, IS_LONG, 0) #else ZEND_ARG_INFO(0, gravity) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x693 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_localContrastImage, 0, 2, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_localContrastImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, strength, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, strength) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_identifyImageType, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_identifyImageType, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_GETSETIMAGEMASK #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_getImageMask, 0, 1, Imagick, 1) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getImageMask, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pixelmask, IS_LONG, 0) #else ZEND_ARG_INFO(0, pixelmask) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_GETSETIMAGEMASK #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setImageMask, 0, 2, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setImageMask, 0, 0, 2) #endif ZEND_ARG_OBJ_INFO(0, clip_mask, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pixelmask, IS_LONG, 0) #else ZEND_ARG_INFO(0, pixelmask) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x709 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_cannyEdgeImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_cannyEdgeImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, lower_percent, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, lower_percent) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, upper_percent, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, upper_percent) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_SETSEED #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_setSeed, 0, 1, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_setSeed, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, seed, IS_LONG, 0) #else ZEND_ARG_INFO(0, seed) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_waveletDenoiseImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_waveletDenoiseImage, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, threshold, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, threshold) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, softness, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, softness) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_MEANSHIFTIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_meanShiftImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_meanShiftImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, color_distance, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, color_distance) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_KMEANSIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_kmeansImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_kmeansImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, number_colors, IS_LONG, 0) #else ZEND_ARG_INFO(0, number_colors) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, max_iterations, IS_LONG, 0) #else ZEND_ARG_INFO(0, max_iterations) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, tolerance, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, tolerance) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_rangeThresholdImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_rangeThresholdImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, low_black, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, low_black) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, low_white, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, low_white) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, high_white, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, high_white) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, high_black, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, high_black) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_autoThresholdImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_autoThresholdImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, auto_threshold_method, IS_LONG, 0) #else ZEND_ARG_INFO(0, auto_threshold_method) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_BILATERALBLURIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_bilateralBlurImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_bilateralBlurImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, intensity_sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, intensity_sigma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, spatial_sigma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, spatial_sigma) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_CLAHEIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_claheImage, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_claheImage, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) #else ZEND_ARG_INFO(0, height) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, number_bins, IS_LONG, 0) #else ZEND_ARG_INFO(0, number_bins) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, clip_limit, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, clip_limit) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_CHANNELFXIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_channelFxImage, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_channelFxImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, expression, IS_STRING, 0) #else ZEND_ARG_INFO(0, expression) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_colorThresholdImage, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_colorThresholdImage, 0, 0, 2) #endif ZEND_ARG_OBJ_TYPE_MASK(0, start_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_ARG_OBJ_TYPE_MASK(0, stop_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_COMPLEXIMAGES #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_complexImages, 0, 1, Imagick, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_complexImages, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, complex_operator, IS_LONG, 0) #else ZEND_ARG_INFO(0, complex_operator) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_interpolativeResizeImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_interpolativeResizeImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, interpolate, IS_LONG, 0) #else ZEND_ARG_INFO(0, interpolate) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_LEVELIMAGECOLORS #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_levelImageColors, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_levelImageColors, 0, 0, 3) #endif ZEND_ARG_OBJ_TYPE_MASK(0, black_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_ARG_OBJ_TYPE_MASK(0, white_color, ImagickPixel, MAY_BE_STRING, NULL) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, invert, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, invert) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_LEVELIZEIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_levelizeImage, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_levelizeImage, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, black_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, black_point) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gamma, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, gamma) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, white_point, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, white_point) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_orderedDitherImage, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_orderedDitherImage, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dither_format, IS_STRING, 0) #else ZEND_ARG_INFO(0, dither_format) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_WHITEBALANCEIMAGE #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_whiteBalanceImage, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_whiteBalanceImage, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, optimizeImageLayers); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, compareImageLayers); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, pingImageBlob); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, pingImageFile); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, transposeImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, transverseImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, trimImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, waveImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, vignetteImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, uniqueImageColors); #endif #if MagickLibVersion > 0x628 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, getImageMatte); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, setImageMatte); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, adaptiveResizeImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, sketchImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, shadeImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, getSizeOffset); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, setSizeOffset); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, adaptiveBlurImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, contrastStretchImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, adaptiveSharpenImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, randomThresholdImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, roundCornersImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, setIteratorIndex); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, getIteratorIndex); #endif #if MagickLibVersion > 0x628 && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, transformImage); #endif #if MagickLibVersion > 0x630 && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, setImageOpacity); #endif #if MagickLibVersion > 0x630 && MagickLibVersion >= 0x700 ZEND_METHOD(Imagick, setImageAlpha); #endif #if MagickLibVersion > 0x630 && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, orderedPosterizeImage); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, polaroidImage); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, getImageProperty); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, setImageProperty); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, deleteImageProperty); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, identifyFormat); #endif #if MagickLibVersion > 0x631 && IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD ZEND_METHOD(Imagick, setImageInterpolateMethod); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, getImageInterpolateMethod); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, linearStretchImage); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, getImageLength); #endif #if MagickLibVersion > 0x631 ZEND_METHOD(Imagick, extentImage); #endif #if MagickLibVersion > 0x633 ZEND_METHOD(Imagick, getImageOrientation); #endif #if MagickLibVersion > 0x633 ZEND_METHOD(Imagick, setImageOrientation); #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion > 0x634 && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, paintFloodfillImage); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, clutImage); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, getImageProperties); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, getImageProfiles); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, distortImage); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, writeImageFile); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, writeImagesFile); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, resetImagePage); #endif #if MagickLibVersion > 0x635 && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, setImageClipMask); #endif #if MagickLibVersion > 0x635 && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, getImageClipMask); #endif #if MagickLibVersion > 0x635 ZEND_METHOD(Imagick, animateImages); #endif #if MagickLibVersion > 0x635 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, recolorImage); #endif #if MagickLibVersion > 0x636 ZEND_METHOD(Imagick, setFont); #endif #if MagickLibVersion > 0x636 ZEND_METHOD(Imagick, getFont); #endif #if MagickLibVersion > 0x636 ZEND_METHOD(Imagick, setPointSize); #endif #if MagickLibVersion > 0x636 ZEND_METHOD(Imagick, getPointSize); #endif #if MagickLibVersion > 0x636 ZEND_METHOD(Imagick, mergeImageLayers); #endif #if MagickLibVersion > 0x637 ZEND_METHOD(Imagick, setImageAlphaChannel); #endif #if MagickLibVersion > 0x637 ZEND_METHOD(Imagick, floodfillPaintImage); #endif #if MagickLibVersion > 0x637 ZEND_METHOD(Imagick, opaquePaintImage); #endif #if MagickLibVersion > 0x637 ZEND_METHOD(Imagick, transparentPaintImage); #endif #if MagickLibVersion > 0x638 ZEND_METHOD(Imagick, liquidRescaleImage); #endif #if MagickLibVersion > 0x638 ZEND_METHOD(Imagick, encipherImage); #endif #if MagickLibVersion > 0x638 ZEND_METHOD(Imagick, decipherImage); #endif #if MagickLibVersion > 0x639 ZEND_METHOD(Imagick, setGravity); #endif #if MagickLibVersion > 0x639 ZEND_METHOD(Imagick, getGravity); #endif #if MagickLibVersion > 0x639 ZEND_METHOD(Imagick, getImageChannelRange); #endif #if MagickLibVersion > 0x639 ZEND_METHOD(Imagick, getImageAlphaChannel); #endif #if MagickLibVersion > 0x642 ZEND_METHOD(Imagick, getImageChannelDistortions); #endif #if MagickLibVersion > 0x643 ZEND_METHOD(Imagick, setImageGravity); #endif #if MagickLibVersion > 0x643 ZEND_METHOD(Imagick, getImageGravity); #endif #if MagickLibVersion > 0x645 ZEND_METHOD(Imagick, importImagePixels); #endif #if MagickLibVersion > 0x645 ZEND_METHOD(Imagick, deskewImage); #endif #if MagickLibVersion > 0x645 ZEND_METHOD(Imagick, segmentImage); #endif #if MagickLibVersion > 0x645 ZEND_METHOD(Imagick, sparseColorImage); #endif #if MagickLibVersion > 0x645 ZEND_METHOD(Imagick, remapImage); #endif #if PHP_IMAGICK_HAVE_HOUGHLINE ZEND_METHOD(Imagick, houghLineImage); #endif #if MagickLibVersion > 0x646 ZEND_METHOD(Imagick, exportImagePixels); #endif #if MagickLibVersion > 0x648 ZEND_METHOD(Imagick, getImageChannelKurtosis); #endif #if MagickLibVersion > 0x648 ZEND_METHOD(Imagick, functionImage); #endif #if MagickLibVersion > 0x651 ZEND_METHOD(Imagick, transformImageColorspace); #endif #if MagickLibVersion > 0x652 ZEND_METHOD(Imagick, haldClutImage); #endif #if MagickLibVersion > 0x655 ZEND_METHOD(Imagick, autoLevelImage); #endif #if MagickLibVersion > 0x655 ZEND_METHOD(Imagick, blueShiftImage); #endif #if MagickLibVersion > 0x656 ZEND_METHOD(Imagick, getImageArtifact); #endif #if MagickLibVersion > 0x656 ZEND_METHOD(Imagick, setImageArtifact); #endif #if MagickLibVersion > 0x656 ZEND_METHOD(Imagick, deleteImageArtifact); #endif #if MagickLibVersion > 0x656 ZEND_METHOD(Imagick, getColorspace); #endif #if MagickLibVersion > 0x656 ZEND_METHOD(Imagick, setColorspace); #endif #if MagickLibVersion > 0x656 ZEND_METHOD(Imagick, clampImage); #endif #if MagickLibVersion > 0x667 ZEND_METHOD(Imagick, smushImages); #endif ZEND_METHOD(Imagick, __construct); ZEND_METHOD(Imagick, __toString); #if PHP_VERSION_ID >= 50600 ZEND_METHOD(Imagick, count); #endif #if !(PHP_VERSION_ID >= 50600) ZEND_METHOD(Imagick, count); #endif ZEND_METHOD(Imagick, getPixelIterator); ZEND_METHOD(Imagick, getPixelRegionIterator); ZEND_METHOD(Imagick, readImage); ZEND_METHOD(Imagick, readImages); ZEND_METHOD(Imagick, readImageBlob); ZEND_METHOD(Imagick, setImageFormat); ZEND_METHOD(Imagick, scaleImage); ZEND_METHOD(Imagick, writeImage); ZEND_METHOD(Imagick, writeImages); ZEND_METHOD(Imagick, blurImage); ZEND_METHOD(Imagick, thumbnailImage); ZEND_METHOD(Imagick, cropThumbnailImage); ZEND_METHOD(Imagick, getImageFilename); ZEND_METHOD(Imagick, setImageFilename); ZEND_METHOD(Imagick, getImageFormat); ZEND_METHOD(Imagick, getImageMimeType); ZEND_METHOD(Imagick, removeImage); ZEND_METHOD(Imagick, clear); ZEND_METHOD(Imagick, clone); ZEND_METHOD(Imagick, getImageSize); ZEND_METHOD(Imagick, getImageBlob); ZEND_METHOD(Imagick, getImagesBlob); ZEND_METHOD(Imagick, setFirstIterator); ZEND_METHOD(Imagick, setLastIterator); ZEND_METHOD(Imagick, resetIterator); ZEND_METHOD(Imagick, previousImage); ZEND_METHOD(Imagick, nextImage); ZEND_METHOD(Imagick, hasPreviousImage); ZEND_METHOD(Imagick, hasNextImage); ZEND_METHOD(Imagick, setImageIndex); ZEND_METHOD(Imagick, getImageIndex); ZEND_METHOD(Imagick, commentImage); ZEND_METHOD(Imagick, cropImage); ZEND_METHOD(Imagick, labelImage); ZEND_METHOD(Imagick, getImageGeometry); ZEND_METHOD(Imagick, drawImage); ZEND_METHOD(Imagick, setImageCompressionQuality); ZEND_METHOD(Imagick, getImageCompressionQuality); ZEND_METHOD(Imagick, setImageCompression); ZEND_METHOD(Imagick, getImageCompression); ZEND_METHOD(Imagick, annotateImage); ZEND_METHOD(Imagick, compositeImage); ZEND_METHOD(Imagick, modulateImage); ZEND_METHOD(Imagick, getImageColors); ZEND_METHOD(Imagick, montageImage); ZEND_METHOD(Imagick, identifyImage); ZEND_METHOD(Imagick, thresholdImage); ZEND_METHOD(Imagick, adaptiveThresholdImage); ZEND_METHOD(Imagick, blackThresholdImage); ZEND_METHOD(Imagick, whiteThresholdImage); ZEND_METHOD(Imagick, appendImages); ZEND_METHOD(Imagick, charcoalImage); ZEND_METHOD(Imagick, normalizeImage); ZEND_METHOD(Imagick, oilPaintImage); ZEND_METHOD(Imagick, posterizeImage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, radialBlurImage); #endif ZEND_METHOD(Imagick, raiseImage); ZEND_METHOD(Imagick, resampleImage); ZEND_METHOD(Imagick, resizeImage); ZEND_METHOD(Imagick, rollImage); ZEND_METHOD(Imagick, rotateImage); ZEND_METHOD(Imagick, sampleImage); ZEND_METHOD(Imagick, solarizeImage); ZEND_METHOD(Imagick, shadowImage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, setImageAttribute); #endif ZEND_METHOD(Imagick, setImageBackgroundColor); #if MagickLibVersion >= 0x700 ZEND_METHOD(Imagick, setImageChannelMask); #endif ZEND_METHOD(Imagick, setImageCompose); ZEND_METHOD(Imagick, setImageDelay); ZEND_METHOD(Imagick, setImageDepth); ZEND_METHOD(Imagick, setImageGamma); ZEND_METHOD(Imagick, setImageIterations); #if MagickLibVersion < 0x700 || MagickLibVersion >= 0x705 ZEND_METHOD(Imagick, setImageMatteColor); #endif ZEND_METHOD(Imagick, setImagePage); ZEND_METHOD(Imagick, setImageProgressMonitor); #if MagickLibVersion > 0x653 ZEND_METHOD(Imagick, setProgressMonitor); #endif ZEND_METHOD(Imagick, setImageResolution); ZEND_METHOD(Imagick, setImageScene); ZEND_METHOD(Imagick, setImageTicksPerSecond); ZEND_METHOD(Imagick, setImageType); ZEND_METHOD(Imagick, setImageUnits); ZEND_METHOD(Imagick, sharpenImage); ZEND_METHOD(Imagick, shaveImage); ZEND_METHOD(Imagick, shearImage); ZEND_METHOD(Imagick, spliceImage); ZEND_METHOD(Imagick, pingImage); ZEND_METHOD(Imagick, readImageFile); ZEND_METHOD(Imagick, displayImage); ZEND_METHOD(Imagick, displayImages); ZEND_METHOD(Imagick, spreadImage); ZEND_METHOD(Imagick, swirlImage); ZEND_METHOD(Imagick, stripImage); ZEND_METHOD(Imagick, queryFormats); ZEND_METHOD(Imagick, queryFonts); ZEND_METHOD(Imagick, queryFontMetrics); ZEND_METHOD(Imagick, steganoImage); ZEND_METHOD(Imagick, addNoiseImage); #if IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE ZEND_METHOD(Imagick, addNoiseImageWithAttenuate); #endif ZEND_METHOD(Imagick, motionBlurImage); #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) ZEND_METHOD(Imagick, mosaicImages); #endif ZEND_METHOD(Imagick, morphImages); ZEND_METHOD(Imagick, minifyImage); ZEND_METHOD(Imagick, affineTransformImage); ZEND_METHOD(Imagick, averageImages); ZEND_METHOD(Imagick, borderImage); #if MagickLibVersion >= 0x700 ZEND_METHOD(Imagick, borderImageWithComposite); #endif ZEND_METHOD(Imagick, calculateCrop); ZEND_METHOD(Imagick, chopImage); ZEND_METHOD(Imagick, clipImage); ZEND_METHOD(Imagick, clipPathImage); ZEND_METHOD(Imagick, coalesceImages); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, colorFloodfillImage); #endif ZEND_METHOD(Imagick, colorizeImage); ZEND_METHOD(Imagick, compareImageChannels); ZEND_METHOD(Imagick, compareImages); ZEND_METHOD(Imagick, contrastImage); ZEND_METHOD(Imagick, combineImages); ZEND_METHOD(Imagick, convolveImage); ZEND_METHOD(Imagick, cycleColormapImage); ZEND_METHOD(Imagick, deconstructImages); ZEND_METHOD(Imagick, despeckleImage); ZEND_METHOD(Imagick, edgeImage); ZEND_METHOD(Imagick, embossImage); ZEND_METHOD(Imagick, enhanceImage); ZEND_METHOD(Imagick, equalizeImage); ZEND_METHOD(Imagick, evaluateImage); #if MagickLibVersion >= 0x687 ZEND_METHOD(Imagick, evaluateImages); #endif ZEND_METHOD(Imagick, flattenImages); ZEND_METHOD(Imagick, flipImage); ZEND_METHOD(Imagick, flopImage); #if MagickLibVersion >= 0x655 ZEND_METHOD(Imagick, forwardFourierTransformImage); #endif ZEND_METHOD(Imagick, frameImage); #if MagickLibVersion >= 0x700 ZEND_METHOD(Imagick, frameImageWithComposite); #endif ZEND_METHOD(Imagick, fxImage); ZEND_METHOD(Imagick, gammaImage); ZEND_METHOD(Imagick, gaussianBlurImage); #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) ZEND_METHOD(Imagick, getImageAttribute); #endif ZEND_METHOD(Imagick, getImageBackgroundColor); ZEND_METHOD(Imagick, getImageBluePrimary); ZEND_METHOD(Imagick, getImageBorderColor); ZEND_METHOD(Imagick, getImageChannelDepth); ZEND_METHOD(Imagick, getImageChannelDistortion); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, getImageChannelExtrema); #endif ZEND_METHOD(Imagick, getImageChannelMean); ZEND_METHOD(Imagick, getImageChannelStatistics); ZEND_METHOD(Imagick, getImageColormapColor); ZEND_METHOD(Imagick, getImageColorspace); ZEND_METHOD(Imagick, getImageCompose); ZEND_METHOD(Imagick, getImageDelay); ZEND_METHOD(Imagick, getImageDepth); ZEND_METHOD(Imagick, getImageDistortion); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, getImageExtrema); #endif ZEND_METHOD(Imagick, getImageDispose); ZEND_METHOD(Imagick, getImageGamma); ZEND_METHOD(Imagick, getImageGreenPrimary); ZEND_METHOD(Imagick, getImageHeight); ZEND_METHOD(Imagick, getImageHistogram); ZEND_METHOD(Imagick, getImageInterlaceScheme); ZEND_METHOD(Imagick, getImageIterations); #if MagickLibVersion < 0x700 ZEND_METHOD(Imagick, getImageMatteColor); #endif ZEND_METHOD(Imagick, getImagePage); ZEND_METHOD(Imagick, getImagePixelColor); #if IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR ZEND_METHOD(Imagick, setImagePixelColor); #endif ZEND_METHOD(Imagick, getImageProfile); ZEND_METHOD(Imagick, getImageRedPrimary); ZEND_METHOD(Imagick, getImageRenderingIntent); ZEND_METHOD(Imagick, getImageResolution); ZEND_METHOD(Imagick, getImageScene); ZEND_METHOD(Imagick, getImageSignature); ZEND_METHOD(Imagick, getImageTicksPerSecond); ZEND_METHOD(Imagick, getImageType); ZEND_METHOD(Imagick, getImageUnits); ZEND_METHOD(Imagick, getImageVirtualPixelMethod); ZEND_METHOD(Imagick, getImageWhitePoint); ZEND_METHOD(Imagick, getImageWidth); ZEND_METHOD(Imagick, getNumberImages); ZEND_METHOD(Imagick, getImageTotalInkDensity); ZEND_METHOD(Imagick, getImageRegion); ZEND_METHOD(Imagick, implodeImage); #if MagickLibVersion >= 0x658 ZEND_METHOD(Imagick, inverseFourierTransformImage); #endif ZEND_METHOD(Imagick, levelImage); ZEND_METHOD(Imagick, magnifyImage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, mapImage); #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, matteFloodfillImage); #endif #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) ZEND_METHOD(Imagick, medianFilterImage); #endif ZEND_METHOD(Imagick, negateImage); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, paintOpaqueImage); #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, paintTransparentImage); #endif ZEND_METHOD(Imagick, previewImages); ZEND_METHOD(Imagick, profileImage); ZEND_METHOD(Imagick, quantizeImage); ZEND_METHOD(Imagick, quantizeImages); #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, reduceNoiseImage); #endif ZEND_METHOD(Imagick, removeImageProfile); ZEND_METHOD(Imagick, separateImageChannel); ZEND_METHOD(Imagick, sepiaToneImage); #if MagickLibVersion < 0x700 ZEND_METHOD(Imagick, setImageBias); #endif #if MagickLibVersion < 0x700 ZEND_METHOD(Imagick, setImageBiasQuantum); #endif ZEND_METHOD(Imagick, setImageBluePrimary); ZEND_METHOD(Imagick, setImageBorderColor); ZEND_METHOD(Imagick, setImageChannelDepth); ZEND_METHOD(Imagick, setImageColormapColor); ZEND_METHOD(Imagick, setImageColorspace); ZEND_METHOD(Imagick, setImageDispose); ZEND_METHOD(Imagick, setImageExtent); ZEND_METHOD(Imagick, setImageGreenPrimary); ZEND_METHOD(Imagick, setImageInterlaceScheme); ZEND_METHOD(Imagick, setImageProfile); ZEND_METHOD(Imagick, setImageRedPrimary); ZEND_METHOD(Imagick, setImageRenderingIntent); ZEND_METHOD(Imagick, setImageVirtualPixelMethod); ZEND_METHOD(Imagick, setImageWhitePoint); ZEND_METHOD(Imagick, sigmoidalContrastImage); ZEND_METHOD(Imagick, stereoImage); ZEND_METHOD(Imagick, textureImage); ZEND_METHOD(Imagick, tintImage); ZEND_METHOD(Imagick, unsharpMaskImage); ZEND_METHOD(Imagick, getImage); ZEND_METHOD(Imagick, addImage); ZEND_METHOD(Imagick, setImage); ZEND_METHOD(Imagick, newImage); ZEND_METHOD(Imagick, newPseudoImage); ZEND_METHOD(Imagick, getCompression); ZEND_METHOD(Imagick, getCompressionQuality); ZEND_METHOD(Imagick, getCopyright); ZEND_METHOD(Imagick, getConfigureOptions); #if MagickLibVersion > 0x660 ZEND_METHOD(Imagick, getFeatures); #endif ZEND_METHOD(Imagick, getFilename); ZEND_METHOD(Imagick, getFormat); ZEND_METHOD(Imagick, getHomeURL); ZEND_METHOD(Imagick, getInterlaceScheme); ZEND_METHOD(Imagick, getOption); ZEND_METHOD(Imagick, getPackageName); ZEND_METHOD(Imagick, getPage); ZEND_METHOD(Imagick, getQuantum); ZEND_METHOD(Imagick, getHdriEnabled); ZEND_METHOD(Imagick, getQuantumDepth); ZEND_METHOD(Imagick, getQuantumRange); ZEND_METHOD(Imagick, getReleaseDate); ZEND_METHOD(Imagick, getResource); ZEND_METHOD(Imagick, getResourceLimit); ZEND_METHOD(Imagick, getSamplingFactors); ZEND_METHOD(Imagick, getSize); ZEND_METHOD(Imagick, getVersion); ZEND_METHOD(Imagick, setBackgroundColor); ZEND_METHOD(Imagick, setCompression); ZEND_METHOD(Imagick, setCompressionQuality); ZEND_METHOD(Imagick, setFilename); ZEND_METHOD(Imagick, setFormat); ZEND_METHOD(Imagick, setInterlaceScheme); ZEND_METHOD(Imagick, setOption); ZEND_METHOD(Imagick, setPage); ZEND_METHOD(Imagick, setResourceLimit); ZEND_METHOD(Imagick, setResolution); ZEND_METHOD(Imagick, setSamplingFactors); ZEND_METHOD(Imagick, setSize); ZEND_METHOD(Imagick, setType); #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, nextImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, setFirstIterator); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, valid); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, current); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x659 ZEND_METHOD(Imagick, brightnessContrastImage); #endif #if MagickLibVersion > 0x628 && MagickLibVersion > 0x661 ZEND_METHOD(Imagick, colorMatrixImage); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, selectiveBlurImage); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x689 ZEND_METHOD(Imagick, rotationalBlurImage); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x683 ZEND_METHOD(Imagick, statisticImage); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652 ZEND_METHOD(Imagick, subimageMatch); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, setRegistry); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, getRegistry); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, listRegistry); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x680 ZEND_METHOD(Imagick, morphology); #endif #if MagickLibVersion > 0x628 && defined(IMAGICK_WITH_KERNEL) && MagickLibVersion < 0x700 ZEND_METHOD(Imagick, filter); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, setAntialias); #endif #if MagickLibVersion > 0x628 ZEND_METHOD(Imagick, getAntialias); #endif #if MagickLibVersion > 0x628 && MagickLibVersion > 0x676 ZEND_METHOD(Imagick, colorDecisionListImage); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x687 ZEND_METHOD(Imagick, optimizeImageTransparency); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x660 ZEND_METHOD(Imagick, autoGammaImage); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 ZEND_METHOD(Imagick, autoOrient); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 ZEND_METHOD(Imagick, compositeImageGravity); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x693 ZEND_METHOD(Imagick, localContrastImage); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x700 ZEND_METHOD(Imagick, identifyImageType); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_GETSETIMAGEMASK ZEND_METHOD(Imagick, getImageMask); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_GETSETIMAGEMASK ZEND_METHOD(Imagick, setImageMask); #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x709 ZEND_METHOD(Imagick, cannyEdgeImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_SETSEED ZEND_METHOD(Imagick, setSeed); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE ZEND_METHOD(Imagick, waveletDenoiseImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_MEANSHIFTIMAGE ZEND_METHOD(Imagick, meanShiftImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_KMEANSIMAGE ZEND_METHOD(Imagick, kmeansImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE ZEND_METHOD(Imagick, rangeThresholdImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE ZEND_METHOD(Imagick, autoThresholdImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_BILATERALBLURIMAGE ZEND_METHOD(Imagick, bilateralBlurImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_CLAHEIMAGE ZEND_METHOD(Imagick, claheImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_CHANNELFXIMAGE ZEND_METHOD(Imagick, channelFxImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE ZEND_METHOD(Imagick, colorThresholdImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_COMPLEXIMAGES ZEND_METHOD(Imagick, complexImages); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE ZEND_METHOD(Imagick, interpolativeResizeImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_LEVELIMAGECOLORS ZEND_METHOD(Imagick, levelImageColors); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_LEVELIZEIMAGE ZEND_METHOD(Imagick, levelizeImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE ZEND_METHOD(Imagick, orderedDitherImage); #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_WHITEBALANCEIMAGE ZEND_METHOD(Imagick, whiteBalanceImage); #endif static const zend_function_entry class_Imagick_methods[] = { #if MagickLibVersion > 0x628 ZEND_ME(Imagick, optimizeImageLayers, arginfo_class_Imagick_optimizeImageLayers, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, compareImageLayers, arginfo_class_Imagick_compareImageLayers, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, pingImageBlob, arginfo_class_Imagick_pingImageBlob, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, pingImageFile, arginfo_class_Imagick_pingImageFile, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, transposeImage, arginfo_class_Imagick_transposeImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, transverseImage, arginfo_class_Imagick_transverseImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, trimImage, arginfo_class_Imagick_trimImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, waveImage, arginfo_class_Imagick_waveImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, vignetteImage, arginfo_class_Imagick_vignetteImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, uniqueImageColors, arginfo_class_Imagick_uniqueImageColors, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, getImageMatte, arginfo_class_Imagick_getImageMatte, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, setImageMatte, arginfo_class_Imagick_setImageMatte, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, adaptiveResizeImage, arginfo_class_Imagick_adaptiveResizeImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, sketchImage, arginfo_class_Imagick_sketchImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, shadeImage, arginfo_class_Imagick_shadeImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, getSizeOffset, arginfo_class_Imagick_getSizeOffset, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, setSizeOffset, arginfo_class_Imagick_setSizeOffset, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, adaptiveBlurImage, arginfo_class_Imagick_adaptiveBlurImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, contrastStretchImage, arginfo_class_Imagick_contrastStretchImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, adaptiveSharpenImage, arginfo_class_Imagick_adaptiveSharpenImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, randomThresholdImage, arginfo_class_Imagick_randomThresholdImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, roundCornersImage, arginfo_class_Imagick_roundCornersImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_MALIAS(Imagick, roundCorners, roundCornersImage, arginfo_class_Imagick_roundCorners, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, setIteratorIndex, arginfo_class_Imagick_setIteratorIndex, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, getIteratorIndex, arginfo_class_Imagick_getIteratorIndex, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion < 0x700 ZEND_ME(Imagick, transformImage, arginfo_class_Imagick_transformImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x630 && MagickLibVersion < 0x700 ZEND_ME(Imagick, setImageOpacity, arginfo_class_Imagick_setImageOpacity, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x630 && MagickLibVersion >= 0x700 ZEND_ME(Imagick, setImageAlpha, arginfo_class_Imagick_setImageAlpha, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x630 && MagickLibVersion < 0x700 ZEND_ME(Imagick, orderedPosterizeImage, arginfo_class_Imagick_orderedPosterizeImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, polaroidImage, arginfo_class_Imagick_polaroidImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, getImageProperty, arginfo_class_Imagick_getImageProperty, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, setImageProperty, arginfo_class_Imagick_setImageProperty, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, deleteImageProperty, arginfo_class_Imagick_deleteImageProperty, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, identifyFormat, arginfo_class_Imagick_identifyFormat, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 && IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD ZEND_ME(Imagick, setImageInterpolateMethod, arginfo_class_Imagick_setImageInterpolateMethod, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, getImageInterpolateMethod, arginfo_class_Imagick_getImageInterpolateMethod, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, linearStretchImage, arginfo_class_Imagick_linearStretchImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, getImageLength, arginfo_class_Imagick_getImageLength, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x631 ZEND_ME(Imagick, extentImage, arginfo_class_Imagick_extentImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x633 ZEND_ME(Imagick, getImageOrientation, arginfo_class_Imagick_getImageOrientation, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x633 ZEND_ME(Imagick, setImageOrientation, arginfo_class_Imagick_setImageOrientation, ZEND_ACC_PUBLIC) #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion > 0x634 && MagickLibVersion < 0x700 ZEND_ME(Imagick, paintFloodfillImage, arginfo_class_Imagick_paintFloodfillImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, clutImage, arginfo_class_Imagick_clutImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, getImageProperties, arginfo_class_Imagick_getImageProperties, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, getImageProfiles, arginfo_class_Imagick_getImageProfiles, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, distortImage, arginfo_class_Imagick_distortImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, writeImageFile, arginfo_class_Imagick_writeImageFile, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, writeImagesFile, arginfo_class_Imagick_writeImagesFile, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, resetImagePage, arginfo_class_Imagick_resetImagePage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 && MagickLibVersion < 0x700 ZEND_ME(Imagick, setImageClipMask, arginfo_class_Imagick_setImageClipMask, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x635 && MagickLibVersion < 0x700 ZEND_ME(Imagick, getImageClipMask, arginfo_class_Imagick_getImageClipMask, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x635 ZEND_ME(Imagick, animateImages, arginfo_class_Imagick_animateImages, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x635 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, recolorImage, arginfo_class_Imagick_recolorImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x636 ZEND_ME(Imagick, setFont, arginfo_class_Imagick_setFont, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x636 ZEND_ME(Imagick, getFont, arginfo_class_Imagick_getFont, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x636 ZEND_ME(Imagick, setPointSize, arginfo_class_Imagick_setPointSize, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x636 ZEND_ME(Imagick, getPointSize, arginfo_class_Imagick_getPointSize, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x636 ZEND_ME(Imagick, mergeImageLayers, arginfo_class_Imagick_mergeImageLayers, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x637 ZEND_ME(Imagick, setImageAlphaChannel, arginfo_class_Imagick_setImageAlphaChannel, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x637 ZEND_ME(Imagick, floodfillPaintImage, arginfo_class_Imagick_floodfillPaintImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x637 ZEND_ME(Imagick, opaquePaintImage, arginfo_class_Imagick_opaquePaintImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x637 ZEND_ME(Imagick, transparentPaintImage, arginfo_class_Imagick_transparentPaintImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x638 ZEND_ME(Imagick, liquidRescaleImage, arginfo_class_Imagick_liquidRescaleImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x638 ZEND_ME(Imagick, encipherImage, arginfo_class_Imagick_encipherImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x638 ZEND_ME(Imagick, decipherImage, arginfo_class_Imagick_decipherImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x639 ZEND_ME(Imagick, setGravity, arginfo_class_Imagick_setGravity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x639 ZEND_ME(Imagick, getGravity, arginfo_class_Imagick_getGravity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x639 ZEND_ME(Imagick, getImageChannelRange, arginfo_class_Imagick_getImageChannelRange, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x639 ZEND_ME(Imagick, getImageAlphaChannel, arginfo_class_Imagick_getImageAlphaChannel, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x642 ZEND_ME(Imagick, getImageChannelDistortions, arginfo_class_Imagick_getImageChannelDistortions, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x643 ZEND_ME(Imagick, setImageGravity, arginfo_class_Imagick_setImageGravity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x643 ZEND_ME(Imagick, getImageGravity, arginfo_class_Imagick_getImageGravity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x645 ZEND_ME(Imagick, importImagePixels, arginfo_class_Imagick_importImagePixels, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x645 ZEND_ME(Imagick, deskewImage, arginfo_class_Imagick_deskewImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x645 ZEND_ME(Imagick, segmentImage, arginfo_class_Imagick_segmentImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x645 ZEND_ME(Imagick, sparseColorImage, arginfo_class_Imagick_sparseColorImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x645 ZEND_ME(Imagick, remapImage, arginfo_class_Imagick_remapImage, ZEND_ACC_PUBLIC) #endif #if PHP_IMAGICK_HAVE_HOUGHLINE ZEND_ME(Imagick, houghLineImage, arginfo_class_Imagick_houghLineImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x646 ZEND_ME(Imagick, exportImagePixels, arginfo_class_Imagick_exportImagePixels, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x648 ZEND_ME(Imagick, getImageChannelKurtosis, arginfo_class_Imagick_getImageChannelKurtosis, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x648 ZEND_ME(Imagick, functionImage, arginfo_class_Imagick_functionImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x651 ZEND_ME(Imagick, transformImageColorspace, arginfo_class_Imagick_transformImageColorspace, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x652 ZEND_ME(Imagick, haldClutImage, arginfo_class_Imagick_haldClutImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x655 ZEND_ME(Imagick, autoLevelImage, arginfo_class_Imagick_autoLevelImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x655 ZEND_ME(Imagick, blueShiftImage, arginfo_class_Imagick_blueShiftImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x656 ZEND_ME(Imagick, getImageArtifact, arginfo_class_Imagick_getImageArtifact, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x656 ZEND_ME(Imagick, setImageArtifact, arginfo_class_Imagick_setImageArtifact, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x656 ZEND_ME(Imagick, deleteImageArtifact, arginfo_class_Imagick_deleteImageArtifact, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x656 ZEND_ME(Imagick, getColorspace, arginfo_class_Imagick_getColorspace, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x656 ZEND_ME(Imagick, setColorspace, arginfo_class_Imagick_setColorspace, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x656 ZEND_ME(Imagick, clampImage, arginfo_class_Imagick_clampImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x667 ZEND_ME(Imagick, smushImages, arginfo_class_Imagick_smushImages, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, __construct, arginfo_class_Imagick___construct, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, __toString, arginfo_class_Imagick___toString, ZEND_ACC_PUBLIC) #if PHP_VERSION_ID >= 50600 ZEND_ME(Imagick, count, arginfo_class_Imagick_count, ZEND_ACC_PUBLIC) #endif #if !(PHP_VERSION_ID >= 50600) ZEND_ME(Imagick, count, arginfo_class_Imagick_count, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, getPixelIterator, arginfo_class_Imagick_getPixelIterator, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getPixelRegionIterator, arginfo_class_Imagick_getPixelRegionIterator, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, readImage, arginfo_class_Imagick_readImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, readImages, arginfo_class_Imagick_readImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, readImageBlob, arginfo_class_Imagick_readImageBlob, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageFormat, arginfo_class_Imagick_setImageFormat, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, scaleImage, arginfo_class_Imagick_scaleImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, writeImage, arginfo_class_Imagick_writeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, writeImages, arginfo_class_Imagick_writeImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, blurImage, arginfo_class_Imagick_blurImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, thumbnailImage, arginfo_class_Imagick_thumbnailImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, cropThumbnailImage, arginfo_class_Imagick_cropThumbnailImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageFilename, arginfo_class_Imagick_getImageFilename, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageFilename, arginfo_class_Imagick_setImageFilename, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageFormat, arginfo_class_Imagick_getImageFormat, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageMimeType, arginfo_class_Imagick_getImageMimeType, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, removeImage, arginfo_class_Imagick_removeImage, ZEND_ACC_PUBLIC) ZEND_MALIAS(Imagick, destroy, clear, arginfo_class_Imagick_destroy, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, clear, arginfo_class_Imagick_clear, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, clone, arginfo_class_Imagick_clone, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageSize, arginfo_class_Imagick_getImageSize, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageBlob, arginfo_class_Imagick_getImageBlob, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImagesBlob, arginfo_class_Imagick_getImagesBlob, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setFirstIterator, arginfo_class_Imagick_setFirstIterator, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setLastIterator, arginfo_class_Imagick_setLastIterator, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, resetIterator, arginfo_class_Imagick_resetIterator, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, previousImage, arginfo_class_Imagick_previousImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, nextImage, arginfo_class_Imagick_nextImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, hasPreviousImage, arginfo_class_Imagick_hasPreviousImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, hasNextImage, arginfo_class_Imagick_hasNextImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageIndex, arginfo_class_Imagick_setImageIndex, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageIndex, arginfo_class_Imagick_getImageIndex, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, commentImage, arginfo_class_Imagick_commentImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, cropImage, arginfo_class_Imagick_cropImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, labelImage, arginfo_class_Imagick_labelImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageGeometry, arginfo_class_Imagick_getImageGeometry, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, drawImage, arginfo_class_Imagick_drawImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageCompressionQuality, arginfo_class_Imagick_setImageCompressionQuality, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageCompressionQuality, arginfo_class_Imagick_getImageCompressionQuality, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageCompression, arginfo_class_Imagick_setImageCompression, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageCompression, arginfo_class_Imagick_getImageCompression, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, annotateImage, arginfo_class_Imagick_annotateImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, compositeImage, arginfo_class_Imagick_compositeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, modulateImage, arginfo_class_Imagick_modulateImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageColors, arginfo_class_Imagick_getImageColors, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, montageImage, arginfo_class_Imagick_montageImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, identifyImage, arginfo_class_Imagick_identifyImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, thresholdImage, arginfo_class_Imagick_thresholdImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, adaptiveThresholdImage, arginfo_class_Imagick_adaptiveThresholdImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, blackThresholdImage, arginfo_class_Imagick_blackThresholdImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, whiteThresholdImage, arginfo_class_Imagick_whiteThresholdImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, appendImages, arginfo_class_Imagick_appendImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, charcoalImage, arginfo_class_Imagick_charcoalImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, normalizeImage, arginfo_class_Imagick_normalizeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, oilPaintImage, arginfo_class_Imagick_oilPaintImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, posterizeImage, arginfo_class_Imagick_posterizeImage, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, radialBlurImage, arginfo_class_Imagick_radialBlurImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, raiseImage, arginfo_class_Imagick_raiseImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, resampleImage, arginfo_class_Imagick_resampleImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, resizeImage, arginfo_class_Imagick_resizeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, rollImage, arginfo_class_Imagick_rollImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, rotateImage, arginfo_class_Imagick_rotateImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, sampleImage, arginfo_class_Imagick_sampleImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, solarizeImage, arginfo_class_Imagick_solarizeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, shadowImage, arginfo_class_Imagick_shadowImage, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, setImageAttribute, arginfo_class_Imagick_setImageAttribute, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, setImageBackgroundColor, arginfo_class_Imagick_setImageBackgroundColor, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x700 ZEND_ME(Imagick, setImageChannelMask, arginfo_class_Imagick_setImageChannelMask, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, setImageCompose, arginfo_class_Imagick_setImageCompose, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageDelay, arginfo_class_Imagick_setImageDelay, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageDepth, arginfo_class_Imagick_setImageDepth, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageGamma, arginfo_class_Imagick_setImageGamma, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageIterations, arginfo_class_Imagick_setImageIterations, ZEND_ACC_PUBLIC) #if MagickLibVersion < 0x700 || MagickLibVersion >= 0x705 ZEND_ME(Imagick, setImageMatteColor, arginfo_class_Imagick_setImageMatteColor, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, setImagePage, arginfo_class_Imagick_setImagePage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageProgressMonitor, arginfo_class_Imagick_setImageProgressMonitor, ZEND_ACC_PUBLIC) #if MagickLibVersion > 0x653 ZEND_ME(Imagick, setProgressMonitor, arginfo_class_Imagick_setProgressMonitor, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, setImageResolution, arginfo_class_Imagick_setImageResolution, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageScene, arginfo_class_Imagick_setImageScene, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageTicksPerSecond, arginfo_class_Imagick_setImageTicksPerSecond, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageType, arginfo_class_Imagick_setImageType, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageUnits, arginfo_class_Imagick_setImageUnits, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, sharpenImage, arginfo_class_Imagick_sharpenImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, shaveImage, arginfo_class_Imagick_shaveImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, shearImage, arginfo_class_Imagick_shearImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, spliceImage, arginfo_class_Imagick_spliceImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, pingImage, arginfo_class_Imagick_pingImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, readImageFile, arginfo_class_Imagick_readImageFile, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, displayImage, arginfo_class_Imagick_displayImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, displayImages, arginfo_class_Imagick_displayImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, spreadImage, arginfo_class_Imagick_spreadImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, swirlImage, arginfo_class_Imagick_swirlImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, stripImage, arginfo_class_Imagick_stripImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, queryFormats, arginfo_class_Imagick_queryFormats, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, queryFonts, arginfo_class_Imagick_queryFonts, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, queryFontMetrics, arginfo_class_Imagick_queryFontMetrics, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, steganoImage, arginfo_class_Imagick_steganoImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, addNoiseImage, arginfo_class_Imagick_addNoiseImage, ZEND_ACC_PUBLIC) #if IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE ZEND_ME(Imagick, addNoiseImageWithAttenuate, arginfo_class_Imagick_addNoiseImageWithAttenuate, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, motionBlurImage, arginfo_class_Imagick_motionBlurImage, ZEND_ACC_PUBLIC) #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) ZEND_ME(Imagick, mosaicImages, arginfo_class_Imagick_mosaicImages, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, morphImages, arginfo_class_Imagick_morphImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, minifyImage, arginfo_class_Imagick_minifyImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, affineTransformImage, arginfo_class_Imagick_affineTransformImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, averageImages, arginfo_class_Imagick_averageImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, borderImage, arginfo_class_Imagick_borderImage, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x700 ZEND_ME(Imagick, borderImageWithComposite, arginfo_class_Imagick_borderImageWithComposite, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, calculateCrop, arginfo_class_Imagick_calculateCrop, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, chopImage, arginfo_class_Imagick_chopImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, clipImage, arginfo_class_Imagick_clipImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, clipPathImage, arginfo_class_Imagick_clipPathImage, ZEND_ACC_PUBLIC) ZEND_MALIAS(Imagick, clipImagePath, clipPathImage, arginfo_class_Imagick_clipImagePath, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, coalesceImages, arginfo_class_Imagick_coalesceImages, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, colorFloodfillImage, arginfo_class_Imagick_colorFloodfillImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, colorizeImage, arginfo_class_Imagick_colorizeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, compareImageChannels, arginfo_class_Imagick_compareImageChannels, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, compareImages, arginfo_class_Imagick_compareImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, contrastImage, arginfo_class_Imagick_contrastImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, combineImages, arginfo_class_Imagick_combineImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, convolveImage, arginfo_class_Imagick_convolveImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, cycleColormapImage, arginfo_class_Imagick_cycleColormapImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, deconstructImages, arginfo_class_Imagick_deconstructImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, despeckleImage, arginfo_class_Imagick_despeckleImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, edgeImage, arginfo_class_Imagick_edgeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, embossImage, arginfo_class_Imagick_embossImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, enhanceImage, arginfo_class_Imagick_enhanceImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, equalizeImage, arginfo_class_Imagick_equalizeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, evaluateImage, arginfo_class_Imagick_evaluateImage, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x687 ZEND_ME(Imagick, evaluateImages, arginfo_class_Imagick_evaluateImages, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, flattenImages, arginfo_class_Imagick_flattenImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, flipImage, arginfo_class_Imagick_flipImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, flopImage, arginfo_class_Imagick_flopImage, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x655 ZEND_ME(Imagick, forwardFourierTransformImage, arginfo_class_Imagick_forwardFourierTransformImage, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, frameImage, arginfo_class_Imagick_frameImage, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x700 ZEND_ME(Imagick, frameImageWithComposite, arginfo_class_Imagick_frameImageWithComposite, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, fxImage, arginfo_class_Imagick_fxImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, gammaImage, arginfo_class_Imagick_gammaImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, gaussianBlurImage, arginfo_class_Imagick_gaussianBlurImage, ZEND_ACC_PUBLIC) #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) ZEND_ME(Imagick, getImageAttribute, arginfo_class_Imagick_getImageAttribute, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, getImageBackgroundColor, arginfo_class_Imagick_getImageBackgroundColor, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageBluePrimary, arginfo_class_Imagick_getImageBluePrimary, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageBorderColor, arginfo_class_Imagick_getImageBorderColor, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageChannelDepth, arginfo_class_Imagick_getImageChannelDepth, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageChannelDistortion, arginfo_class_Imagick_getImageChannelDistortion, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, getImageChannelExtrema, arginfo_class_Imagick_getImageChannelExtrema, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, getImageChannelMean, arginfo_class_Imagick_getImageChannelMean, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageChannelStatistics, arginfo_class_Imagick_getImageChannelStatistics, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageColormapColor, arginfo_class_Imagick_getImageColormapColor, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageColorspace, arginfo_class_Imagick_getImageColorspace, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageCompose, arginfo_class_Imagick_getImageCompose, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageDelay, arginfo_class_Imagick_getImageDelay, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageDepth, arginfo_class_Imagick_getImageDepth, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageDistortion, arginfo_class_Imagick_getImageDistortion, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, getImageExtrema, arginfo_class_Imagick_getImageExtrema, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, getImageDispose, arginfo_class_Imagick_getImageDispose, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageGamma, arginfo_class_Imagick_getImageGamma, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageGreenPrimary, arginfo_class_Imagick_getImageGreenPrimary, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageHeight, arginfo_class_Imagick_getImageHeight, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageHistogram, arginfo_class_Imagick_getImageHistogram, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageInterlaceScheme, arginfo_class_Imagick_getImageInterlaceScheme, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageIterations, arginfo_class_Imagick_getImageIterations, ZEND_ACC_PUBLIC) #if MagickLibVersion < 0x700 ZEND_ME(Imagick, getImageMatteColor, arginfo_class_Imagick_getImageMatteColor, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, getImagePage, arginfo_class_Imagick_getImagePage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImagePixelColor, arginfo_class_Imagick_getImagePixelColor, ZEND_ACC_PUBLIC) #if IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR ZEND_ME(Imagick, setImagePixelColor, arginfo_class_Imagick_setImagePixelColor, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, getImageProfile, arginfo_class_Imagick_getImageProfile, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageRedPrimary, arginfo_class_Imagick_getImageRedPrimary, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageRenderingIntent, arginfo_class_Imagick_getImageRenderingIntent, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageResolution, arginfo_class_Imagick_getImageResolution, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageScene, arginfo_class_Imagick_getImageScene, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageSignature, arginfo_class_Imagick_getImageSignature, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageTicksPerSecond, arginfo_class_Imagick_getImageTicksPerSecond, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageType, arginfo_class_Imagick_getImageType, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageUnits, arginfo_class_Imagick_getImageUnits, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageVirtualPixelMethod, arginfo_class_Imagick_getImageVirtualPixelMethod, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageWhitePoint, arginfo_class_Imagick_getImageWhitePoint, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageWidth, arginfo_class_Imagick_getImageWidth, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getNumberImages, arginfo_class_Imagick_getNumberImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageTotalInkDensity, arginfo_class_Imagick_getImageTotalInkDensity, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImageRegion, arginfo_class_Imagick_getImageRegion, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, implodeImage, arginfo_class_Imagick_implodeImage, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x658 ZEND_ME(Imagick, inverseFourierTransformImage, arginfo_class_Imagick_inverseFourierTransformImage, ZEND_ACC_PUBLIC) #endif ZEND_ME(Imagick, levelImage, arginfo_class_Imagick_levelImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, magnifyImage, arginfo_class_Imagick_magnifyImage, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, mapImage, arginfo_class_Imagick_mapImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, matteFloodfillImage, arginfo_class_Imagick_matteFloodfillImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion < 0x700 && !defined(MAGICKCORE_EXCLUDE_DEPRECATED) ZEND_ME(Imagick, medianFilterImage, arginfo_class_Imagick_medianFilterImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, negateImage, arginfo_class_Imagick_negateImage, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, paintOpaqueImage, arginfo_class_Imagick_paintOpaqueImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, paintTransparentImage, arginfo_class_Imagick_paintTransparentImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, previewImages, arginfo_class_Imagick_previewImages, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, profileImage, arginfo_class_Imagick_profileImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, quantizeImage, arginfo_class_Imagick_quantizeImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, quantizeImages, arginfo_class_Imagick_quantizeImages, ZEND_ACC_PUBLIC) #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) && MagickLibVersion < 0x700 ZEND_ME(Imagick, reduceNoiseImage, arginfo_class_Imagick_reduceNoiseImage, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, removeImageProfile, arginfo_class_Imagick_removeImageProfile, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, separateImageChannel, arginfo_class_Imagick_separateImageChannel, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, sepiaToneImage, arginfo_class_Imagick_sepiaToneImage, ZEND_ACC_PUBLIC) #if MagickLibVersion < 0x700 ZEND_ME(Imagick, setImageBias, arginfo_class_Imagick_setImageBias, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion < 0x700 ZEND_ME(Imagick, setImageBiasQuantum, arginfo_class_Imagick_setImageBiasQuantum, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(Imagick, setImageBluePrimary, arginfo_class_Imagick_setImageBluePrimary, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageBorderColor, arginfo_class_Imagick_setImageBorderColor, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageChannelDepth, arginfo_class_Imagick_setImageChannelDepth, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageColormapColor, arginfo_class_Imagick_setImageColormapColor, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageColorspace, arginfo_class_Imagick_setImageColorspace, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageDispose, arginfo_class_Imagick_setImageDispose, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageExtent, arginfo_class_Imagick_setImageExtent, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageGreenPrimary, arginfo_class_Imagick_setImageGreenPrimary, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageInterlaceScheme, arginfo_class_Imagick_setImageInterlaceScheme, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageProfile, arginfo_class_Imagick_setImageProfile, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageRedPrimary, arginfo_class_Imagick_setImageRedPrimary, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageRenderingIntent, arginfo_class_Imagick_setImageRenderingIntent, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageVirtualPixelMethod, arginfo_class_Imagick_setImageVirtualPixelMethod, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImageWhitePoint, arginfo_class_Imagick_setImageWhitePoint, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, sigmoidalContrastImage, arginfo_class_Imagick_sigmoidalContrastImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, stereoImage, arginfo_class_Imagick_stereoImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, textureImage, arginfo_class_Imagick_textureImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, tintImage, arginfo_class_Imagick_tintImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, unsharpMaskImage, arginfo_class_Imagick_unsharpMaskImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getImage, arginfo_class_Imagick_getImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, addImage, arginfo_class_Imagick_addImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setImage, arginfo_class_Imagick_setImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, newImage, arginfo_class_Imagick_newImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, newPseudoImage, arginfo_class_Imagick_newPseudoImage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getCompression, arginfo_class_Imagick_getCompression, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getCompressionQuality, arginfo_class_Imagick_getCompressionQuality, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getCopyright, arginfo_class_Imagick_getCopyright, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getConfigureOptions, arginfo_class_Imagick_getConfigureOptions, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #if MagickLibVersion > 0x660 ZEND_ME(Imagick, getFeatures, arginfo_class_Imagick_getFeatures, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #endif ZEND_ME(Imagick, getFilename, arginfo_class_Imagick_getFilename, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getFormat, arginfo_class_Imagick_getFormat, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getHomeURL, arginfo_class_Imagick_getHomeURL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getInterlaceScheme, arginfo_class_Imagick_getInterlaceScheme, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getOption, arginfo_class_Imagick_getOption, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getPackageName, arginfo_class_Imagick_getPackageName, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getPage, arginfo_class_Imagick_getPage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getQuantum, arginfo_class_Imagick_getQuantum, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getHdriEnabled, arginfo_class_Imagick_getHdriEnabled, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getQuantumDepth, arginfo_class_Imagick_getQuantumDepth, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getQuantumRange, arginfo_class_Imagick_getQuantumRange, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getReleaseDate, arginfo_class_Imagick_getReleaseDate, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getResource, arginfo_class_Imagick_getResource, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getResourceLimit, arginfo_class_Imagick_getResourceLimit, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, getSamplingFactors, arginfo_class_Imagick_getSamplingFactors, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getSize, arginfo_class_Imagick_getSize, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, getVersion, arginfo_class_Imagick_getVersion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, setBackgroundColor, arginfo_class_Imagick_setBackgroundColor, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setCompression, arginfo_class_Imagick_setCompression, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setCompressionQuality, arginfo_class_Imagick_setCompressionQuality, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setFilename, arginfo_class_Imagick_setFilename, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setFormat, arginfo_class_Imagick_setFormat, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setInterlaceScheme, arginfo_class_Imagick_setInterlaceScheme, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setOption, arginfo_class_Imagick_setOption, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setPage, arginfo_class_Imagick_setPage, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setResourceLimit, arginfo_class_Imagick_setResourceLimit, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(Imagick, setResolution, arginfo_class_Imagick_setResolution, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setSamplingFactors, arginfo_class_Imagick_setSamplingFactors, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setSize, arginfo_class_Imagick_setSize, ZEND_ACC_PUBLIC) ZEND_ME(Imagick, setType, arginfo_class_Imagick_setType, ZEND_ACC_PUBLIC) #if MagickLibVersion > 0x628 ZEND_MALIAS(Imagick, key, getIteratorIndex, arginfo_class_Imagick_key, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_MALIAS(Imagick, next, nextImage, arginfo_class_Imagick_next, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_MALIAS(Imagick, rewind, setFirstIterator, arginfo_class_Imagick_rewind, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, valid, arginfo_class_Imagick_valid, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, current, arginfo_class_Imagick_current, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x659 ZEND_ME(Imagick, brightnessContrastImage, arginfo_class_Imagick_brightnessContrastImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion > 0x661 ZEND_ME(Imagick, colorMatrixImage, arginfo_class_Imagick_colorMatrixImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, selectiveBlurImage, arginfo_class_Imagick_selectiveBlurImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x689 ZEND_ME(Imagick, rotationalBlurImage, arginfo_class_Imagick_rotationalBlurImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x683 ZEND_ME(Imagick, statisticImage, arginfo_class_Imagick_statisticImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652 ZEND_ME(Imagick, subimageMatch, arginfo_class_Imagick_subimageMatch, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652 ZEND_MALIAS(Imagick, similarityImage, subimageMatch, arginfo_class_Imagick_similarityImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, setRegistry, arginfo_class_Imagick_setRegistry, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, getRegistry, arginfo_class_Imagick_getRegistry, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, listRegistry, arginfo_class_Imagick_listRegistry, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x680 ZEND_ME(Imagick, morphology, arginfo_class_Imagick_morphology, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && defined(IMAGICK_WITH_KERNEL) && MagickLibVersion < 0x700 ZEND_ME(Imagick, filter, arginfo_class_Imagick_filter, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, setAntialias, arginfo_class_Imagick_setAntialias, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 ZEND_ME(Imagick, getAntialias, arginfo_class_Imagick_getAntialias, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion > 0x676 ZEND_ME(Imagick, colorDecisionListImage, arginfo_class_Imagick_colorDecisionListImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x687 ZEND_ME(Imagick, optimizeImageTransparency, arginfo_class_Imagick_optimizeImageTransparency, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x660 ZEND_ME(Imagick, autoGammaImage, arginfo_class_Imagick_autoGammaImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 ZEND_ME(Imagick, autoOrient, arginfo_class_Imagick_autoOrient, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 ZEND_MALIAS(Imagick, autoOrientate, autoOrient, arginfo_class_Imagick_autoOrientate, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x692 ZEND_ME(Imagick, compositeImageGravity, arginfo_class_Imagick_compositeImageGravity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x693 ZEND_ME(Imagick, localContrastImage, arginfo_class_Imagick_localContrastImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x700 ZEND_ME(Imagick, identifyImageType, arginfo_class_Imagick_identifyImageType, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_GETSETIMAGEMASK ZEND_ME(Imagick, getImageMask, arginfo_class_Imagick_getImageMask, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_GETSETIMAGEMASK ZEND_ME(Imagick, setImageMask, arginfo_class_Imagick_setImageMask, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x709 ZEND_ME(Imagick, cannyEdgeImage, arginfo_class_Imagick_cannyEdgeImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_SETSEED ZEND_ME(Imagick, setSeed, arginfo_class_Imagick_setSeed, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE ZEND_ME(Imagick, waveletDenoiseImage, arginfo_class_Imagick_waveletDenoiseImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_MEANSHIFTIMAGE ZEND_ME(Imagick, meanShiftImage, arginfo_class_Imagick_meanShiftImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_KMEANSIMAGE ZEND_ME(Imagick, kmeansImage, arginfo_class_Imagick_kmeansImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE ZEND_ME(Imagick, rangeThresholdImage, arginfo_class_Imagick_rangeThresholdImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE ZEND_ME(Imagick, autoThresholdImage, arginfo_class_Imagick_autoThresholdImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_BILATERALBLURIMAGE ZEND_ME(Imagick, bilateralBlurImage, arginfo_class_Imagick_bilateralBlurImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_CLAHEIMAGE ZEND_ME(Imagick, claheImage, arginfo_class_Imagick_claheImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_CHANNELFXIMAGE ZEND_ME(Imagick, channelFxImage, arginfo_class_Imagick_channelFxImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE ZEND_ME(Imagick, colorThresholdImage, arginfo_class_Imagick_colorThresholdImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_COMPLEXIMAGES ZEND_ME(Imagick, complexImages, arginfo_class_Imagick_complexImages, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE ZEND_ME(Imagick, interpolativeResizeImage, arginfo_class_Imagick_interpolativeResizeImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_LEVELIMAGECOLORS ZEND_ME(Imagick, levelImageColors, arginfo_class_Imagick_levelImageColors, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_LEVELIZEIMAGE ZEND_ME(Imagick, levelizeImage, arginfo_class_Imagick_levelizeImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE ZEND_ME(Imagick, orderedDitherImage, arginfo_class_Imagick_orderedDitherImage, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x628 && IM_HAVE_IMAGICK_WHITEBALANCEIMAGE ZEND_ME(Imagick, whiteBalanceImage, arginfo_class_Imagick_whiteBalanceImage, ZEND_ACC_PUBLIC) #endif ZEND_FE_END };imagick-3.6.0/ImagickDraw_arginfo.h0000644000000000000000000016445314145213431015675 0ustar rootroot/* This is a generated file, edit the .stub.php file instead. * Stub hash: regen with 'sh regen_arginfo.sh' * file has been fixedup for different versions */ #if MagickLibVersion > 0x628 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_resetVectorGraphics, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_resetVectorGraphics, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x649 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getTextKerning, 0, 0, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getTextKerning, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x649 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextKerning, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextKerning, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, kerning, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, kerning) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x649 #define arginfo_class_ImagickDraw_getTextInterwordSpacing arginfo_class_ImagickDraw_getTextKerning #endif #if MagickLibVersion > 0x649 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextInterwordSpacing, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextInterwordSpacing, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, spacing, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, spacing) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x655 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getTextInterlineSpacing, 0, 0, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getTextInterlineSpacing, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x655 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextInterlineSpacing, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextInterlineSpacing, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, spacing, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, spacing) #endif ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw___construct, 0, 0, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFillColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFillColor, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, fill_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFillAlpha, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFillAlpha, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, alpha, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, alpha) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setResolution, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setResolution, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, resolution_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, resolution_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, resolution_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, resolution_y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeColor, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_setStrokeAlpha arginfo_class_ImagickDraw_setFillAlpha #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeWidth, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeWidth, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, width) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_clear, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_clear, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_circle, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_circle, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, origin_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, origin_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, origin_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, origin_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, perimeter_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, perimeter_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, perimeter_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, perimeter_y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_annotation, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_annotation, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) #else ZEND_ARG_INFO(0, text) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextAntialias, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextAntialias, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, antialias, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, antialias) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextEncoding, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextEncoding, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) #else ZEND_ARG_INFO(0, encoding) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFont, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFont, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, font_name, IS_STRING, 0) #else ZEND_ARG_INFO(0, font_name) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFontFamily, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFontFamily, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, font_family, IS_STRING, 0) #else ZEND_ARG_INFO(0, font_family) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFontSize, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFontSize, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, point_size, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, point_size) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFontStyle, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFontStyle, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0) #else ZEND_ARG_INFO(0, style) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFontWeight, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFontWeight, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, weight, IS_LONG, 0) #else ZEND_ARG_INFO(0, weight) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getFont, 0, 0, IS_STRING, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getFont, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_getFontFamily arginfo_class_ImagickDraw_getFont #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getFontSize, 0, 0, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getFontSize, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getFontStyle, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getFontStyle, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_getFontWeight arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_destroy arginfo_class_ImagickDraw_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_rectangle, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_rectangle, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, top_left_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, top_left_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, top_left_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, top_left_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bottom_right_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, bottom_right_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bottom_right_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, bottom_right_y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_roundRectangle, 0, 6, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_roundRectangle, 0, 0, 6) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, top_left_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, top_left_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, top_left_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, top_left_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bottom_right_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, bottom_right_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bottom_right_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, bottom_right_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rounding_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, rounding_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rounding_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, rounding_y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_ellipse, 0, 6, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_ellipse, 0, 0, 6) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, origin_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, origin_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, origin_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, origin_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, radius_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, radius_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle_start, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle_start) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, angle_end, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, angle_end) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_skewX, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_skewX, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, degrees, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, degrees) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_skewY arginfo_class_ImagickDraw_skewX #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_translate, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_translate, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_line, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_line, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, start_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, start_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, start_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, start_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, end_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, end_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, end_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, end_y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_arc, 0, 6, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_arc, 0, 0, 6) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, start_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, start_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, start_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, start_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, end_x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, end_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, end_y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, end_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, start_angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, start_angle) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, end_angle, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, end_angle) #endif ZEND_END_ARG_INFO() #if MagickLibVersion >= 0x700 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_alpha, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_alpha, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, paint, IS_LONG, 0) #else ZEND_ARG_INFO(0, paint) #endif ZEND_END_ARG_INFO() #endif #if !(MagickLibVersion >= 0x700) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_matte, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_matte, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, paint, IS_LONG, 0) #else ZEND_ARG_INFO(0, paint) #endif ZEND_END_ARG_INFO() #endif #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_polygon, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_polygon, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, coordinates, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, coordinates) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_point arginfo_class_ImagickDraw_translate #define arginfo_class_ImagickDraw_getTextDecoration arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getTextEncoding arginfo_class_ImagickDraw_getFont #define arginfo_class_ImagickDraw_getFontStretch arginfo_class_ImagickDraw_getFontStyle #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFontStretch, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFontStretch, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, stretch, IS_LONG, 0) #else ZEND_ARG_INFO(0, stretch) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeAntialias, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeAntialias, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, enabled, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, enabled) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextAlignment, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextAlignment, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, align, IS_LONG, 0) #else ZEND_ARG_INFO(0, align) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextDecoration, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextDecoration, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, decoration, IS_LONG, 0) #else ZEND_ARG_INFO(0, decoration) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextUnderColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextUnderColor, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, under_color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setViewbox, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setViewbox, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, left_x, IS_LONG, 0) #else ZEND_ARG_INFO(0, left_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, top_y, IS_LONG, 0) #else ZEND_ARG_INFO(0, top_y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, right_x, IS_LONG, 0) #else ZEND_ARG_INFO(0, right_x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, bottom_y, IS_LONG, 0) #else ZEND_ARG_INFO(0, bottom_y) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ImagickDraw_clone, 0, 0, ImagickDraw, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_clone, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_affine, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_affine, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, affine, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, affine) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_bezier arginfo_class_ImagickDraw_polygon #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_composite, 0, 6, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_composite, 0, 0, 6) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, composite, IS_LONG, 0) #else ZEND_ARG_INFO(0, composite) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, height) #endif ZEND_ARG_OBJ_INFO(0, image, Imagick, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_color, 0, 3, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_color, 0, 0, 3) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, paint, IS_LONG, 0) #else ZEND_ARG_INFO(0, paint) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_comment, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_comment, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, comment, IS_STRING, 0) #else ZEND_ARG_INFO(0, comment) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_getClipPath arginfo_class_ImagickDraw_getFont #define arginfo_class_ImagickDraw_getClipRule arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getClipUnits arginfo_class_ImagickDraw_getFontStyle #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ImagickDraw_getFillColor, 0, 0, ImagickPixel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getFillColor, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_getFillOpacity arginfo_class_ImagickDraw_getFontSize #define arginfo_class_ImagickDraw_getFillRule arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getGravity arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getStrokeAntialias arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_getStrokeColor arginfo_class_ImagickDraw_getFillColor #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getStrokeDashArray, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getStrokeDashArray, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_getStrokeDashOffset arginfo_class_ImagickDraw_getFontSize #define arginfo_class_ImagickDraw_getStrokeLineCap arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getStrokeLineJoin arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getStrokeMiterLimit arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getStrokeOpacity arginfo_class_ImagickDraw_getFontSize #define arginfo_class_ImagickDraw_getStrokeWidth arginfo_class_ImagickDraw_getFontSize #define arginfo_class_ImagickDraw_getTextAlignment arginfo_class_ImagickDraw_getFontStyle #define arginfo_class_ImagickDraw_getTextAntialias arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_getVectorGraphics arginfo_class_ImagickDraw_getFont #define arginfo_class_ImagickDraw_getTextUnderColor arginfo_class_ImagickDraw_getFillColor #define arginfo_class_ImagickDraw_pathClose arginfo_class_ImagickDraw_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pathCurveToAbsolute, 0, 6, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pathCurveToAbsolute, 0, 0, 6) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x1, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y1, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x2, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y2, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pathCurveToRelative arginfo_class_ImagickDraw_pathCurveToAbsolute #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pathCurveToQuadraticBezierAbsolute, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pathCurveToQuadraticBezierAbsolute, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x1, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y1, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x_end, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x_end) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pathCurveToQuadraticBezierRelative arginfo_class_ImagickDraw_pathCurveToQuadraticBezierAbsolute #define arginfo_class_ImagickDraw_pathCurveToQuadraticBezierSmoothAbsolute arginfo_class_ImagickDraw_translate #define arginfo_class_ImagickDraw_pathCurveToQuadraticBezierSmoothRelative arginfo_class_ImagickDraw_translate #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pathCurveToSmoothAbsolute, 0, 4, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pathCurveToSmoothAbsolute, 0, 0, 4) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x2, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y2, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pathCurveToSmoothRelative arginfo_class_ImagickDraw_pathCurveToSmoothAbsolute #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pathEllipticArcAbsolute, 0, 7, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pathEllipticArcAbsolute, 0, 0, 7) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rx, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, rx) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, ry, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, ry) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x_axis_rotation, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x_axis_rotation) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, large_arc, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, large_arc) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, sweep, _IS_BOOL, 0) #else ZEND_ARG_INFO(0, sweep) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pathEllipticArcRelative arginfo_class_ImagickDraw_pathEllipticArcAbsolute #define arginfo_class_ImagickDraw_pathFinish arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_pathLineToAbsolute arginfo_class_ImagickDraw_translate #define arginfo_class_ImagickDraw_pathLineToRelative arginfo_class_ImagickDraw_translate #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pathLineToHorizontalAbsolute, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pathLineToHorizontalAbsolute, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pathLineToHorizontalRelative arginfo_class_ImagickDraw_pathLineToHorizontalAbsolute #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pathLineToVerticalAbsolute, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pathLineToVerticalAbsolute, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pathLineToVerticalRelative arginfo_class_ImagickDraw_pathLineToVerticalAbsolute #define arginfo_class_ImagickDraw_pathMoveToAbsolute arginfo_class_ImagickDraw_translate #define arginfo_class_ImagickDraw_pathMoveToRelative arginfo_class_ImagickDraw_translate #define arginfo_class_ImagickDraw_pathStart arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_polyline arginfo_class_ImagickDraw_polygon #define arginfo_class_ImagickDraw_popClipPath arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_popDefs arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_popPattern arginfo_class_ImagickDraw_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pushClipPath, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pushClipPath, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, clip_mask_id, IS_STRING, 0) #else ZEND_ARG_INFO(0, clip_mask_id) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pushDefs arginfo_class_ImagickDraw_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_pushPattern, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_pushPattern, 0, 0, 5) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pattern_id, IS_STRING, 0) #else ZEND_ARG_INFO(0, pattern_id) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, width, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, width) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, height, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, height) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_render arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_rotate arginfo_class_ImagickDraw_skewX #define arginfo_class_ImagickDraw_scale arginfo_class_ImagickDraw_translate #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setClipPath, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setClipPath, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, clip_mask, IS_STRING, 0) #else ZEND_ARG_INFO(0, clip_mask) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setClipRule, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setClipRule, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fillrule, IS_LONG, 0) #else ZEND_ARG_INFO(0, fillrule) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setClipUnits, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setClipUnits, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, pathunits, IS_LONG, 0) #else ZEND_ARG_INFO(0, pathunits) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFillOpacity, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFillOpacity, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, opacity, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, opacity) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFillPatternUrl, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFillPatternUrl, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, fill_url, IS_STRING, 0) #else ZEND_ARG_INFO(0, fill_url) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_setFillRule arginfo_class_ImagickDraw_setClipRule #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setGravity, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setGravity, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, gravity, IS_LONG, 0) #else ZEND_ARG_INFO(0, gravity) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokePatternUrl, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokePatternUrl, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, stroke_url, IS_STRING, 0) #else ZEND_ARG_INFO(0, stroke_url) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeDashOffset, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeDashOffset, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dash_offset, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, dash_offset) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeLineCap, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeLineCap, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, linecap, IS_LONG, 0) #else ZEND_ARG_INFO(0, linecap) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeLineJoin, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeLineJoin, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, linejoin, IS_LONG, 0) #else ZEND_ARG_INFO(0, linejoin) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeMiterLimit, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeMiterLimit, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, miterlimit, IS_LONG, 0) #else ZEND_ARG_INFO(0, miterlimit) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_setStrokeOpacity arginfo_class_ImagickDraw_setFillOpacity #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setVectorGraphics, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setVectorGraphics, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, xml, IS_STRING, 0) #else ZEND_ARG_INFO(0, xml) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickDraw_pop arginfo_class_ImagickDraw_clear #define arginfo_class_ImagickDraw_push arginfo_class_ImagickDraw_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setStrokeDashArray, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setStrokeDashArray, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, dashes, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, dashes) #endif ZEND_END_ARG_INFO() #if MagickLibVersion >= 0x693 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getOpacity, 0, 0, IS_DOUBLE, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getOpacity, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x693 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setOpacity, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setOpacity, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, opacity, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, opacity) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x675 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getFontResolution, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getFontResolution, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x675 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setFontResolution, 0, 2, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setFontResolution, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, y) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x675 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ImagickDraw_getBorderColor, 0, 0, ImagickPixel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getBorderColor, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x675 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setBorderColor, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setBorderColor, 0, 0, 1) #endif ZEND_ARG_OBJ_TYPE_MASK(0, color, ImagickPixel, MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x693 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setDensity, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setDensity, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, density, IS_STRING, 0) #else ZEND_ARG_INFO(0, density) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x693 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getDensity, 0, 0, IS_STRING, 1) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getDensity, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x692 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_getTextDirection, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_getTextDirection, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion >= 0x692 #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickDraw_setTextDirection, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickDraw_setTextDirection, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, direction, IS_LONG, 0) #else ZEND_ARG_INFO(0, direction) #endif ZEND_END_ARG_INFO() #endif #if MagickLibVersion > 0x628 ZEND_METHOD(ImagickDraw, resetVectorGraphics); #endif #if MagickLibVersion > 0x649 ZEND_METHOD(ImagickDraw, getTextKerning); #endif #if MagickLibVersion > 0x649 ZEND_METHOD(ImagickDraw, setTextKerning); #endif #if MagickLibVersion > 0x649 ZEND_METHOD(ImagickDraw, getTextInterwordSpacing); #endif #if MagickLibVersion > 0x649 ZEND_METHOD(ImagickDraw, setTextInterwordSpacing); #endif #if MagickLibVersion > 0x655 ZEND_METHOD(ImagickDraw, getTextInterlineSpacing); #endif #if MagickLibVersion > 0x655 ZEND_METHOD(ImagickDraw, setTextInterlineSpacing); #endif ZEND_METHOD(ImagickDraw, __construct); ZEND_METHOD(ImagickDraw, setFillColor); ZEND_METHOD(ImagickDraw, setFillAlpha); ZEND_METHOD(ImagickDraw, setResolution); ZEND_METHOD(ImagickDraw, setStrokeColor); ZEND_METHOD(ImagickDraw, setStrokeAlpha); ZEND_METHOD(ImagickDraw, setStrokeWidth); ZEND_METHOD(ImagickDraw, clear); ZEND_METHOD(ImagickDraw, circle); ZEND_METHOD(ImagickDraw, annotation); ZEND_METHOD(ImagickDraw, setTextAntialias); ZEND_METHOD(ImagickDraw, setTextEncoding); ZEND_METHOD(ImagickDraw, setFont); ZEND_METHOD(ImagickDraw, setFontFamily); ZEND_METHOD(ImagickDraw, setFontSize); ZEND_METHOD(ImagickDraw, setFontStyle); ZEND_METHOD(ImagickDraw, setFontWeight); ZEND_METHOD(ImagickDraw, getFont); ZEND_METHOD(ImagickDraw, getFontFamily); ZEND_METHOD(ImagickDraw, getFontSize); ZEND_METHOD(ImagickDraw, getFontStyle); ZEND_METHOD(ImagickDraw, getFontWeight); ZEND_METHOD(ImagickDraw, rectangle); ZEND_METHOD(ImagickDraw, roundRectangle); ZEND_METHOD(ImagickDraw, ellipse); ZEND_METHOD(ImagickDraw, skewX); ZEND_METHOD(ImagickDraw, skewY); ZEND_METHOD(ImagickDraw, translate); ZEND_METHOD(ImagickDraw, line); ZEND_METHOD(ImagickDraw, arc); #if MagickLibVersion >= 0x700 ZEND_METHOD(ImagickDraw, alpha); #endif #if !(MagickLibVersion >= 0x700) ZEND_METHOD(ImagickDraw, matte); #endif ZEND_METHOD(ImagickDraw, polygon); ZEND_METHOD(ImagickDraw, point); ZEND_METHOD(ImagickDraw, getTextDecoration); ZEND_METHOD(ImagickDraw, getTextEncoding); ZEND_METHOD(ImagickDraw, getFontStretch); ZEND_METHOD(ImagickDraw, setFontStretch); ZEND_METHOD(ImagickDraw, setStrokeAntialias); ZEND_METHOD(ImagickDraw, setTextAlignment); ZEND_METHOD(ImagickDraw, setTextDecoration); ZEND_METHOD(ImagickDraw, setTextUnderColor); ZEND_METHOD(ImagickDraw, setViewbox); ZEND_METHOD(ImagickDraw, clone); ZEND_METHOD(ImagickDraw, affine); ZEND_METHOD(ImagickDraw, bezier); ZEND_METHOD(ImagickDraw, composite); ZEND_METHOD(ImagickDraw, color); ZEND_METHOD(ImagickDraw, comment); ZEND_METHOD(ImagickDraw, getClipPath); ZEND_METHOD(ImagickDraw, getClipRule); ZEND_METHOD(ImagickDraw, getClipUnits); ZEND_METHOD(ImagickDraw, getFillColor); ZEND_METHOD(ImagickDraw, getFillOpacity); ZEND_METHOD(ImagickDraw, getFillRule); ZEND_METHOD(ImagickDraw, getGravity); ZEND_METHOD(ImagickDraw, getStrokeAntialias); ZEND_METHOD(ImagickDraw, getStrokeColor); ZEND_METHOD(ImagickDraw, getStrokeDashArray); ZEND_METHOD(ImagickDraw, getStrokeDashOffset); ZEND_METHOD(ImagickDraw, getStrokeLineCap); ZEND_METHOD(ImagickDraw, getStrokeLineJoin); ZEND_METHOD(ImagickDraw, getStrokeMiterLimit); ZEND_METHOD(ImagickDraw, getStrokeOpacity); ZEND_METHOD(ImagickDraw, getStrokeWidth); ZEND_METHOD(ImagickDraw, getTextAlignment); ZEND_METHOD(ImagickDraw, getTextAntialias); ZEND_METHOD(ImagickDraw, getVectorGraphics); ZEND_METHOD(ImagickDraw, getTextUnderColor); ZEND_METHOD(ImagickDraw, pathClose); ZEND_METHOD(ImagickDraw, pathCurveToAbsolute); ZEND_METHOD(ImagickDraw, pathCurveToRelative); ZEND_METHOD(ImagickDraw, pathCurveToQuadraticBezierAbsolute); ZEND_METHOD(ImagickDraw, pathCurveToQuadraticBezierRelative); ZEND_METHOD(ImagickDraw, pathCurveToQuadraticBezierSmoothAbsolute); ZEND_METHOD(ImagickDraw, pathCurveToQuadraticBezierSmoothRelative); ZEND_METHOD(ImagickDraw, pathCurveToSmoothAbsolute); ZEND_METHOD(ImagickDraw, pathCurveToSmoothRelative); ZEND_METHOD(ImagickDraw, pathEllipticArcAbsolute); ZEND_METHOD(ImagickDraw, pathEllipticArcRelative); ZEND_METHOD(ImagickDraw, pathFinish); ZEND_METHOD(ImagickDraw, pathLineToAbsolute); ZEND_METHOD(ImagickDraw, pathLineToRelative); ZEND_METHOD(ImagickDraw, pathLineToHorizontalAbsolute); ZEND_METHOD(ImagickDraw, pathLineToHorizontalRelative); ZEND_METHOD(ImagickDraw, pathLineToVerticalAbsolute); ZEND_METHOD(ImagickDraw, pathLineToVerticalRelative); ZEND_METHOD(ImagickDraw, pathMoveToAbsolute); ZEND_METHOD(ImagickDraw, pathMoveToRelative); ZEND_METHOD(ImagickDraw, pathStart); ZEND_METHOD(ImagickDraw, polyline); ZEND_METHOD(ImagickDraw, popClipPath); ZEND_METHOD(ImagickDraw, popDefs); ZEND_METHOD(ImagickDraw, popPattern); ZEND_METHOD(ImagickDraw, pushClipPath); ZEND_METHOD(ImagickDraw, pushDefs); ZEND_METHOD(ImagickDraw, pushPattern); ZEND_METHOD(ImagickDraw, render); ZEND_METHOD(ImagickDraw, rotate); ZEND_METHOD(ImagickDraw, scale); ZEND_METHOD(ImagickDraw, setClipPath); ZEND_METHOD(ImagickDraw, setClipRule); ZEND_METHOD(ImagickDraw, setClipUnits); ZEND_METHOD(ImagickDraw, setFillOpacity); ZEND_METHOD(ImagickDraw, setFillPatternUrl); ZEND_METHOD(ImagickDraw, setFillRule); ZEND_METHOD(ImagickDraw, setGravity); ZEND_METHOD(ImagickDraw, setStrokePatternUrl); ZEND_METHOD(ImagickDraw, setStrokeDashOffset); ZEND_METHOD(ImagickDraw, setStrokeLineCap); ZEND_METHOD(ImagickDraw, setStrokeLineJoin); ZEND_METHOD(ImagickDraw, setStrokeMiterLimit); ZEND_METHOD(ImagickDraw, setStrokeOpacity); ZEND_METHOD(ImagickDraw, setVectorGraphics); ZEND_METHOD(ImagickDraw, pop); ZEND_METHOD(ImagickDraw, push); ZEND_METHOD(ImagickDraw, setStrokeDashArray); #if MagickLibVersion >= 0x693 ZEND_METHOD(ImagickDraw, getOpacity); #endif #if MagickLibVersion >= 0x693 ZEND_METHOD(ImagickDraw, setOpacity); #endif #if MagickLibVersion >= 0x675 ZEND_METHOD(ImagickDraw, getFontResolution); #endif #if MagickLibVersion >= 0x675 ZEND_METHOD(ImagickDraw, setFontResolution); #endif #if MagickLibVersion >= 0x675 ZEND_METHOD(ImagickDraw, getBorderColor); #endif #if MagickLibVersion >= 0x675 ZEND_METHOD(ImagickDraw, setBorderColor); #endif #if MagickLibVersion >= 0x693 ZEND_METHOD(ImagickDraw, setDensity); #endif #if MagickLibVersion >= 0x693 ZEND_METHOD(ImagickDraw, getDensity); #endif #if MagickLibVersion >= 0x692 ZEND_METHOD(ImagickDraw, getTextDirection); #endif #if MagickLibVersion >= 0x692 ZEND_METHOD(ImagickDraw, setTextDirection); #endif static const zend_function_entry class_ImagickDraw_methods[] = { #if MagickLibVersion > 0x628 ZEND_ME(ImagickDraw, resetVectorGraphics, arginfo_class_ImagickDraw_resetVectorGraphics, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x649 ZEND_ME(ImagickDraw, getTextKerning, arginfo_class_ImagickDraw_getTextKerning, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x649 ZEND_ME(ImagickDraw, setTextKerning, arginfo_class_ImagickDraw_setTextKerning, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x649 ZEND_ME(ImagickDraw, getTextInterwordSpacing, arginfo_class_ImagickDraw_getTextInterwordSpacing, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x649 ZEND_ME(ImagickDraw, setTextInterwordSpacing, arginfo_class_ImagickDraw_setTextInterwordSpacing, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x655 ZEND_ME(ImagickDraw, getTextInterlineSpacing, arginfo_class_ImagickDraw_getTextInterlineSpacing, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion > 0x655 ZEND_ME(ImagickDraw, setTextInterlineSpacing, arginfo_class_ImagickDraw_setTextInterlineSpacing, ZEND_ACC_PUBLIC) #endif ZEND_ME(ImagickDraw, __construct, arginfo_class_ImagickDraw___construct, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFillColor, arginfo_class_ImagickDraw_setFillColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFillAlpha, arginfo_class_ImagickDraw_setFillAlpha, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setResolution, arginfo_class_ImagickDraw_setResolution, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeColor, arginfo_class_ImagickDraw_setStrokeColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeAlpha, arginfo_class_ImagickDraw_setStrokeAlpha, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeWidth, arginfo_class_ImagickDraw_setStrokeWidth, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, clear, arginfo_class_ImagickDraw_clear, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, circle, arginfo_class_ImagickDraw_circle, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, annotation, arginfo_class_ImagickDraw_annotation, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setTextAntialias, arginfo_class_ImagickDraw_setTextAntialias, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setTextEncoding, arginfo_class_ImagickDraw_setTextEncoding, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFont, arginfo_class_ImagickDraw_setFont, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFontFamily, arginfo_class_ImagickDraw_setFontFamily, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFontSize, arginfo_class_ImagickDraw_setFontSize, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFontStyle, arginfo_class_ImagickDraw_setFontStyle, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFontWeight, arginfo_class_ImagickDraw_setFontWeight, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFont, arginfo_class_ImagickDraw_getFont, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFontFamily, arginfo_class_ImagickDraw_getFontFamily, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFontSize, arginfo_class_ImagickDraw_getFontSize, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFontStyle, arginfo_class_ImagickDraw_getFontStyle, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFontWeight, arginfo_class_ImagickDraw_getFontWeight, ZEND_ACC_PUBLIC) ZEND_MALIAS(ImagickDraw, destroy, clear, arginfo_class_ImagickDraw_destroy, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, rectangle, arginfo_class_ImagickDraw_rectangle, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, roundRectangle, arginfo_class_ImagickDraw_roundRectangle, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, ellipse, arginfo_class_ImagickDraw_ellipse, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, skewX, arginfo_class_ImagickDraw_skewX, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, skewY, arginfo_class_ImagickDraw_skewY, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, translate, arginfo_class_ImagickDraw_translate, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, line, arginfo_class_ImagickDraw_line, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, arc, arginfo_class_ImagickDraw_arc, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x700 ZEND_ME(ImagickDraw, alpha, arginfo_class_ImagickDraw_alpha, ZEND_ACC_PUBLIC) #endif #if !(MagickLibVersion >= 0x700) ZEND_ME(ImagickDraw, matte, arginfo_class_ImagickDraw_matte, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED) #endif ZEND_ME(ImagickDraw, polygon, arginfo_class_ImagickDraw_polygon, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, point, arginfo_class_ImagickDraw_point, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getTextDecoration, arginfo_class_ImagickDraw_getTextDecoration, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getTextEncoding, arginfo_class_ImagickDraw_getTextEncoding, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFontStretch, arginfo_class_ImagickDraw_getFontStretch, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFontStretch, arginfo_class_ImagickDraw_setFontStretch, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeAntialias, arginfo_class_ImagickDraw_setStrokeAntialias, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setTextAlignment, arginfo_class_ImagickDraw_setTextAlignment, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setTextDecoration, arginfo_class_ImagickDraw_setTextDecoration, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setTextUnderColor, arginfo_class_ImagickDraw_setTextUnderColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setViewbox, arginfo_class_ImagickDraw_setViewbox, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, clone, arginfo_class_ImagickDraw_clone, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, affine, arginfo_class_ImagickDraw_affine, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, bezier, arginfo_class_ImagickDraw_bezier, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, composite, arginfo_class_ImagickDraw_composite, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, color, arginfo_class_ImagickDraw_color, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, comment, arginfo_class_ImagickDraw_comment, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getClipPath, arginfo_class_ImagickDraw_getClipPath, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getClipRule, arginfo_class_ImagickDraw_getClipRule, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getClipUnits, arginfo_class_ImagickDraw_getClipUnits, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFillColor, arginfo_class_ImagickDraw_getFillColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFillOpacity, arginfo_class_ImagickDraw_getFillOpacity, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getFillRule, arginfo_class_ImagickDraw_getFillRule, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getGravity, arginfo_class_ImagickDraw_getGravity, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeAntialias, arginfo_class_ImagickDraw_getStrokeAntialias, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeColor, arginfo_class_ImagickDraw_getStrokeColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeDashArray, arginfo_class_ImagickDraw_getStrokeDashArray, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeDashOffset, arginfo_class_ImagickDraw_getStrokeDashOffset, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeLineCap, arginfo_class_ImagickDraw_getStrokeLineCap, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeLineJoin, arginfo_class_ImagickDraw_getStrokeLineJoin, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeMiterLimit, arginfo_class_ImagickDraw_getStrokeMiterLimit, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeOpacity, arginfo_class_ImagickDraw_getStrokeOpacity, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getStrokeWidth, arginfo_class_ImagickDraw_getStrokeWidth, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getTextAlignment, arginfo_class_ImagickDraw_getTextAlignment, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getTextAntialias, arginfo_class_ImagickDraw_getTextAntialias, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getVectorGraphics, arginfo_class_ImagickDraw_getVectorGraphics, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, getTextUnderColor, arginfo_class_ImagickDraw_getTextUnderColor, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathClose, arginfo_class_ImagickDraw_pathClose, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToAbsolute, arginfo_class_ImagickDraw_pathCurveToAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToRelative, arginfo_class_ImagickDraw_pathCurveToRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToQuadraticBezierAbsolute, arginfo_class_ImagickDraw_pathCurveToQuadraticBezierAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToQuadraticBezierRelative, arginfo_class_ImagickDraw_pathCurveToQuadraticBezierRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToQuadraticBezierSmoothAbsolute, arginfo_class_ImagickDraw_pathCurveToQuadraticBezierSmoothAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToQuadraticBezierSmoothRelative, arginfo_class_ImagickDraw_pathCurveToQuadraticBezierSmoothRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToSmoothAbsolute, arginfo_class_ImagickDraw_pathCurveToSmoothAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathCurveToSmoothRelative, arginfo_class_ImagickDraw_pathCurveToSmoothRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathEllipticArcAbsolute, arginfo_class_ImagickDraw_pathEllipticArcAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathEllipticArcRelative, arginfo_class_ImagickDraw_pathEllipticArcRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathFinish, arginfo_class_ImagickDraw_pathFinish, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathLineToAbsolute, arginfo_class_ImagickDraw_pathLineToAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathLineToRelative, arginfo_class_ImagickDraw_pathLineToRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathLineToHorizontalAbsolute, arginfo_class_ImagickDraw_pathLineToHorizontalAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathLineToHorizontalRelative, arginfo_class_ImagickDraw_pathLineToHorizontalRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathLineToVerticalAbsolute, arginfo_class_ImagickDraw_pathLineToVerticalAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathLineToVerticalRelative, arginfo_class_ImagickDraw_pathLineToVerticalRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathMoveToAbsolute, arginfo_class_ImagickDraw_pathMoveToAbsolute, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathMoveToRelative, arginfo_class_ImagickDraw_pathMoveToRelative, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pathStart, arginfo_class_ImagickDraw_pathStart, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, polyline, arginfo_class_ImagickDraw_polyline, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, popClipPath, arginfo_class_ImagickDraw_popClipPath, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, popDefs, arginfo_class_ImagickDraw_popDefs, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, popPattern, arginfo_class_ImagickDraw_popPattern, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pushClipPath, arginfo_class_ImagickDraw_pushClipPath, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pushDefs, arginfo_class_ImagickDraw_pushDefs, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pushPattern, arginfo_class_ImagickDraw_pushPattern, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, render, arginfo_class_ImagickDraw_render, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, rotate, arginfo_class_ImagickDraw_rotate, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, scale, arginfo_class_ImagickDraw_scale, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setClipPath, arginfo_class_ImagickDraw_setClipPath, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setClipRule, arginfo_class_ImagickDraw_setClipRule, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setClipUnits, arginfo_class_ImagickDraw_setClipUnits, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFillOpacity, arginfo_class_ImagickDraw_setFillOpacity, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFillPatternUrl, arginfo_class_ImagickDraw_setFillPatternUrl, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setFillRule, arginfo_class_ImagickDraw_setFillRule, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setGravity, arginfo_class_ImagickDraw_setGravity, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokePatternUrl, arginfo_class_ImagickDraw_setStrokePatternUrl, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeDashOffset, arginfo_class_ImagickDraw_setStrokeDashOffset, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeLineCap, arginfo_class_ImagickDraw_setStrokeLineCap, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeLineJoin, arginfo_class_ImagickDraw_setStrokeLineJoin, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeMiterLimit, arginfo_class_ImagickDraw_setStrokeMiterLimit, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeOpacity, arginfo_class_ImagickDraw_setStrokeOpacity, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setVectorGraphics, arginfo_class_ImagickDraw_setVectorGraphics, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, pop, arginfo_class_ImagickDraw_pop, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, push, arginfo_class_ImagickDraw_push, ZEND_ACC_PUBLIC) ZEND_ME(ImagickDraw, setStrokeDashArray, arginfo_class_ImagickDraw_setStrokeDashArray, ZEND_ACC_PUBLIC) #if MagickLibVersion >= 0x693 ZEND_ME(ImagickDraw, getOpacity, arginfo_class_ImagickDraw_getOpacity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x693 ZEND_ME(ImagickDraw, setOpacity, arginfo_class_ImagickDraw_setOpacity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x675 ZEND_ME(ImagickDraw, getFontResolution, arginfo_class_ImagickDraw_getFontResolution, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x675 ZEND_ME(ImagickDraw, setFontResolution, arginfo_class_ImagickDraw_setFontResolution, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x675 ZEND_ME(ImagickDraw, getBorderColor, arginfo_class_ImagickDraw_getBorderColor, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x675 ZEND_ME(ImagickDraw, setBorderColor, arginfo_class_ImagickDraw_setBorderColor, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x693 ZEND_ME(ImagickDraw, setDensity, arginfo_class_ImagickDraw_setDensity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x693 ZEND_ME(ImagickDraw, getDensity, arginfo_class_ImagickDraw_getDensity, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x692 ZEND_ME(ImagickDraw, getTextDirection, arginfo_class_ImagickDraw_getTextDirection, ZEND_ACC_PUBLIC) #endif #if MagickLibVersion >= 0x692 ZEND_ME(ImagickDraw, setTextDirection, arginfo_class_ImagickDraw_setTextDirection, ZEND_ACC_PUBLIC) #endif ZEND_FE_END };imagick-3.6.0/ImagickKernel_arginfo.h0000644000000000000000000001054614145213432016212 0ustar rootroot/* This is a generated file, edit the .stub.php file instead. * Stub hash: regen with 'sh regen_arginfo.sh' * file has been fixedup for different versions */ #if defined(IMAGICK_WITH_KERNEL) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickKernel_addKernel, 0, 1, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_addKernel, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, kernel, ImagickKernel, 0) ZEND_END_ARG_INFO() #endif #if defined(IMAGICK_WITH_KERNEL) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickKernel_addUnityKernel, 0, 1, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_addUnityKernel, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, scale, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, scale) #endif ZEND_END_ARG_INFO() #endif #if defined(IMAGICK_WITH_KERNEL) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ImagickKernel_fromBuiltin, 0, 2, ImagickKernel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_fromBuiltin, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, kernel, IS_LONG, 0) #else ZEND_ARG_INFO(0, kernel) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, shape, IS_STRING, 0) #else ZEND_ARG_INFO(0, shape) #endif ZEND_END_ARG_INFO() #endif #if defined(IMAGICK_WITH_KERNEL) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ImagickKernel_fromMatrix, 0, 2, ImagickKernel, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_fromMatrix, 0, 0, 2) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, matrix, IS_ARRAY, 0) #else ZEND_ARG_INFO(0, matrix) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, origin, IS_ARRAY, 1) #else ZEND_ARG_INFO(0, origin) #endif ZEND_END_ARG_INFO() #endif #if defined(IMAGICK_WITH_KERNEL) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickKernel_getMatrix, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_getMatrix, 0, 0, 0) #endif ZEND_END_ARG_INFO() #endif #if defined(IMAGICK_WITH_KERNEL) #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickKernel_scale, 0, 1, IS_VOID, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_scale, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, scale, IS_DOUBLE, 0) #else ZEND_ARG_INFO(0, scale) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, normalize_kernel, IS_LONG, 1, "null") #else ZEND_ARG_INFO(0, normalize_kernel) #endif ZEND_END_ARG_INFO() #endif #if defined(IMAGICK_WITH_KERNEL) #define arginfo_class_ImagickKernel_separate arginfo_class_ImagickKernel_getMatrix #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_METHOD(ImagickKernel, addKernel); #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_METHOD(ImagickKernel, addUnityKernel); #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_METHOD(ImagickKernel, fromBuiltin); #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_METHOD(ImagickKernel, fromMatrix); #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_METHOD(ImagickKernel, getMatrix); #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_METHOD(ImagickKernel, scale); #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_METHOD(ImagickKernel, separate); #endif static const zend_function_entry class_ImagickKernel_methods[] = { #if defined(IMAGICK_WITH_KERNEL) ZEND_ME(ImagickKernel, addKernel, arginfo_class_ImagickKernel_addKernel, ZEND_ACC_PUBLIC) #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_ME(ImagickKernel, addUnityKernel, arginfo_class_ImagickKernel_addUnityKernel, ZEND_ACC_PUBLIC) #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_ME(ImagickKernel, fromBuiltin, arginfo_class_ImagickKernel_fromBuiltin, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_ME(ImagickKernel, fromMatrix, arginfo_class_ImagickKernel_fromMatrix, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_ME(ImagickKernel, getMatrix, arginfo_class_ImagickKernel_getMatrix, ZEND_ACC_PUBLIC) #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_ME(ImagickKernel, scale, arginfo_class_ImagickKernel_scale, ZEND_ACC_PUBLIC) #endif #if defined(IMAGICK_WITH_KERNEL) ZEND_ME(ImagickKernel, separate, arginfo_class_ImagickKernel_separate, ZEND_ACC_PUBLIC) #endif ZEND_FE_END };imagick-3.6.0/ImagickPixelIterator_arginfo.h0000644000000000000000000002016114145213432017557 0ustar rootroot/* This is a generated file, edit the .stub.php file instead. * Stub hash: regen with 'sh regen_arginfo.sh' * file has been fixedup for different versions */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, imagick, Imagick, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixelIterator_clear, 0, 0, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_clear, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ImagickPixelIterator_getPixelIterator, 0, 1, ImagickPixelIterator, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_getPixelIterator, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, imagick, Imagick, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ImagickPixelIterator_getPixelRegionIterator, 0, 5, ImagickPixelIterator, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_getPixelRegionIterator, 0, 0, 5) #endif ZEND_ARG_OBJ_INFO(0, imagick, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixelIterator_destroy arginfo_class_ImagickPixelIterator_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixelIterator_getCurrentIteratorRow, 0, 0, IS_ARRAY, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_getCurrentIteratorRow, 0, 0, 0) #endif ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixelIterator_getIteratorRow, 0, 0, IS_LONG, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_getIteratorRow, 0, 0, 0) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixelIterator_getNextIteratorRow arginfo_class_ImagickPixelIterator_getCurrentIteratorRow #define arginfo_class_ImagickPixelIterator_getPreviousIteratorRow arginfo_class_ImagickPixelIterator_getCurrentIteratorRow #define arginfo_class_ImagickPixelIterator_key arginfo_class_ImagickPixelIterator_getIteratorRow ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixelIterator_next, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixelIterator_rewind arginfo_class_ImagickPixelIterator_next #define arginfo_class_ImagickPixelIterator_current arginfo_class_ImagickPixelIterator_getCurrentIteratorRow #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixelIterator_newPixelIterator, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_newPixelIterator, 0, 0, 1) #endif ZEND_ARG_OBJ_INFO(0, imagick, Imagick, 0) ZEND_END_ARG_INFO() #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixelIterator_newPixelRegionIterator, 0, 5, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_newPixelRegionIterator, 0, 0, 5) #endif ZEND_ARG_OBJ_INFO(0, imagick, Imagick, 0) #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0) #else ZEND_ARG_INFO(0, x) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0) #else ZEND_ARG_INFO(0, y) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, columns, IS_LONG, 0) #else ZEND_ARG_INFO(0, columns) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, rows, IS_LONG, 0) #else ZEND_ARG_INFO(0, rows) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixelIterator_resetIterator arginfo_class_ImagickPixelIterator_clear #define arginfo_class_ImagickPixelIterator_setIteratorFirstRow arginfo_class_ImagickPixelIterator_clear #define arginfo_class_ImagickPixelIterator_setIteratorLastRow arginfo_class_ImagickPixelIterator_clear #if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickPixelIterator_setIteratorRow, 0, 1, _IS_BOOL, 0) #else ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickPixelIterator_setIteratorRow, 0, 0, 1) #endif #if PHP_VERSION_ID >= 80000 ZEND_ARG_TYPE_INFO(0, row, IS_LONG, 0) #else ZEND_ARG_INFO(0, row) #endif ZEND_END_ARG_INFO() #define arginfo_class_ImagickPixelIterator_syncIterator arginfo_class_ImagickPixelIterator_clear #define arginfo_class_ImagickPixelIterator_valid arginfo_class_ImagickPixelIterator_clear ZEND_METHOD(ImagickPixelIterator, __construct); ZEND_METHOD(ImagickPixelIterator, clear); ZEND_METHOD(ImagickPixelIterator, getPixelIterator); ZEND_METHOD(ImagickPixelIterator, getPixelRegionIterator); ZEND_METHOD(ImagickPixelIterator, getCurrentIteratorRow); ZEND_METHOD(ImagickPixelIterator, getIteratorRow); ZEND_METHOD(ImagickPixelIterator, getNextIteratorRow); ZEND_METHOD(ImagickPixelIterator, getPreviousIteratorRow); ZEND_METHOD(ImagickPixelIterator, resetIterator); ZEND_METHOD(ImagickPixelIterator, newPixelIterator); ZEND_METHOD(ImagickPixelIterator, newPixelRegionIterator); ZEND_METHOD(ImagickPixelIterator, setIteratorFirstRow); ZEND_METHOD(ImagickPixelIterator, setIteratorLastRow); ZEND_METHOD(ImagickPixelIterator, setIteratorRow); ZEND_METHOD(ImagickPixelIterator, syncIterator); ZEND_METHOD(ImagickPixelIterator, valid); static const zend_function_entry class_ImagickPixelIterator_methods[] = { ZEND_ME(ImagickPixelIterator, __construct, arginfo_class_ImagickPixelIterator___construct, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, clear, arginfo_class_ImagickPixelIterator_clear, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, getPixelIterator, arginfo_class_ImagickPixelIterator_getPixelIterator, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(ImagickPixelIterator, getPixelRegionIterator, arginfo_class_ImagickPixelIterator_getPixelRegionIterator, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_MALIAS(ImagickPixelIterator, destroy, clear, arginfo_class_ImagickPixelIterator_destroy, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, getCurrentIteratorRow, arginfo_class_ImagickPixelIterator_getCurrentIteratorRow, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, getIteratorRow, arginfo_class_ImagickPixelIterator_getIteratorRow, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, getNextIteratorRow, arginfo_class_ImagickPixelIterator_getNextIteratorRow, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, getPreviousIteratorRow, arginfo_class_ImagickPixelIterator_getPreviousIteratorRow, ZEND_ACC_PUBLIC) ZEND_MALIAS(ImagickPixelIterator, key, getIteratorRow, arginfo_class_ImagickPixelIterator_key, ZEND_ACC_PUBLIC) ZEND_MALIAS(ImagickPixelIterator, next, getNextIteratorRow, arginfo_class_ImagickPixelIterator_next, ZEND_ACC_PUBLIC) ZEND_MALIAS(ImagickPixelIterator, rewind, resetIterator, arginfo_class_ImagickPixelIterator_rewind, ZEND_ACC_PUBLIC) ZEND_MALIAS(ImagickPixelIterator, current, getCurrentIteratorRow, arginfo_class_ImagickPixelIterator_current, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, newPixelIterator, arginfo_class_ImagickPixelIterator_newPixelIterator, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, newPixelRegionIterator, arginfo_class_ImagickPixelIterator_newPixelRegionIterator, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, resetIterator, arginfo_class_ImagickPixelIterator_resetIterator, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, setIteratorFirstRow, arginfo_class_ImagickPixelIterator_setIteratorFirstRow, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, setIteratorLastRow, arginfo_class_ImagickPixelIterator_setIteratorLastRow, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, setIteratorRow, arginfo_class_ImagickPixelIterator_setIteratorRow, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, syncIterator, arginfo_class_ImagickPixelIterator_syncIterator, ZEND_ACC_PUBLIC) ZEND_ME(ImagickPixelIterator, valid, arginfo_class_ImagickPixelIterator_valid, ZEND_ACC_PUBLIC) ZEND_FE_END };imagick-3.6.0/ImagickPixel.stub.php0000644000000000000000000000461214145213432015657 0ustar rootroot= 0x693 public function setColorFromPixel(ImagickPixel $pixel): bool {} #endif } imagick-3.6.0/Imagick.stub.php0000644000000000000000000012557114145213432014665 0ustar rootroot 0x628 public function optimizeImageLayers(): bool {} // METRIC_* public function compareImageLayers(int $metric): Imagick {} public function pingImageBlob(string $image): bool {} // $filehandle should be a resource, but that is a pseudo-type // which causes problems for people trying to mock the class public function pingImageFile(/*resource*/mixed $filehandle, ?string $filename = null): bool {} public function transposeImage(): bool {} public function transverseImage(): bool {} public function trimImage(float $fuzz): bool {} public function waveImage(float $amplitude, float $length): bool {} public function vignetteImage(float $black_point, float $white_point, int $x, int $y): bool {} public function uniqueImageColors(): bool {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 // PHP_ME(imagick, getimagematte, imagick_zero_args, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED) /** @deprecated */ public function getImageMatte(): bool {} #endif #endif // TODO - enabled? public function setImageMatte(bool $matte): bool {} public function adaptiveResizeImage( int $columns, int $rows, bool $bestfit = false, bool $legacy = false): bool {} public function sketchImage(float $radius, float $sigma, float $angle): bool {} public function shadeImage(bool $gray, float $azimuth, float $elevation): bool {} public function getSizeOffset(): int {} public function setSizeOffset(int $columns, int $rows, int $offset): bool {} public function adaptiveBlurImage( float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} public function contrastStretchImage( float $black_point, float $white_point, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} public function adaptiveSharpenImage( float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} public function randomThresholdImage( float $low, float $high, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} public function roundCornersImage( float $x_rounding, float $y_rounding, float $stroke_width = 10, float $displace = 5, float $size_correction = -6): bool {} /** * @alias Imagick::roundCornersImage */ public function roundCorners( float $x_rounding, float $y_rounding, float $stroke_width = 10, float $displace = 5, float $size_correction = -6): bool {} public function setIteratorIndex(int $index): bool {} public function getIteratorIndex(): int {} #if MagickLibVersion < 0x700 /** @deprecated */ public function transformImage(string $crop, string $geometry): Imagick {} #endif #endif #if MagickLibVersion > 0x630 #if MagickLibVersion < 0x700 /** @deprecated */ public function setImageOpacity(float $opacity): bool {} #endif #if MagickLibVersion >= 0x700 public function setImageAlpha(float $alpha): bool {} #endif #if MagickLibVersion < 0x700 /** @deprecated */ public function orderedPosterizeImage( string $threshold_map, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #endif #endif #if MagickLibVersion > 0x631 // TODO - ImagickDraw .... public function polaroidImage(ImagickDraw $settings, float $angle): bool {} public function getImageProperty(string $name): string {} public function setImageProperty(string $name, string $value): bool {} public function deleteImageProperty(string $name): bool {} // Replaces any embedded formatting characters with the appropriate // image property and returns the interpreted text. // See http://www.imagemagick.org/script/escape.php for escape sequences. // -format "%m:%f %wx%h" public function identifyFormat(string $format): string {} #if IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD // INTERPOLATE_* public function setImageInterpolateMethod(int $method): bool {} #endif // why does this not need to be inside the 'if' for IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD ..? public function getImageInterpolateMethod(): int {} public function linearStretchImage(float $black_point, float $white_point): bool {} public function getImageLength(): int {} public function extentImage(int $width, int $height, int $x, int $y): bool {} #endif #if MagickLibVersion > 0x633 public function getImageOrientation(): int {} public function setImageOrientation(int $orientation): bool {} #endif #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion > 0x634 #if MagickLibVersion < 0x700 /** @deprecated */ public function paintFloodfillImage( ImagickPixel|string $fill_color, float $fuzz, ImagickPixel|string $border_color, int $x, int $y, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #endif #endif #endif #if MagickLibVersion > 0x635 // TODO - Imagick public function clutImage(Imagick $lookup_table, int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function getImageProperties(string $pattern = "*", bool $include_values = true): array {} public function getImageProfiles(string $pattern = "*", bool $include_values = true): array {} // DISTORTION_* public function distortImage(int $distortion, array $arguments, bool $bestfit): bool {} // $filehandle should be a resource, but that is a pseudo-type // which causes problems for people trying to mock the class public function writeImageFile(/*resource*/mixed $filehandle, ?string $format = null): bool {} // $filehandle should be a resource, but that is a pseudo-type // which causes problems for people trying to mock the class public function writeImagesFile(/*resource*/mixed $filehandle, ?string $format = null): bool {} public function resetImagePage(string $page): bool {} #if MagickLibVersion < 0x700 /** @deprecated */ public function setImageClipMask(imagick $clip_mask): bool {} /** @deprecated */ public function getImageClipMask(): Imagick {} #endif // TODO - x server? public function animateImages(string $x_server): bool {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function recolorImage(array $matrix): bool {} #endif #endif #endif #if MagickLibVersion > 0x636 public function setFont(string $font): bool {} public function getFont(): string {} public function setPointSize(float $point_size): bool {} public function getPointSize(): float {} // LAYERMETHOD_* public function mergeImageLayers(int $layermethod): Imagick {} #endif #if MagickLibVersion > 0x637 // ALPHACHANNEL_* public function setImageAlphaChannel(int $alphachannel): bool {} // TODO - ImagickPixel ugh // TODO - ugh MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand, // const PixelWand *fill,const double fuzz,const PixelWand *bordercolor, // const ssize_t x,const ssize_t y,const MagickBooleanType invert) public function floodfillPaintImage( ImagickPixel|string $fill_color, float $fuzz, ImagickPixel|string $border_color, int $x, int $y, bool $invert, ?int $channel = Imagick::CHANNEL_DEFAULT ): bool{} public function opaquePaintImage( ImagickPixel|string $target_color, ImagickPixel|string $fill_color, float $fuzz, bool $invert, int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function transparentPaintImage( ImagickPixel|string $target_color, float $alpha, float $fuzz, bool $invert ): bool {} #endif #if MagickLibVersion > 0x638 public function liquidRescaleImage(int $width, int $height, float $delta_x, float $rigidity): bool {} public function encipherImage(string $passphrase): bool {} // PHP_ME(imagick, decipherimage, imagick_decipherimage_args, ZEND_ACC_PUBLIC) public function decipherImage(string $passphrase): bool {} #endif #if MagickLibVersion > 0x639 // GRAVITY_* public function setGravity(int $gravity): bool {} public function getGravity(): int {} // CHANNEL_ public function getImageChannelRange(int $channel): array {} public function getImageAlphaChannel(): bool {} #endif #if MagickLibVersion > 0x642 public function getImageChannelDistortions( Imagick $reference_image, int $metric, int $channel = Imagick::CHANNEL_DEFAULT ): float {} #endif #if MagickLibVersion > 0x643 // GRAVITY_ public function setImageGravity(int $gravity): bool {} public function getImageGravity(): int {} #endif #if MagickLibVersion > 0x645 public function importImagePixels( int $x, int $y, int $width, int $height, string $map, int $pixelstorage, // PIXELSTORAGE array $pixels): bool {} public function deskewImage(float $threshold): bool {} public function segmentImage( int $colorspace, // COLORSPACE float $cluster_threshold, float $smooth_threshold, bool $verbose = false ): bool {} public function sparseColorImage( int $sparsecolormethod, // SPARSECOLORMETHOD_* array $arguments, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} public function remapImage(Imagick $replacement, int $dither_method): bool {} #endif #if PHP_IMAGICK_HAVE_HOUGHLINE public function houghLineImage(int $width, int $height, float $threshold): bool {} #endif #if MagickLibVersion > 0x646 public function exportImagePixels( int $x, int $y, int $width, int $height, string $map, // e.g. "RGB" int $pixelstorage // PIXELSTORAGE ): array {} #endif #if MagickLibVersion > 0x648 public function getImageChannelKurtosis(int $channel = Imagick::CHANNEL_DEFAULT): array {} public function functionImage( int $function, array $parameters, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #endif #if MagickLibVersion > 0x651 // COLORSPACE_* public function transformImageColorspace(int $colorspace): bool {} #endif #if MagickLibVersion > 0x652 public function haldClutImage(Imagick $clut, int $channel = Imagick::CHANNEL_DEFAULT): bool {} #endif #if MagickLibVersion > 0x655 public function autoLevelImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function blueShiftImage(float $factor = 1.5): bool {} #endif #if MagickLibVersion > 0x656 /** * $artifact example 'compose:args' * */ public function getImageArtifact(string $artifact): string {} /** * $artifact example 'compose:args' * $value example "1,0,-0.5,0.5" * */ public function setImageArtifact(string $artifact, string $value): bool {} public function deleteImageArtifact(string $artifact): bool {} // Will return CHANNEL_* public function getColorspace(): int {} // PHP_ME(imagick, setcolorspace, imagick_setcolorspace_args, ZEND_ACC_PUBLIC) public function setColorspace(int $colorspace): bool {} // CHANNEL_* public function clampImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {} #endif #if MagickLibVersion > 0x667 // stack By default, images are stacked left-to-right. Set stack to MagickTrue to stack them top-to-bottom. //offset minimum distance in pixels between images. public function smushImages(bool $stack, int $offset): Imagick {} #endif // PHP_ME(imagick, __construct, imagick_construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) // TODO int|float? :spocks_eyebrow.gif: public function __construct(string|array|int|float|null $files = null) {} public function __toString(): string {} #if PHP_VERSION_ID >= 50600 // This calls MagickGetNumberImages underneath // mode is unused. Remove at next major release // https://github.com/Imagick/imagick/commit/13302500c0ab0ce58e6502e68871187180f7987c public function count(int $mode = 0): int {} #else public function count(): int {} #endif public function getPixelIterator(): ImagickPixelIterator {} public function getPixelRegionIterator(int $x, int $y, int $columns, int $rows): ImagickPixelIterator {} public function readImage(string $filename): bool {} public function readImages(array $filenames): bool {} public function readImageBlob(string $image, ?string $filename = null): bool {} public function setImageFormat(string $format): bool {} public function scaleImage(int $columns, int $rows, bool $bestfit = false, bool $legacy = false): bool {} public function writeImage(?string $filename = null): bool {} public function writeImages(string $filename, bool $adjoin): bool {} // CHANNEL_ public function blurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function thumbnailImage( ?int $columns, ?int $rows, bool $bestfit = false, bool $fill = false, bool $legacy = false): bool {} public function cropThumbnailImage(int $width, int $height, bool $legacy = false): bool {} public function getImageFilename(): string {} public function setImageFilename(string $filename): bool {} public function getImageFormat(): string {} public function getImageMimeType(): string {} public function removeImage(): bool {} /** @alias Imagick::clear */ public function destroy(): bool {} public function clear(): bool {} public function clone(): Imagick {} public function getImageSize(): int {} public function getImageBlob(): string {} public function getImagesBlob(): string {} public function setFirstIterator(): bool {} public function setLastIterator(): bool {} public function resetIterator(): void {} public function previousImage(): bool {} public function nextImage(): bool {} public function hasPreviousImage(): bool {} public function hasNextImage(): bool {} public function setImageIndex(int $index): bool {} public function getImageIndex(): int {} public function commentImage(string $comment): bool {} public function cropImage(int $width, int $height, int $x, int $y): bool {} public function labelImage(string $label): bool {} public function getImageGeometry(): array {} public function drawImage(ImagickDraw $drawing): bool {} public function setImageCompressionQuality(int $quality): bool {} public function getImageCompressionQuality(): int {} public function setImageCompression(int $compression): bool {} public function getImageCompression(): int {} public function annotateImage( ImagickDraw $settings, float $x, float $y, float $angle, string $text ): bool {} public function compositeImage( Imagick $composite_image, int $composite, int $x, int $y, int $channel = Imagick::CHANNEL_DEFAULT): bool{} public function modulateImage(float $brightness, float $saturation, float $hue): bool {} public function getImageColors(): int {} public function montageImage( ImagickDraw $settings, string $tile_geometry, // e.g. "3x2+0+0" string $thumbnail_geometry, // e.g. "200x160+3+3>" int $monatgemode, // MONTAGEMODE_ string $frame // "10x10+2+2" ): Imagick {} public function identifyImage(bool $append_raw_output = false): array {} public function thresholdImage(float $threshold, int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function adaptiveThresholdImage(int $width, int $height, int $offset): bool {} public function blackThresholdImage(ImagickPixel|string $threshold_color): bool {} public function whiteThresholdImage(ImagickPixel|string $threshold_color): bool {} public function appendImages(bool $stack): Imagick {} public function charcoalImage(float $radius, float $sigma): bool {} public function normalizeImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function oilPaintImage(float $radius): bool {} public function posterizeImage(int $levels, bool $dither): bool {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function radialBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool {} #endif #endif public function raiseImage(int $width, int $height, int $x, int $y, bool $raise): bool {} public function resampleImage(float $x_resolution, float $y_resolution, int $filter, float $blur): bool {} public function resizeImage( int $columns, int $rows, int $filter, float $blur, bool $bestfit = false, bool $legacy = false): bool {} public function rollImage(int $x, int $y): bool {} public function rotateImage(ImagickPixel|string $background_color, float $degrees): bool {} public function sampleImage(int $columns, int $rows): bool {} public function solarizeImage(int $threshold): bool {} public function shadowImage(float $opacity, float $sigma, int $x, int $y): bool {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function setImageAttribute(string $key, string $value): bool {} #endif #endif public function setImageBackgroundColor(ImagickPixel|string $background_color): bool {} #if MagickLibVersion >= 0x700 public function setImageChannelMask(int $channel): int {} #endif public function setImageCompose(int $compose): bool {} public function setImageDelay(int $delay): bool {} public function setImageDepth(int $depth): bool {} public function setImageGamma(float $gamma): bool {} public function setImageIterations(int $iterations): bool {} #if MagickLibVersion < 0x700 || MagickLibVersion >= 0x705 public function setImageMatteColor(ImagickPixel|string $matte_color): bool {} #endif public function setImagePage(int $width, int $height, int $x, int $y): bool {} // TODO test this. public function setImageProgressMonitor(string $filename): bool {} #if MagickLibVersion > 0x653 public function setProgressMonitor(callable $callback): bool {} #endif public function setImageResolution(float $x_resolution, float $y_resolution): bool {} // I have no idea what scene does. public function setImageScene(int $scene): bool {} public function setImageTicksPerSecond(int $ticks_per_second): bool {} // IMGTYPE_* public function setImageType(int $image_type): bool {} public function setImageUnits(int $units): bool {} public function sharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function shaveImage(int $columns, int $rows): bool {} public function shearImage(ImagickPixel|string $background_color, float $x_shear, float $y_shear): bool {} public function spliceImage(int $width, int $height, int $x, int $y): bool {} public function pingImage(string $filename): bool {} // $filehandle should be a resource, but that is a pseudo-type // which causes problems for people trying to mock the class public function readImageFile(/*resource*/mixed $filehandle, ?string $filename = null): bool {} public function displayImage(string $servername): bool {} public function displayImages(string $servername): bool {} public function spreadImage(float $radius): bool {} public function swirlImage(float $degrees): bool {} public function stripImage(): bool {} public static function queryFormats(string $pattern = "*"): array {} public static function queryFonts(string $pattern = "*"): array {} /* TODO $multiline == null, means we should autodetect */ public function queryFontMetrics(ImagickDraw $settings, string $text, ?bool $multiline = null): array {} public function steganoImage(Imagick $watermark, int $offset): Imagick {} // NOISE_* public function addNoiseImage(int $noise, int $channel = Imagick::CHANNEL_DEFAULT): bool {} #if IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE public function addNoiseImageWithAttenuate( int $noise, float $attenuate, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #endif public function motionBlurImage( float $radius, float $sigma, float $angle, int $channel = Imagick::CHANNEL_DEFAULT ):bool {} #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) /** @deprecated */ public function mosaicImages(): Imagick {} #endif #endif public function morphImages(int $number_frames): Imagick {} public function minifyImage(): bool {} public function affineTransformImage(ImagickDraw $settings): bool {} public function averageImages(): Imagick {} public function borderImage( ImagickPixel|string $border_color, int $width, int $height ): bool {} #if MagickLibVersion >= 0x700 public function borderImageWithComposite( ImagickPixel|string $border_color, int $width, int $height, int $composite // COMPOSITE_ // null rather than OverCompositeOp as we don't control the value ): bool {} #endif public static function calculateCrop( int $original_width, int $original_height, int $desired_width, int $desired_height, bool $legacy = false): array {} public function chopImage(int $width, int $height, int $x, int $y): bool {} public function clipImage(): bool {} public function clipPathImage(string $pathname, bool $inside): bool {} /* clippathimage has been deprecated. Create alias here and use the newer API function if present */ /** @alias Imagick::clipPathImage */ public function clipImagePath(string $pathname, bool $inside): void {} public function coalesceImages(): Imagick {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function colorFloodfillImage( ImagickPixel|string $fill_color, float $fuzz, ImagickPixel|string $border_color, int $x, int $y ): bool {} #endif #endif // TODO - opacity is actually float if legacy is true... public function colorizeImage( ImagickPixel|string $colorize_color, ImagickPixel|string|false $opacity_color, ?bool $legacy = false ): bool {} public function compareImageChannels(Imagick $reference, int $channel, int $metric): array {} public function compareImages(Imagick $reference, int $metric): array {} public function contrastImage(bool $sharpen): bool {} public function combineImages(int $colorspace): Imagick {} // kernel is a 2d array of float values public function convolveImage(array $kernel, int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function cycleColormapImage(int $displace): bool {} public function deconstructImages(): Imagick {} public function despeckleImage(): bool {} public function edgeImage(float $radius): bool {} public function embossImage(float $radius, float $sigma): bool {} public function enhanceImage(): bool {} public function equalizeImage(): bool {} // EVALUATE_* public function evaluateImage(int $evaluate, float $constant, int $channel = Imagick::CHANNEL_DEFAULT): bool {} #if MagickLibVersion >= 0x687 // Merge multiple images of the same size together with the selected operator. //http://www.imagemagick.org/Usage/layers/#evaluate-sequence // EVALUATE_* public function evaluateImages(int $evaluate): bool {} #endif public function flattenImages(): Imagick {} public function flipImage(): bool {} public function flopImage(): bool {} #if MagickLibVersion >= 0x655 public function forwardFourierTransformImage(bool $magnitude): bool {} #endif public function frameImage( ImagickPixel|string $matte_color, int $width, int $height, int $inner_bevel, int $outer_bevel ): bool {} #if MagickLibVersion >= 0x700 public function frameImageWithComposite( ImagickPixel|string $matte_color, int $width, int $height, int $inner_bevel, int $outer_bevel, int $composite ): bool {} #endif public function fxImage(string $expression, int $channel = Imagick::CHANNEL_DEFAULT): Imagick {} public function gammaImage(float $gamma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} public function gaussianBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) /** @deprecated */ public function getImageAttribute(string $key): string {} #endif #endif public function getImageBackgroundColor(): ImagickPixel {} public function getImageBluePrimary(): array {} public function getImageBorderColor(): ImagickPixel {} public function getImageChannelDepth(int $channel): int {} public function getImageChannelDistortion(Imagick $reference, int $channel, int $metric): float {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function getImageChannelExtrema(int $channel): array {} #endif #endif public function getImageChannelMean(int $channel): array {} public function getImageChannelStatistics(): array {} // index - the offset into the image colormap. I have no idea. public function getImageColormapColor(int $index): ImagickPixel {} public function getImageColorspace(): int {} public function getImageCompose(): int {} public function getImageDelay(): int {} public function getImageDepth(): int {} // METRIC_ public function getImageDistortion(Imagick $reference, int $metric): float {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function getImageExtrema(): array {} #endif #endif public function getImageDispose(): int {} public function getImageGamma(): float {} public function getImageGreenPrimary(): array {} public function getImageHeight(): int {} public function getImageHistogram(): array {} public function getImageInterlaceScheme(): int {} public function getImageIterations(): int {} #if MagickLibVersion < 0x700 /** @deprecated */ public function getImageMatteColor(): ImagickPixel {} #endif public function getImagePage(): array {} public function getImagePixelColor(int $x, int $y): ImagickPixel {} #if IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR // TODO - needs a test. public function setImagePixelColor(int $x, int $y, ImagickPixel|string $color): ImagickPixel {} #endif public function getImageProfile(string $name): string {} public function getImageRedPrimary(): array {} public function getImageRenderingIntent(): int {} public function getImageResolution(): array {} public function getImageScene(): int {} public function getImageSignature(): string {} public function getImageTicksPerSecond(): int {} public function getImageType(): int {} public function getImageUnits(): int {} public function getImageVirtualPixelMethod(): int {} public function getImageWhitePoint(): array {} public function getImageWidth(): int {} public function getNumberImages(): int {} public function getImageTotalInkDensity(): float {} public function getImageRegion(int $width, int $height, int $x, int $y): Imagick {} public function implodeImage(float $radius): bool {} #if MagickLibVersion >= 0x658 // TODO MagickWand *magnitude_wand,MagickWand *phase_wand, public function inverseFourierTransformImage(Imagick $complement, bool $magnitude): bool {} #endif public function levelImage( float $black_point, float $gamma, float $white_point, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} public function magnifyImage(): bool {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function mapImage(imagick $map, bool $dither): bool {} /** @deprecated */ public function matteFloodfillImage( float $alpha, float $fuzz, ImagickPixel|string $border_color, int $x, int $y ): bool {} #endif #endif #if MagickLibVersion < 0x700 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) /** @deprecated */ public function medianFilterImage(float $radius): bool {} #endif #endif public function negateImage(bool $gray, int $channel = Imagick::CHANNEL_DEFAULT): bool {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function paintOpaqueImage( ImagickPixel|string $target_color, ImagickPixel|string $fill_color, float $fuzz, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} /** @deprecated */ public function paintTransparentImage(ImagickPixel|string $target_color, float $alpha, float $fuzz): bool {} #endif #endif // PREVIEW_* public function previewImages(int $preview): bool {} public function profileImage(string $name, ?string $profile): bool {} public function quantizeImage( int $number_colors, int $colorspace, int $tree_depth, bool $dither, bool $measure_error ): bool {} public function quantizeImages( int $number_colors, int $colorspace, int $tree_depth, bool $dither, bool $measure_error): bool {} #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) #if MagickLibVersion < 0x700 /** @deprecated */ public function reduceNoiseImage(float $radius): bool {} #endif #endif public function removeImageProfile(string $name): string {} public function separateImageChannel(int $channel): bool {} public function sepiaToneImage(float $threshold): bool {} #if MagickLibVersion < 0x700 /** @deprecated */ public function setImageBias(float $bias): bool {} /** @deprecated */ public function setImageBiasQuantum(string $bias): void {} #endif public function setImageBluePrimary(float $x, float $y): bool {} /* {{{ proto bool Imagick::setImageBluePrimary(float x,float y) For IM7 the prototype is proto bool Imagick::setImageBluePrimary(float x, float y, float z) */ public function setImageBorderColor(ImagickPixel|string $border_color): bool {} public function setImageChannelDepth(int $channel, int $depth): bool {} public function setImageColormapColor(int $index, ImagickPixel|string $color): bool {} public function setImageColorspace(int $colorspace): bool {} public function setImageDispose(int $dispose): bool {} public function setImageExtent(int $columns, int $rows): bool {} public function setImageGreenPrimary(float $x, float $y): bool {} // INTERLACE_* public function setImageInterlaceScheme(int $interlace): bool {} public function setImageProfile(string $name, string $profile): bool {} public function setImageRedPrimary(float $x, float $y): bool {} // RENDERINGINTENT public function setImageRenderingIntent(int $rendering_intent): bool {} public function setImageVirtualPixelMethod(int $method): bool {} public function setImageWhitePoint(float $x, float $y): bool {} public function sigmoidalContrastImage( bool $sharpen, float $alpha, float $beta, int $channel = Imagick::CHANNEL_DEFAULT ): bool{} // TODO - MagickStereoImage() composites two images and produces a single // image that is the composite of a left and right image of a stereo pair public function stereoImage(Imagick $offset_image): bool {} public function textureImage(Imagick $texture): Imagick {} public function tintImage( ImagickPixel|string $tint_color, ImagickPixel|string $opacity_color, bool $legacy = false ): bool {} public function unsharpMaskImage( float $radius, float $sigma, float $amount, float $threshold, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} public function getImage(): Imagick {} public function addImage(Imagick $image): bool {} public function setImage(Imagick $image): bool {} public function newImage( int $columns, int $rows, ImagickPixel|string $background_color, string $format = null ): bool {} // TODO - canvas? description public function newPseudoImage(int $columns, int $rows, string $pseudo_format): bool {} public function getCompression(): int {} public function getCompressionQuality(): int {} public static function getCopyright(): string {} /** * @return string[] */ public static function getConfigureOptions(string $pattern = "*"): array {} #if MagickLibVersion > 0x660 public static function getFeatures(): string {} #endif public function getFilename(): string {} public function getFormat(): string {} public static function getHomeURL(): string {} public function getInterlaceScheme(): int {} public function getOption(string $key): string {} public static function getPackageName(): string {} public function getPage(): array {} public static function getQuantum(): int {} public static function getHdriEnabled(): bool {} public static function getQuantumDepth(): array {} public static function getQuantumRange(): array {} public static function getReleaseDate(): string {} public static function getResource(int $type): int {} public static function getResourceLimit(int $type): int {} public function getSamplingFactors(): array {} public function getSize(): array {} public static function getVersion(): array {} public function setBackgroundColor(ImagickPixel|string $background_color): bool {} public function setCompression(int $compression): bool {} public function setCompressionQuality(int $quality): bool {} public function setFilename(string $filename): bool {} public function setFormat(string $format): bool {} // INTERLACE_* public function setInterlaceScheme(int $interlace): bool {} public function setOption(string $key, string $value): bool {} public function setPage(int $width, int $height, int $x, int $y): bool {} public static function setResourceLimit(int $type, int $limit): bool {} public function setResolution(float $x_resolution, float $y_resolution): bool {} public function setSamplingFactors(array $factors): bool {} public function setSize(int $columns, int $rows): bool {} // IMGTYPE_* public function setType(int $imgtype): bool {} #if MagickLibVersion > 0x628 /** @alias Imagick::getIteratorIndex */ public function key(): int {} //#else //# if defined(MAGICKCORE_EXCLUDE_DEPRECATED) //# error "MAGICKCORE_EXCLUDE_DEPRECATED should not be defined with ImageMagick version below 6.2.8" //# else //// PHP_MALIAS(imagick, key, getimageindex, imagick_zero_args, ZEND_ACC_PUBLIC) // /** @alias Imagick::getImageIndex */ // public function key(): int {} // //# endif //#endif /** @alias Imagick::nextImage * @tentative-return-type */ public function next(): void {} /** @alias Imagick::setFirstIterator * @tentative-return-type */ public function rewind(): void {} public function valid(): bool {} public function current(): Imagick {} #if MagickLibVersion >= 0x659 public function brightnessContrastImage( float $brightness, float $contrast, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #endif #if MagickLibVersion > 0x661 public function colorMatrixImage(array $color_matrix): bool {} #endif public function selectiveBlurImage( float $radius, float $sigma, float $threshold, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #if MagickLibVersion >= 0x689 public function rotationalBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool {} #endif #if MagickLibVersion >= 0x683 public function statisticImage( int $type, int $width, int $height, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #endif #if MagickLibVersion >= 0x652 public function subimageMatch(Imagick $image, ?array &$offset = null, ?float &$similarity = null, float $threshold = 0.0, int $metric = 0): Imagick {} /** @alias Imagick::subimageMatch */ public function similarityImage(Imagick $image, ?array &$offset = null, ?float &$similarity = null, float $threshold = 0.0, int $metric = 0): Imagick {} #endif public static function setRegistry(string $key, string $value): bool {} public static function getRegistry(string $key): string {} public static function listRegistry(): array {} #if MagickLibVersion >= 0x680 public function morphology( int $morphology, // MORPHOLOGY_* int $iterations, ImagickKernel $kernel, int $channel = Imagick::CHANNEL_DEFAULT ): bool {} #endif #ifdef IMAGICK_WITH_KERNEL #if MagickLibVersion < 0x700 /** @deprecated */ public function filter(ImagickKernel $kernel, int $channel = Imagick::CHANNEL_UNDEFINED): bool {} #endif #endif public function setAntialias(bool $antialias): void {} public function getAntialias(): bool {} #if MagickLibVersion > 0x676 /** * $color_correction_collection example: * * * * 0.9 1.2 0.5 * 0.4 -0.5 0.6 * 1.0 0.8 1.5 * * * 0.85 * * * * */ public function colorDecisionListImage(string $color_correction_collection): bool {} #endif #if MagickLibVersion >= 0x687 public function optimizeImageTransparency(): void {} #endif #if MagickLibVersion >= 0x660 public function autoGammaImage(?int $channel = Imagick::CHANNEL_ALL): void {} #endif #if MagickLibVersion >= 0x692 public function autoOrient(): void {} /** @alias Imagick::autoOrient */ public function autoOrientate(): void {} // COMPOSITE_* public function compositeImageGravity(Imagick $image, int $composite_constant, int $gravity): bool {} #endif #if MagickLibVersion >= 0x693 public function localContrastImage(float $radius, float $strength): void {} #endif #if MagickLibVersion >= 0x700 // Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants public function identifyImageType(): int {} #endif #if IM_HAVE_IMAGICK_GETSETIMAGEMASK // PIXELMASK_* public function getImageMask(int $pixelmask): ?Imagick {} // PIXELMASK_* public function setImageMask(Imagick $clip_mask, int $pixelmask): void {} #endif // TODO - needs deleting from docs. // public function getImageMagickLicense(): string {} // TODO - needs deleting from docs. // public function render(): bool {} // public function floodfillPaintImage( // ImagickPixel|string $fill, // float $fuzz, // ImagickPixel|string $bordercolor, // int $x, // int $y, // bool $invert, // int $channel = Imagick::CHANNEL_DEFAULT): null {} #if MagickLibVersion >= 0x709 public function cannyEdgeImage( float $radius, float $sigma, float $lower_percent, float $upper_percent ): bool {} #endif #if IM_HAVE_IMAGICK_SETSEED public static function setSeed(int $seed): void {} #endif #if IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE public function waveletDenoiseImage(float $threshold, float $softness): bool {} #endif #if IM_HAVE_IMAGICK_MEANSHIFTIMAGE public function meanShiftImage( int $width, int $height, float $color_distance ): bool {} #endif #if IM_HAVE_IMAGICK_KMEANSIMAGE public function kmeansImage( int $number_colors, int $max_iterations, float $tolerance ): bool {} #endif #if IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE public function rangeThresholdImage( float $low_black, float $low_white, float $high_white, float $high_black ): bool {} #endif #if IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE // AUTO_THRESHOLD_* public function autoThresholdImage(int $auto_threshold_method): bool {} #endif #if IM_HAVE_IMAGICK_BILATERALBLURIMAGE public function bilateralBlurImage( float $radius, float $sigma, float $intensity_sigma, float $spatial_sigma ): bool {} #endif #if IM_HAVE_IMAGICK_CLAHEIMAGE public function claheImage( int $width, int $height, int $number_bins, float $clip_limit ): bool {} #endif #if IM_HAVE_IMAGICK_CHANNELFXIMAGE // MagickChannelFxImage() applies a channel expression to the specified image. // The expression consists of one or more channels, either mnemonic or numeric // (e.g. red, 1), separated by actions as follows: // // <=> exchange two channels (e.g. red<=>blue) // => transfer a channel to another (e.g. red=>green) // , separate channel operations (e.g. red, green) // | read channels from next input image (e.g. red | green) // ; write channels to next output image (e.g. red; green; blue) public function channelFxImage(string $expression): Imagick {} #endif #if IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE public function colorThresholdImage( ImagickPixel|string $start_color, ImagickPixel|string $stop_color ): bool {} #endif #if IM_HAVE_IMAGICK_COMPLEXIMAGES // COMPLEX_OPERATOR_ public function complexImages(int $complex_operator): Imagick {} #endif #if IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE public function interpolativeResizeImage( int $columns, int $rows, int $interpolate // INTERPOLATE_ ): bool {} #endif #if IM_HAVE_IMAGICK_LEVELIMAGECOLORS public function levelImageColors( ImagickPixel|string $black_color, ImagickPixel|string $white_color, bool $invert ): bool {} #endif #if IM_HAVE_IMAGICK_LEVELIZEIMAGE public function levelizeImage( float $black_point, float $gamma, float $white_point ): bool {} #endif //For example: "o3x3,6" generates a 6 level posterization of the image // with a ordered 3x3 diffused pixel dither being applied between each // level. While checker,8,8,4 will produce a 332 colormaped image with // only a single checkerboard hash pattern (50% grey) between each color // level, to basically double the number of color levels with a bare // minimim of dithering. #if IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE public function orderedDitherImage(string $dither_format): bool {} #endif #if IM_HAVE_IMAGICK_WHITEBALANCEIMAGE public function whiteBalanceImage(): bool {} #endif } imagick-3.6.0/ImagickDraw.stub.php0000644000000000000000000002674614145213432015507 0ustar rootroot 0x628 public function resetVectorGraphics(): bool {} #endif #if MagickLibVersion > 0x649 public function getTextKerning(): float {} public function setTextKerning(float $kerning): bool {} public function getTextInterwordSpacing(): float {} public function setTextInterwordSpacing(float $spacing): bool {} #endif #if MagickLibVersion > 0x655 public function getTextInterlineSpacing(): float {} public function setTextInterlineSpacing(float $spacing): bool {} #endif public function __construct() {} public function setFillColor(ImagickPixel|string $fill_color): bool {} public function setFillAlpha(float $alpha): bool {} public function setResolution(float $resolution_x, float $resolution_y): bool {} public function setStrokeColor(ImagickPixel|string $color): bool {} public function setStrokeAlpha(float $alpha): bool {} public function setStrokeWidth(float $width): bool {} public function clear(): bool {} public function circle( float $origin_x, float $origin_y, float $perimeter_x, float $perimeter_y ): bool {} public function annotation(float $x, float $y, string $text): bool {} public function setTextAntialias(bool $antialias): bool {} public function setTextEncoding(string $encoding): bool {} public function setFont(string $font_name): bool {} public function setFontFamily(string $font_family): bool {} public function setFontSize(float $point_size): bool {} // STYLE_* public function setFontStyle(int $style): bool {} /** * $weight font weight (valid range 100-900) */ public function setFontWeight(int $weight): bool {} public function getFont(): string {} public function getFontFamily(): string {} public function getFontSize(): float {} public function getFontStyle(): int {} public function getFontWeight(): int {} /** @alias ImagickDraw::clear */ public function destroy(): bool {} public function rectangle(float $top_left_x, float $top_left_y, float $bottom_right_x, float $bottom_right_y): bool {} public function roundRectangle(float $top_left_x, float $top_left_y, float $bottom_right_x, float $bottom_right_y, float $rounding_x, float $rounding_y): bool {} //ox //origin x ordinate //oy //origin y ordinate //rx //radius in x //ry //radius in y //start //starting rotation in degrees //end //ending rotation in degrees public function ellipse(float $origin_x, float $origin_y, float $radius_x, float $radius_y, float $angle_start, float $angle_end): bool {} public function skewX(float $degrees): bool {} public function skewY(float $degrees): bool {} public function translate(float $x, float $y): bool {} public function line(float $start_x, float $start_y, float $end_x, float $end_y): bool {} //sx //starting x ordinate of bounding rectangle //sy //starting y ordinate of bounding rectangle //ex //ending x ordinate of bounding rectangle //ey //ending y ordinate of bounding rectangle //sd //starting degrees of rotation //ed //ending degrees of rotation public function arc( float $start_x, float $start_y, float $end_x, float $end_y, float $start_angle, float $end_angle ): bool {} #if MagickLibVersion >= 0x700 // PAINT_* public function alpha(float $x, float $y, int $paint): bool {} #else /** @deprecated */ // PAINT_* public function matte(float $x, float $y, int $paint): bool {} #endif public function polygon(array $coordinates): bool {} public function point(float $x, float $y): bool {} public function getTextDecoration(): int {} public function getTextEncoding(): string {} public function getFontStretch(): int {} // STRETCH_* font_stretch public function setFontStretch(int $stretch): bool {} public function setStrokeAntialias(bool $enabled): bool {} // ALIGN_* public function setTextAlignment(int $align): bool {} // DECORATION_* public function setTextDecoration(int $decoration): bool {} public function setTextUnderColor(ImagickPixel|string $under_color): bool {} public function setViewbox(int $left_x, int $top_y, int $right_x, int $bottom_y): bool {} public function clone(): ImagickDraw {} public function affine(array $affine): bool {} public function bezier(array $coordinates): bool {} // COMPOSITE_* public function composite( int $composite, float $x, float $y, float $width, float $height, Imagick $image ): bool {} // PAINT_* public function color(float $x, float $y, int $paint): bool {} public function comment(string $comment): bool {} public function getClipPath(): string {} public function getClipRule(): int {} public function getClipUnits(): int {} public function getFillColor(): ImagickPixel {} public function getFillOpacity(): float {} public function getFillRule(): int {} public function getGravity(): int {} public function getStrokeAntialias(): bool {} public function getStrokeColor(): ImagickPixel {} public function getStrokeDashArray(): array {} public function getStrokeDashOffset(): float {} public function getStrokeLineCap(): int {} public function getStrokeLineJoin(): int {} public function getStrokeMiterLimit(): int {} public function getStrokeOpacity(): float {} public function getStrokeWidth(): float {} public function getTextAlignment(): int {} public function getTextAntialias(): bool {} public function getVectorGraphics(): string {} public function getTextUnderColor(): ImagickPixel {} public function pathClose(): bool {} // We use the following scheme for naming: // * control points are numbered e.g. x1 // * end points are not numbered. e.g. x // // This makes the functions that have control points match those which // don't have control points. //x1 //x ordinate of control point for curve beginning //y1 //y ordinate of control point for curve beginning //x2 //x ordinate of control point for curve ending //y2 //y ordinate of control point for curve ending //x //x ordinate of the end of the curve //y //y ordinate of the end of the curve public function pathCurveToAbsolute(float $x1, float $y1, float $x2, float $y2, float $x, float $y): bool {} public function pathCurveToRelative(float $x1, float $y1, float $x2, float $y2, float $x, float $y): bool {} public function pathCurveToQuadraticBezierAbsolute(float $x1, float $y1, float $x_end, float $y): bool {} public function pathCurveToQuadraticBezierRelative(float $x1, float $y1, float $x_end, float $y): bool {} // TODO - should these be $x_end, float $y_end to be consistent? // Or should the $x_end be $x above. public function pathCurveToQuadraticBezierSmoothAbsolute(float $x, float $y): bool {} // TODO - should these be $x_end, float $y_end to be consistent public function pathCurveToQuadraticBezierSmoothRelative(float $x, float $y): bool {} public function pathCurveToSmoothAbsolute(float $x2, float $y2, float $x, float $y): bool {} public function pathCurveToSmoothRelative(float $x2, float $y2, float $x, float $y): bool {} // rx x radius // ry y radius // x_axis_rotation indicates how the ellipse as a whole is rotated relative to the current coordinate system // large_arc If non-zero (true) then draw the larger of the available arcs // sweep If non-zero (true) then draw the arc matching a clock-wise rotation public function pathEllipticArcAbsolute( float $rx, float $ry, float $x_axis_rotation, bool $large_arc, bool $sweep, float $x, float $y ): bool {} public function pathEllipticArcRelative( float $rx, float $ry, float $x_axis_rotation, bool $large_arc, bool $sweep, float $x, float $y ): bool {} public function pathFinish(): bool {} public function pathLineToAbsolute(float $x, float $y): bool {} public function pathLineToRelative(float $x, float $y): bool {} public function pathLineToHorizontalAbsolute(float $x): bool {} public function pathLineToHorizontalRelative(float $x): bool {} public function pathLineToVerticalAbsolute(float $y): bool {} public function pathLineToVerticalRelative(float $y): bool {} public function pathMoveToAbsolute(float $x, float $y): bool {} public function pathMoveToRelative(float $x, float $y): bool {} public function pathStart(): bool {} public function polyline(array $coordinates): bool {} public function popClipPath(): bool {} public function popDefs(): bool {} public function popPattern(): bool {} public function pushClipPath(string $clip_mask_id): bool {} public function pushDefs(): bool {} public function pushPattern( string $pattern_id, float $x, float $y, float $width, float $height ): bool {} public function render(): bool {} public function rotate(float $degrees): bool {} public function scale(float $x, float $y): bool {} public function setClipPath(string $clip_mask): bool {} // FILLRULE_* public function setClipRule(int $fillrule): bool {} // PATHUNITS_* uh, this is unfortunate. The ImageMagick constant // is call ClipPathUnits. The constant dropped the 'clip' and the // method call dropped the 'path'. _Maybe_ add a setClipPathUnits // method, and deprecate this one. Or just ignore the issue. public function setClipUnits(int $pathunits): bool {} public function setFillOpacity(float $opacity): bool {} public function setFillPatternUrl(string $fill_url): bool {} // FILLRULE_* public function setFillRule(int $fillrule): bool {} // GRAVITY_* public function setGravity(int $gravity): bool {} public function setStrokePatternUrl(string $stroke_url): bool {} public function setStrokeDashOffset(float $dash_offset): bool {} // LINECAP_* public function setStrokeLineCap(int $linecap): bool {} // LINEJOIN_* public function setStrokeLineJoin(int $linejoin): bool {} // The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'. public function setStrokeMiterLimit(int $miterlimit): bool {} // range 0-1 public function setStrokeOpacity(float $opacity): bool {} public function setVectorGraphics(string $xml): bool {} public function pop(): bool {} public function push(): bool {} // A typical stroke dash array might contain the members 5 3 2. public function setStrokeDashArray(array $dashes): bool {} #if MagickLibVersion >= 0x693 public function getOpacity(): float {} // TODO - imply 0 to 1 range. public function setOpacity(float $opacity): bool {} #endif #if MagickLibVersion >= 0x675 public function getFontResolution(): array {} public function setFontResolution(float $x, float $y): bool {} public function getBorderColor(): ImagickPixel {} public function setBorderColor(ImagickPixel|string $color): bool {} #endif #if MagickLibVersion >= 0x693 public function setDensity(string $density): bool {} public function getDensity(): ?string {} #endif #if MagickLibVersion >= 0x692 public function getTextDirection(): int {} // DIRECTION_* public function setTextDirection(int $direction): bool {} #endif } imagick-3.6.0/ImagickKernel.stub.php0000644000000000000000000000113314145213432016011 0ustar rootroot= 0x700 #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD 1 #endif #elif MagickLibVersion >= 0x631 #define IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_SETSEED 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_MEANSHIFTIMAGE 1 #endif #if MagickLibVersion >= 0x710 #define IM_HAVE_IMAGICK_KMEANSIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE 1 #endif #if MagickLibVersion >= 0x710 #define IM_HAVE_IMAGICK_BILATERALBLURIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_CLAHEIMAGE 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_CHANNELFXIMAGE 1 #endif #if MagickLibVersion >= 0x710 #define IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_COMPLEXIMAGES 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_LEVELIMAGECOLORS 1 #endif #if MagickLibVersion >= 0x709 #define IM_HAVE_IMAGICK_LEVELIZEIMAGE 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_ORDEREDDITHERIMAGE 1 #endif #if MagickLibVersion >= 0x70B #define IM_HAVE_IMAGICK_WHITEBALANCEIMAGE 1 #endif #if MagickLibVersion >= 0x702 #define IM_HAVE_IMAGICK_ADD_NOISE_WITH_ATTENUATE 1 #endif #if MagickLibVersion >= 0x70A // Technically, this may be available earlier, but the behaviour around // default mask changed. #define IM_HAVE_IMAGICK_GETSETIMAGEMASK 1 // ImageMagick forget to export the header until about 7.0.11-14... WandExport MagickBooleanType MagickSetImageMask( MagickWand *wand, const PixelMask type, const MagickWand *clip_mask ); #endif // The above is sub-optimal as it's hard to read. It'd be better to do // something like the below: //#define MAGICK_LIB_RANGE(NAME, IM6_VERSION, IM7_VERSION) slash //#if MagickLibVersion >= 0x700 slash // #if MagickLibVersion >= IM7_VERSION slash // #define IM_HAVE_##NAME 1 slash // #endif slash //#elif MagickLibVersion >= 0x600 slash // #if MagickLibVersion >= IM6_VERSION slash // #define IM_HAVE_##NAME 1 slash // #endif slash //#endif // MAGICK_LIB_RANGE(IMAGICK_SETIMAGEINTERPOLATEMETHOD, 0x631, 0x702) // But this type of macro expansion is not possible. // // https://stackoverflow.com/questions/48431325/is-it-possible-to-define-macro-inside-macro // "The resulting completely macro-replaced preprocessing token sequence is not // processed as a preprocessing directive even if it resembles one,..." // // An alternative would be to use code generation to build the define file as // part of the build process. However that would involve looking at m4 config files. #if MagickLibVersion >= 0x700 // declare symbols only defined in C source and not in header WandExport MagickBooleanType MagickSetImageMask( MagickWand *wand, const PixelMask type, const MagickWand *clip_mask ); #endif #if MagickLibVersion >= 0x710 // declare symbols only defined in C source and not in header WandExport MagickBooleanType MagickBilateralBlurImage(MagickWand *wand, const double radius,const double sigma,const double intensity_sigma, const double spatial_sigma); #endif #endif /* PHP_IMAGEMAGICK_VERSION_DEFS_H */imagick-3.6.0/regen_arginfo.sh0000755000000000000000000000137614145213432014774 0ustar rootroot#!/bin/sh VER=0$(php-config --vernum 2>/dev/null) if [ $VER -lt 80100 ]; then echo "You need php >= 8.1 to run this script" elif [ ! -f build/gen_stub.php ]; then echo "You need to run phpize once with PHP 8 to get gen_stub.php script" else set -e set -x php build/gen_stub.php Imagick.stub.php php util/fixup_arginfo.php Imagick_arginfo.h php build/gen_stub.php ImagickDraw.stub.php php util/fixup_arginfo.php ImagickDraw_arginfo.h php build/gen_stub.php ImagickKernel.stub.php php util/fixup_arginfo.php ImagickKernel_arginfo.h php build/gen_stub.php ImagickPixel.stub.php php util/fixup_arginfo.php ImagickPixel_arginfo.h php build/gen_stub.php ImagickPixelIterator.stub.php php util/fixup_arginfo.php ImagickPixelIterator_arginfo.h fi imagick-3.6.0/ChangeLog0000644000000000000000000012355414145213432013405 0ustar rootroot3.6.0 - No change from 3.6.0RC2 3.6.0RC2 - Fixes: * Remove deprecated message from Imagick::roundCorners() - Added: * Imagick::addNoiseImageWithAttenuate() 3.6.0RC1 - Imagick::getImageInterlaceScheme is undeprecated. It's the appropriate function to call to get the image interlace setting. - Image formats are now normalised to lower case. - Imagick::getImageIndex and Imagick::setImageIndex are undeprecated and work on ImageMagick 7. They call MagickGetIteratorIndex and MagickSetIteratorIndex internally. - Imagick::averageImages is undeprecated. For IM 7 it now calls EvaluateImages(wand->images,MeanEvaluateOperator). - Imagick::flattenImages is undeprecated. For IM 7 it now calls MagickMergeImageLayers(intern->magick_wand, FlattenLayer); internally. - Imagick::getImageSize is undeprecated. For IM 7 it now calls MagickGetImageLength internally. - Imagick::roundCornersImage is undeprecated and available on IM7. - Fixes: * Imagick::borderImage() changed internally to use OverCompositeOp rather than AtopCompositeOp for ImageMagick > 7. If you need the old behaviour, please use Imagick::borderImageWithComposite() instead, which allows you to set the composite method. * Imagick::frameImage() changed internally to use OverCompositeOp rather than AtopCompositeOp for ImageMagick > 7. If you need the old behaviour, please use Imagick::frameImageWithComposite() instead, which allows you to set the composite method. * Imagick::profileImage() fixed to allow null as second paramter again. If you can't upgrade to this version yet, pass in "", which has the same effect. * Imagick::ALPHACHANNEL_COPY and Imagick::ALPHACHANNEL_OPAQUE should be available on IM7. * Imagick::setImageMatteColor() should be available on IM7. - Added: * Imagick::borderImageWithComposite() same as Imagick::borderImage() but allows user to set composite operator used. * Imagick::frameImageWithComposite() same as Imagick::frameImage() but allows user to set composite operator used. * function Imagick::cannyEdgeImage * function Imagick::setSeed * function Imagick::waveletDenoiseImage * function Imagick::meanShiftImage * function Imagick::kmeansImage * function Imagick::rangeThresholdImage * function Imagick::autoThresholdImage * function Imagick::bilateralBlurImage * function Imagick::claheImage * function Imagick::channelFxImage * function Imagick::colorThresholdImage * function Imagick::complexImages * function Imagick::interpolativeResizeImage * function Imagick::levelImageColors * function Imagick::levelizeImage * function Imagick::orderedDitherImage * function Imagick::whiteBalanceImage 3.5.1 - No change from 3.5.1RC1 3.5.1RC1 - Better detection of appropriate OpenMP library to use, i.e. GCC or Clang. 3.5.0 - Correct parameter for ImagickPixel::getColorValue and ImagickPixel::setIndex. 3.5.0RC2 - Fix incorrect parameter defaults, and small fixes on arginfo generation. 3.5.0RC1 - ImageMagick 7 is still not widely available on systems. So contrary to previous plans, ImageMagick 6 support will continue for now, but users are recommended to use ImageMagick 7 if possible. - Method names have been changed to not be all lower case. Both method names and parameter information is built from the Imagick*.stub.php files. - Prevent accidental creation of zero dimension images. ImageMagick doesn't prevent creation of zero dimension images, but will give an error when that image is used. I don't think this will affect any correctly program, but if it does, and you need to re-enable zero dimension images, please open an issue at https://phpimagick.com/issues - Various pieces of work have been done to make GOMP not segfault including: * Call omp_pause_resource_all when available during shutdown. * Added the 'imagick.shutdown_sleep_count' (default 10) and 'imagick.set_single_thread' (default On). Both of these exist to mitigate the segaults on shutdown. - Fixes: * Correct version check to make RemoveAlphaChannel and FlattenAlphaChannel be available when using Imagick with ImageMagick version 6.7.8-x * Imagick::morphology now no longer ignores channel parameter - Added: * PHP 8.0 support. * Location check for ImageMagick 7 for NixOS and Brew. * Imagick::houghLineImage(int $width, int $height, float $threshold): bool {} * Imagick::setImagePixelColor(int $x, int $y, ImagickPixel|string $color) * Imagick::setImageMask(Imagick $clip_mask, int $pixelmask_type) * Imagick::getImageMask(int $pixelmask_type) * Imagick::VIRTUALPIXELMETHOD_DITHER * Imagick::VIRTUALPIXELMETHOD_RANDOM * Imagick::COMPOSITE_FREEZE * Imagick::COMPOSITE_INTERPOLATE * Imagick::COMPOSITE_NEGATE * Imagick::COMPOSITE_REFLECT * Imagick::COMPOSITE_SOFTBURN * Imagick::COMPOSITE_SOFTDODGE * Imagick::COMPOSITE_STAMP * Imagick::COMPOSITE_RMSE * Imagick::COMPRESSION_DWAA * Imagick::COMPRESSION_DWAB * Imagick::EVALUATE_INVERSE_LOG * Imagick::COLORSPACE_DISPLAYP3 * Imagick::COLORSPACE_ADOBE98 * Imagick::COLORSPACE_PROPHOTO * Imagick::COLORSPACE_JZAZBZ * Imagick::DISTORTION_RIGID_AFFINE * Imagick::DISTORTION_BARRELINVERSE * Imagick::STATISTIC_ROOT_MEAN_SQUARE 3.4.4 - Fixes: * Correct version check to make RemoveAlphaChannel and FlattenAlphaChannel be available when using Imagick with ImageMagick version 6.7.8-x 3.4.4RC2 - Fixes: * Correct stability for RC release * Fix undefined variable for ZTS build 3.4.4RC1 - The 3.4.4 release is intended to be the last release (other than small bug fixes) that will support either PHP 5.x, or ImageMagick 6.x. The next planned release will be PHP > 7.0 and ImageMagick > 7.0 at least, if not higher. - Added: * function Imagick::optimizeImageTransparency() * METRIC_STRUCTURAL_SIMILARITY_ERROR * METRIC_STRUCTURAL_DISSIMILARITY_ERROR * COMPRESSION_ZSTD - https://github.com/facebook/zstd * COMPRESSION_WEBP * CHANNEL_COMPOSITE_MASK * FILTER_CUBIC_SPLINE - "Define the lobes with the -define filter:lobes={2,3,4} (reference https://imagemagick.org/discourse-server/viewtopic.php?f=2&t=32506)." * Imagick now explicitly conflicts with the Gmagick extension. - Fixes: * Bug 77128 - Imagick::setImageInterpolateMethod() not available on Windows * Prevent memory leak when ImagickPixel::__construct called after object instantiation. * Prevent segfault when ImagickPixel internal constructor not called. * Imagick::setResourceLimit support for values larger than 2GB (2^31) on 32bit platforms. * Corrected memory overwrite in Imagick::colorDecisionListImage() * Bug 77791 - ImagickKernel::fromMatrix() out of bounds write. - Deprecated: * The following functions have been deprecated: ImagickDraw, matte Imagick::averageimages Imagick::colorfloodfillimage Imagick::filter Imagick::flattenimages Imagick::getimageattribute Imagick::getimagechannelextrema Imagick::getimageclipmask Imagick::getimageextrema Imagick::getimageindex Imagick::getimagematte Imagick::getimagemattecolor Imagick::getimagesize Imagick::mapimage Imagick::mattefloodfillimage Imagick::medianfilterimage Imagick::mosaicimages Imagick::orderedposterizeimage Imagick::paintfloodfillimage Imagick::paintopaqueimage Imagick::painttransparentimage Imagick::radialblurimage Imagick::recolorimage Imagick::reducenoiseimage Imagick::roundcornersimage Imagick::roundcorners Imagick::setimageattribute Imagick::setimagebias Imagick::setimageclipmask Imagick::setimageindex Imagick::setimagemattecolor Imagick::setimagebiasquantum Imagick::setimageopacity Imagick::transformimage 3.4.3 No changes from 3.4.3RC4. 3.4.3RC4 - Fixes: * Avoid internal segfault. 3.4.3RC3 - Fixes: * Correct file permissions in built package. 3.4.3RC2 - Fixes: * Imagick::getRegistry() now throws an exception if the key does not exist, rather than terminating the program. * Prevent attempts to resize image to zero width or height, which is not supported by ImageMagick. * Fix compiling on Windows issue. - Added: * function Imagick::setImageAlpha() which replaces ImagickDraw::setOpacity() 3.4.3RC1 - Fixes: * Imagick::transformImage and Imagick::orderedPosterizeImage now correctly excluded from IM7 build. * Bug 72311 - compiling against PHP 7.1. * Bug 72226 - regression for Imagick Exception classes being final on 7.x * Corrected reference of constants. Imagick::METRIC_MEANERRORPERPIXELMETRIC from MeanErrorPerPixelMetric to MeanErrorPerPixelErrorMetric. Imagick::METRIC_PEAKSIGNALTONOISERATIO from PeakSignalToNoiseRatioMetric to PeakSignalToNoiseRatioErrorMetric - Added: * function Imagick::identifyImageType() : int returns one of the Imagick::IMGTYPE_* constants * Imagick::INTERPOLATE_NEAREST_PIXEL for ImageMagick >= 7 * In ImageMagick, the names of two filter constants were corrected to the standard spelling. Support for the new spelling has been added. The old constants are left in place for legacy support. Legacy: FILTER_HANNING, new name: FILTER_HANN Legacy: FILTER_WELSH, new name: FILTER_WELCH * The Imagick::IMGTYPE_*MATTE* constants are deprecated for ImageMagick 7. Instead an appropriate Imagick::IMGTYPE_*MATTE* should be used. IMGTYPE_GRAYSCALEMATTE => IMGTYPE_GRAYSCALEALPHA IMGTYPE_PALETTEMATTE => IMGTYPE_PALETTEALPHA IMGTYPE_TRUECOLORALPHA => IMGTYPE_TRUECOLORMATTE IMGTYPE_COLORSEPARATIONALPHA => IMGTYPE_COLORSEPARATIONMATTE IMGTYPE_PALETTEBILEVELALPHA => IMGTYPE_PALETTEBILEVELMATTE * Several ALPHACHANNEL_* constants are only available in ImageMagick < 7 IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_RESET", ResetAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_COPY", CopyAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_OPAQUE", OpaqueAlphaChannel); * Several ALPHACHANNEL_* constants are only available in ImageMagick >= 7. These constants re-use the values of the constants removed. IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_ON", OnAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_OFF", OffAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_DISCRETE", DiscreteAlphaChannel); 3.4.2 - Fixes: * Bug: IM143 Correct ifdef around setOpacity, getOpacity and localContrastImage. * Bug: IM147 Imagick was Borging PHP's error handler. 3.4.1 - Fixes: * Bug 71742 - arrays that contain data that is held by reference gives error. - Added: * Imagick::autoGammaImage([int channel = CHANNEL_ALL]) * Imagick::autoOrient() * Imagick::compositeImageGravity(Imagick $image, int COMPOSITE_CONSTANT, int GRAVITY_CONSTANT) * Imagick::localContrastImage(float radius, float strength) * Imagick::DIRECTION_LEFT_TO_RIGHT * Imagick::DIRECTION_RIGHT_TO_LEFT * Imagick::SPARSECOLORMETHOD_MANHATTAN * ImagickDraw::getOpacity() : float * ImagickDraw::setOpacity(float opacity) :bool * ImagickDraw::getFontResolution() : array * ImagickDraw::setFontResolution(float x, float y) : bool * ImagickDraw::getTextDirection() : bool * ImagickDraw::setTextDirection(int direction) : bool * ImagickDraw::getBorderColor() : ImagickPixel * ImagickDraw::setBorderColor(ImagickPixel color) : bool * ImagickDraw::getDensity() : string|null * ImagickDraw::setDensity(string density_string) : bool * ImagickPixel::setColorFromPixel(ImagickPixel $srcPixel) : bool 3.4.0 No changes from 3.4.0RC6. 3.4.0RC6 - Added: * Imagick::evaluateImages(int EVALUATE_CONSTANT) : Imagick - Fixes: * Imagick::setImageWhitePoint, Imagick::setImageRedPrimary, Imagick::setImageGreenPrimary, Imagick::setImageBluePrimary now take 3 params when compiled against IM7. * Imagick::getImageWhitePoint, Imagick::getImageRedPrimary, Imagick::getImageGreenPrimary, Imagick::getImageBluePrimary now return 3 values when compiled against IM7. 3.4.0RC5 - Added: * Imagick::subImageMatch() added parameters. The signature is now: Imagick::subimagematch(Imagick $subimage[, array &$bestMatch[, float &similarity[, float $similarity_threshold = 0[, int $metric = ]]]]) These parameters are only used when compiled against ImageMagick 7. - Fixes: * wrong type for zend_parse_parameters. 3.4.0RC4 - Fixes: * Remove duplicated definitions of class constants. 3.4.0RC3 - Fixes: * Imagick::adaptiveResizeImage, Imagick::cropThumbnailImage Imagick::resizeImage, Imagick::scaleImage, and Imagick::thumbnailImage have all had a rounding bug fixed. An additional parameter has been added to each of them, 'bool $legacy'. If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0. If false, the calculations should produce the same results as ImageMagick CLI does. * Imagick::colorizeImage() and Imagick::tintImage were using the wrong behaviour. It is now fixed and the legacy behaviour can still be used by passing a 3rd parameter of `true` to the function to indicate that the legacy behaviour is desired. * Imagick::importImagePixels regression fixed. * Imagick::subImageMatch use correct error metric in IM7 - Added methods: * Imagick::similarityImage() which is an alias to Imagick::subImageMatch() 3.4.0RC2 - Fixes: * Version number in extension header. 3.4.0RC1 - Added support: * PHP 7 * ImageMagick 7. Imagick can be compiled against either ImageMagick 6 or ImageMagick 7 However it must be run with the exact same version it was compiled against. Trying to run Imagick with a different version of ImageMagick than it was compiled against is not supported. Please see http://nextgen.imagemagick.org/script/porting.php for more information about ImageMagick 7. - Minimum versions supported are now PHP >= 5.4.0 and ImageMagick >= 6.5.3-10. Earlier versions may continue to work, but they are no longer supported. - Added methods: * Imagick::getConfigureOptions * Imagick::getFeatures * Imagick::getHDRIEnabled * Imagick::setImageChannelMask (IM7 only) - Added IM7 constants: * Imagick::CHANNEL_READ_MASK * Imagick::CHANNEL_WRITE_MASK * Imagick::CHANNEL_META - Fixes: * ImagickPixel::getColorQuantum, ImagickPixel::getColorValueQuantum and ImagickPixel::setColorValueQuantum now correctly use floats when Imagick was compiled against a HDRI version of ImageMagick * Imagick::exportImagePixels works for all storage types 3.3.0 No changes 3.3.0RC2 - Corrected package versioning to exclude PHP7 - Correct params for Imagick::getColorValueQuantum 3.3.0RC1 - Added ImagickKernel class. These can be used with the Imagick::morphology or Imagick::filter functions. - Added methods: * Imagick::brightnessContrastImage() * Imagick::colorMatrixImage() * Imagick::deleteImageProperty() * Imagick::filter() * Imagick::forwardFourierTransformImage() * Imagick::getAntiAlias() * Imagick::getImageCompression() * Imagick::getRegistry() * Imagick::getQuantum() * Imagick::identifyFormat() * Imagick::inverseFourierTransformImage() * Imagick::isPixelSimilarQuantum() * Imagick::listRegistry() * Imagick::morphology() * Imagick::rotationalBlurImage() * Imagick::selectiveBlurImage() * Imagick::setAntiAlias() * Imagick::setImageBiasQuantum() * Imagick::setProgressMonitor() * Imagick::setRegistry() - which allows setting the "temporary-path" used by ImageMagick * Imagick::statisticImage() * Imagick::subImageMatch() * ImagickPixel::getColorQuantum() - Added constants: * Imagick::RESOURCETYPE_TIME * Imagick::RESOURCETYPE_THROTTLE * Imagick::CHANNEL_RGBA * Imagick::ALPHACHANNEL_BACKGROUND * Imagick::FUNCTION_ARCSIN * Imagick::FUNCTION_ARCTAN - Fixed Imagick::clutImage() parameter parsing - Fixed tint image bug - Fixed ImageMagick compiled with HDRI having quantum values as floats - Fixed memory leaks in: * Imagick::getImageBlob() * Imagick::getImagesBlob() * Imagick::getImageChannelStatistics() * Imagick::getImageFormat() * Imagick::getImageMimetype() * Imagick::getSamplingFactors() * Imagick::identifyImage() * Imagick::tintImage - Fixed segfault when compiling statically - ImagickDraw::setFontFamily no longer checks whether the font is available. This allows a font family to be set where the family name is not the same as the font name. However it also means an invalid family name can be set, leading to the default font being used, instead of an exception being thrown. See https://github.com/mkoppanen/imagick/issues/77 - Removed Zend MM support - Excluded deprecated methods: * Imagick::getImageMatte() * Imagick::colorFloodfillImage() * Imagick::matteFloodfillImage() * Imagick::paintFloodfillImage() * Imagick::paintOpaqueImage() * Imagick::paintTransparentImage() * Imagick::mapImage() * Imagick::recolorImage() * Imagick::setImageIndex() * Imagick::getImageIndex() * Imagick::getImageSize() * Imagick::setImageAttribute() * Imagick::getImageAttribute() * Imagick::mosaicImages() * Imagick::averageImages() * Imagick::flattenImages() This is replaced by $im = $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN) * Imagick::getImageChannelExtrema() * Imagick::getImageExtrema() - Ini file changes * Added imagick.skip_version_check. Imagick now checks that it was compiled against the same version of ImageMagick that it is being run with, and will give a warning if it was compiled against a different version of ImageMagick. The skip_version_check setting allows you to suppress this warning. However it is strongly recommended to use the version of ImageMagick that Imagick was compiled against. - Misc: * CI now compiles with CFLAGS="-Wno-deprecated-declarations -Wdeclaration-after-statement -Werror" 3.2.0RC1 - Fix bug #66098: Segfault in zval_addref_p 3.2.0b2 - A lot of internal improvements on the code - Added ImagickPixel::isPixelSimilar and deprecate ImagickPixel::isSimilar #10 - Added imagick::smushimages - Added imagick::blueshiftimage and imagick::clampimage - Added Imagick::autolevelimage - Added constants: Imagick::ALPHACHANNEL_REMOVE Imagick::ALPHACHANNEL_FLATTEN Imagick::RESOURCETYPE_THREAD Imagick::COMPOSITE_CHANGEMASK Imagick::COMPOSITE_LINEARLIGHT Imagick::COMPOSITE_DIVIDE Imagick::COMPOSITE_DISTORT Imagick::COMPOSITE_BLUR Imagick::COMPOSITE_PEGTOPLIGHT Imagick::COMPOSITE_VIVIDLIGHT Imagick::COMPOSITE_PINLIGHT Imagick::COMPOSITE_LINEARDODGE Imagick::COMPOSITE_LINEARBURN Imagick::COMPOSITE_MATHEMATICS Imagick::COMPOSITE_MODULUSADD Imagick::COMPOSITE_MODULUSSUBTRACT Imagick::COMPOSITE_MINUSDST Imagick::COMPOSITE_DIVIDEDST Imagick::COMPOSITE_DIVIDESRC Imagick::COMPOSITE_MINUSSRC Imagick::COMPOSITE_DARKENINTENSITY Imagick::COMPOSITE_LIGHTENINTENSITY Imagick::FILTER_KAISER Imagick::FILTER_WELSH Imagick::FILTER_PARZEN Imagick::FILTER_LAGRANGE Imagick::FILTER_SENTINEL Imagick::FILTER_BOHMAN Imagick::FILTER_BARTLETT Imagick::FILTER_JINC Imagick::FILTER_SINCFAST Imagick::FILTER_ROBIDOUX Imagick::FILTER_LANCZOSSHARP Imagick::FILTER_LANCZOS2 Imagick::FILTER_LANCZOS2SHARP Imagick::FILTER_ROBIDOUXSHARP Imagick::FILTER_COSINE Imagick::FILTER_SPLINE Imagick::FILTER_LANCZOSRADIUS Imagick::COMPRESSION_ZIPS Imagick::COMPRESSION_PIZ Imagick::COMPRESSION_PXR24 Imagick::COMPRESSION_B44 Imagick::COMPRESSION_B44A Imagick::COMPRESSION_LZMA Imagick::COMPRESSION_JBIG1 Imagick::COMPRESSION_JBIG2 3.2.0b1 - Added Countable interface to Imagick class - Added experimental support for Zend MM. If compiled with --enable-imagick-zend-mm Imagick will respect PHP memory limits - Added additional parameter to writeImageFile to allow setting format - Distribute tests as part of the release - Fixed Bug #65043: Destroy and clear method do the same things - Fixed Bug #64945: ZEND_ACC_ALLOW_STATIC vs ZEND_ACC_STATIC - A lot of internal refactoring: rewrite macros as functions, clean up naming etc 3.1.2 - Fixed ZTS build - Added LICENSE file to comply with Fedora Packaging Guidelines - Fixed memory leaks - Added mime type to identifyImage 3.1.1 - Reworked identifyImage method 3.1.0 - Releasing RC3 as is 3.1.0RC3 - Fixed building against latest ImageMagick versions (#GH-2) - Fixed thumbnail resize bug (#GH-1) - Fixed building against latest PHP versions 3.1.0RC2 - Fixed PHP bug #61879 (Imagick writeImages no longer works with PHP5.4) 3.1.0RC1 - Fixed PECL Bug #22722 - Fixed possible memory leaks in error scenarios - Added PHP 5.4 support 3.1.0b1 - Fixed PECL Bug #21229 - Fixed PECL Bug #20636 - Deprecated clone() method in favour of clone keyword - Added ImagickDraw::setResolution - Internal refactoring on read/write code 3.0.1 - Fixed PECL bug #17244 3.0.1RC2 - Fixed a bug which caused failure in writing files with format prefix (such as png:test.jpg) 3.0.1RC1 - Fixed build against PHP 5.1.x - Fixed PECL bug #17892 3.0.0 - No bugs reported against RC2 so releasing as stable 3.0.0RC2 - Added set/getColorspace - Added transformImageColorspace (Patrick Durold) - Fix writeImage logic error in filename_len checking. - Fix conversion to double in affine matrices - s,function_entry,zend_function_entry, (Johannes) 3.0.0RC1 - Fixes a crash when setResourceLimit is called statically - Fixes PECL bug #16932 Unable to read image from the filehandle - Return empty string if original value is empty in: * ImagickDraw::getClipPath * ImagickDraw::getEncoding * ImagickDraw::getFont * ImagickDraw::getFontFamily - More relaxed validation on affinematrices - Initialize the counter properly in polygons. Thanks to Etienne Kneus 3.0.0b2 - Fixes building against PHP 5.2.x 3.0.0b1 - Fixes incorrect error message "wand contains no images" - Change cropthumbnailimage behavior to actually do what it is supposed to do - setimageartifact, getimageartifact, deleteimageartifact - added fill param to thumbnailImage - Added support for using imagick objects in other extensions 2.3.0 - imagick::setImageVirtualPixelMethod not deprecated anymore - fixed windows build 2.3.0RC3 - Closed bug reports and pushing out RC just in case before stable. 2.3.0RC2 - Fixed image reading routines. Page defitions (test.pdf[0]) were broken on RC1 - Fixed imagick::colorizeImage, it had no effect on images 2.3.0RC1 - Fixes PECL bug #16085 (Twice crop returns invalid result) - Removed unnecessary checks 2.3.0b1 - Fixed compilation against older ImageMagick versions (Patch by Tim Herzog) - Fixed getImageMatte to actually return boolean instead of int - Added methods: * Imagick::getImageMimeType * Imagick::writeimagefile * Imagick::writeimagesfile * Imagick::resetimagepage * Imagick::setimageclipmask * Imagick::getimageclipmask * Imagick::animateimages * Imagick::recolorimage * Imagick::floodfillpaintimage * Imagick::opaquepaintimage * Imagick::transparentpaintimage * Imagick::decipherimage * Imagick::encipherimage * Imagick::getimagealphachannel * Imagick::getimagechanneldistortions * Imagick::getimagegravity * Imagick::setimagegravity * Imagick::remapimage * Imagick::exportimagepixels * Imagick::getimagechannelkurtosis * Imagick::functionimage * Imagick::importImagePixels * Imagick::sparseColorImage * Imagick::deskewImage * Imagick::segmentImage * Imagickdraw::gettextkerning * Imagickdraw::settextkerning * Imagickdraw::gettextinterwordspacing * Imagickdraw::gettextinterwordspacing * ImagickPixel::getColorValueQuantum * ImagickPixel::setColorValueQuamtum * ImagickPixel::getIndex * ImagickPixel::setIndex 2.2.2 - No bugs reported against RC4 so releasing it as is 2.2.2RC4 - Check for ImageMagick version in config.m4 before trying to search for headers - Fixed memory leak where pointinfo is used - Fixed incorrect memory handling of array where php array is converted to array of doubles - Cleaned up image writing routines - Added missing semicolon on constant registration - Added distortion and alphachannel constants 2.2.2RC3 - Fixed clone keyword to actually clone the wand ptr - Imagick progress monitor name is now correctly cloned - Fixes PECL Bug #15614 2.2.2RC2 + Added Imagick::setImageProgressmonitor and Imagick::orderedPosterizeImage - Fixes http://imagemagick.org/discourse-server/viewtopic.php?f=18&t=12828 - Fixes error with empty exception messages - Fixes PECL Bug #15332 - Fixed a possible memory leak in Imagick::convolveImage 2.2.2RC1 - Fixes Pecl bug #15321 - Added getImageCompressionQuality - Fixes building against PHP 5.3 2.2.1 - No bugs reported against RC2 so releasing it as is 2.2.1RC2 - Fixed ZTS build 2.2.1RC1 - Fixes a small memory leak when casting a string to ImagickPixel object - Added new constants - Added getImageChannelRange method - Some cleaning up on the syntax 2.2.0 - Changes since 2.1.1: * Major refactoring of the file structure * Fixes bugs related to the refactoring 2.2.0RC1 - Fix build on Mac related to duplicate symbols 2.2.0b2 - Closes PECL Bugs #13841 and #13787 2.2.0b1 - Major refactoring of the internal file structure 2.1.1 - Fixed a bug with fit parameter when scaling images with scaling ratio 1:1 * This is a minor BWC break. Scripts relying on incorrect behavior might need revisiting. 2.1.1RC1 - Fixed building against ImageMagick 6.3.8-x 2.1.0 - Addded setImageAlphaChannel method - Fixed sharpenImage parameters being reversed - Fixed building with pre 5.2 versions 2.1.0RC3 - Fixes PECL Bug #12851 - Some major housekeeping changing numeral values to constants 2.1.0RC2 - Closes PECL Bugs #12463 and #12479 - Fixes the behavior of flattenImages and fximage - Fixes incorrect thumbnail behavior - Fixes a bug in Imagick::cropThumbnailImage - Added new constant Imagick::NOISE_RANDOM 2.1.0RC1 + All methods that expect ImagickPixel now allow a string representing the color + Added support for pixeliterator in all supported ImageMagick versions. + ImagickPixelIterator now implements the iterator interface + It is now possible to set the row with region iterator + Added MAXPATHLEN checks for image reads/writes + Added a fix to Imagick::cropThumbnailImage() to check if images are already at the desired size + Fixed a memory leak in Imagick::getImageHistogram() + Speed improvements to Imagick::cropThumbnailImage() + Added interpolate constants + Fixed ImagickPixel::getColor() + Marked ImagickDraw::__construct() with ZEND_ACC_CTOR + Added fit parameter and proportional scaling to: - Imagick::adaptiveResizeImage() - Imagick::scaleImage() - Imagick::resizeImage() + Added imagick.locale_fix ini setting to fix drawing bug on some locale + Suppressed warnings in readImageFile and pingImageFile (PECL Bug #12367) + Added methods: - ImagickPixel::clone() - ImagickPixel::getColorAsString() - Imagick::mergeImageLayers() - Imagick::paintFloodfillImage() - Imagick::setFont() - Imagick::getFont() - Imagick::setPointsize() - Imagick::getPointsize() 2.0.1 + ImagickDraw::setFont and ImagickDraw::setFontFamily now allow only valid fonts + Added IMAGICK_EXTVER and IMAGICK_EXTNUM constants + Added check for empty or invalid pseudo format string in Imagick::newPseudoImage + Fixed incorrect arg hinting for Imagick::compareImageChannels 2.0.1RC1 + Added Imagick::distortImage and Imagick::setlastiterator + Added optional fourth parameter to newImage to set the format when creating a new canvas + Fixed fitting to zero size image in Imagick::thumbnailImage + Fixed the destroy methods. + Most of the operations that read / add images to the stack move the iterator position to the last element + Fixed memleaks in methods that replace the internal MagickWand* pointer 2.0.0 + Added Imagick::extentImage + Added Imagick::IMAGICK_VERSION_NUMBER and Imagick::IMAGICK_VERSION_STRING constants + Fixed a possible crash in Imagick::newPseudoImage 2.0.0RC4 + Moved getimagelength into #if block + Added optional third parameter to thumbnailImage + Added second optional parameter to getImageProperties and getImageProfiles to return just the available properties. + Closes PECL Bug #12006 2.0.0RC3 + Closes PECL Bug #12006 + Fixes a possible crash in queryFontMetrics + New methods: + Imagick::clutImage + Imagick::setImage + Imagick::getImageLength + Imagick::getImageOrientation + Imagick::setImageOrientation + Imagick::getImageProperties + Imagick::getImageProfiles 2.0.0RC2 + Added support for forcing image format during write operations. + Added more interlace constants. They are present if imagick is compiled against ImagickMagick 6.3.4 or newer. + Added Imagick::getImageAttribute. + Added LAYERMETHOD constants. Available if compiled against ImageMagick 6.2.8 or later. + Closes PECL Bug #11934 - setImageVirtualPixelMethod triggers exception + Fixed safe_mode and open_basedir bypass for __construct, readImage, readImages and pingImage 2.0.0RC1 + Suppress error when reading image from a stream. + Fixed allow_url_fopen bypass in Imagick::newPseudoImage(). + Fixed imagick::__tostring to return empty string if the object doesnt contain images. + Fixed a problem with Imagick::getImagesBlob() when an older version of ImageMagick is used. + Fixed a crash on Windows when no arguments are passed to the Imagick constructor. + Fixed a crash when using a threaded SAPI under Windows. + Fixed a bug in ImagickDraw::affine(). + Added Imagick::getIteratorIndex() and Imagick::setIteratorIndex(). + Added Imagick::readImages() 2.0.0b3 + Closes PECL Request #11513 + Fixes ImagickPixel bug reported by Imran Nazar. + Fixed Imagick::setImageDispose and Imagick::setImageUnits. + Fixed Imagick::queryFontMetrics to autodetect multiline text if multiline argument is not passed or is null. + Fixed open_basedir bypasses in Imagick::newPseudoImage + Fixed "Undefined Exception" error messages NOTE: Using threaded SAPI in Windows is not currently recommended. 2.0.0b2 + Fixed open_basedir bypasses. + Fixed PECL Bug #11328 + Added methods: - Imagick::queryFonts() - Imagick::queryFontMetrics() NOTE: Using threaded SAPI in Windows is not currently recommended. 2.0.0b1 - fix PECL bug #10967 - supplied path fails to compile - Added new methods + Imagick::displayImage() + Imagick::displayImages() + Imagick::cropThumbnailImage() + Imagick::roundCorners() + Imagick::polaroidImage() + Imagick::getImageProperty() + Imagick::setImageProperty() + Imagick::newPseudoImage() + Imagick::__toString() + ImagickPixel::setColorCount() - Added missing DisposeType constants. - Merged ImagickPixel::getColorAsString and ImagickPixel::getColorAsNormalizedString into ImagickPixel::getColor( [bool normalized] ) - Fixed wrong exception type in Imagick::setSamplingFactors - Removed useless check from ImagickPixelIterator::syncIterator - Renamed ImagickDraw::pushDrawingWand to ImagickDraw::push - Renamed ImagickDraw::popDrawingWand to ImagickDraw::pop 2.0.0a3 - Removed support for ImagickPixelIterator if compiled against older version of ImageMagick (below 6.2.8) - Fixed a lot of functions which were not present in older ImageMagick versions. (below 6.2.8) - Added support for passing color name as parameter for ImagickPixel constructor - Added support for passing a filename or an array of filenames to Imagick constructor - Fixed anomalies with ImagickPixelIterator exceptions - Fixed a possible segfault in Imagick::appendImages - Fixed double-free errors in some Imagick methods - Added composite operator constants. - Fixed ImagickPixelIterator::__construct to accept Imagick object as parameter. + Some of the changes are a bit experimental so please report bugs. 2.0.0a2 - Fixed segfaults in ImagickDraw::getFont(), ImagickDraw::getFontFamily(), ImagickDraw::getTextEncoding() and ImagickDraw::getClipPath() - Added a PHP version check to config.m4 2.0.0a1 - Initial Release 0.9.13 - Fixed compile error with newer versions of GraphicsMagick and ImageMagick - Fixed assertion when using imagick_setfillcolor - Fixed segfault when an empty blob is loaded - Use new API for fetching support image formats / fonts 0.9.11 - Fix some segfaults on errors (by Andrei Nigmatulin) - EXPERIMENTAL support for ImageMagick >= 6.0.0 (hint by Stanislav Yadykin). Please report successes or failures. 0.9.10 - A ./configure change release only. - Changed config.m4 for checking for correct ImageMagick Version. ImageMagick >= 5.5.3 and < 6.6.0 or GraphicsMagick >= 1.0.0 are needed. - ImageMagick >= 6.0.0 does not work currently. Patches are welcome ;) 0.9.9 - added function imagick_set_image_comment() for setting the comment attribute of an image. - function imagick_setcompressiontype() was not setting the correct structure. This was identified and tested by Sergio Salvatore (sergio@cucinalogica.com). - added function imagick_transparent() for setting a particular color to be transparent within an image. - changed how certain errors are handled in _php_imagick_is_error() to be less restrictive. This apparently helps fix issues with certain types of images that otherwise appear corrupt. Thanks to Hien Duy Nguyenxi (hdn@umich.edu) for finding this, recommending the change and testing it. - added imagick_set_image_quality() for manipulating the quality of the resultant image. - added examples/set_image_quality.php for testing the imagick_set_image_quality() function. Thanks to Derrick DeLoreno Threatt (dthreatt@digitalcreations.net) for bringing up the need for this function and testing it. 0.9.8 - fixed critical error in call to strlen() in _php_imagick_set_last_error(). I strongly recommend you upgrade. 0.9.7 - fixed bug in imagick_free() that would cause it to SEGFAULT everytime it's called. - fixed to work with versions of ImageMagick >= 5.5.7 - special thanks to James Huston (hustonjs@itadevelopment.com) for helping make this happen. - test compiled against ImageMagick 5.5.3, 5.5.6 and 5.5.7 with success. - test compiled against GraphicsMagick 1.0.1 with success. 0.9.6 - functions added: imagick_getcolorspace() imagick_error() - added a new example called transparent_1x1.html and some explanatory text. I can think of many uses for this code. - thanks to James Huston (hustonjs@itadevelopment.com) for suggesting imagick_getcolorspace() and testing it out. - added GraphicsMagick (http://www.graphicsmagick.org) support to configure script (enable it with --with-imagick-gm) - imagick_readimage() now returns false if ImageMagick ReadImage() fails. - imagick_error() returns 1 string representing any errors that have occurred on an operation. IT IS LARGELY UNTESTED! Beware! However, you can now do things like: $handle = imagick_readimage( "image.jpg" ) or die( imagick_error() ) ; - fixed configure script. It honours now values returned by Magick-config. 0.9.5 - functions added: imagick_newimagelist() imagick_pushlist() imagick_poplist() imagick_mosaic() imagick_setcompressiontype() imagick_setcompressionquality() - modified how all functions check to see if ImageMagick has been initialized. - added a number of new examples for demonstrating how to use image lists. - fixed bugs in _php_imagick_alloc_handle() and _php_imagick_clear_errors() causing core dump when working with image lists. I wasn't checking to make sure the structures I was examining were allocated. - thanks to James Huston (hustonjs@itadevelopment.com) for suggesting imagick_setcompressiontype() and imagick_setcompressionquality() and testing them. - added supporting IMAGICK_COMPRESSION_* constants for use with imagick_setcompressiontype(). - renamed imagick_setcompression() to imagick_setcompressiontype(). (note: this was done before the new version was released so no users should be impacted.) 0.9.4 - functions added: imagick_flatten() imagick_getmagick() imagick_setfillopacity() - fixed bad code in these functions: imagick_despeckle() imagick_edge() imagick_emboss() imagick_enhance() imagick_gaussianblur() imagick_medianfilter() imagick_motionblur() imagick_reducenoise() imagick_shade() imagick_sharpen() imagick_spread() imagick_unsharpmask() - for the above functions, if call to corresponding ImageMagick function the module would probably core dump. If it didn't the results would be really buddy and weird. - setfillopacity() thanks to Allen Condit, condit@isri.unlv.edu. 0.9.3 - functions added: imagick_zoom() - the difference between imagick_zoom() and imagick_resize() is that zoom applies the blur and filter that are defined by the image. It is a much simpler way of resizing an image. - added imagick.dsp and modifications for compiling under Windows. - changed all instances of le_handle to le_imagick_handle to avoid future conflicts. 0.9.2 - functions added: imagick_profile() - created IMAGICK_PROFILE_* to support imagick_profile(). - this release is significant because of the issue with Microsoft IE where the image's profile causes the browser to not properly render images (you only get red X's). See this posting: http://studio.imagemagick.org/pipermail/magick-users/2002-September/005072.html - added this filter IMAGICK_FILTER_UNKNOWN. If the user specifies this filter to imagick_resize(), the resize function will take whatever filter is defined by the image. - modified imagick_resize() to take 6th optional parameter that is the modifier to the geometry to facility building geometries such as 800x600+200+200! or 450x230>. - modified imagick_scale() to take 4th optional parameter that is the modifier to the geometry to facility building geometries such as 800x600+200+200! or 450x230>. - modified imagick_sample() to take 4th optional parameter that is the modifier to the geometry to facility building geometries such as 800x600+200+200! or 450x230>. 0.9.1 - functions added: imagick_chop() imagick_crop() imagick_flip() imagick_flop() imagick_roll() imagick_getimagedepth() imagick_getnumbercolors() imagick_isgrayimage() imagick_ismonochromeimage() imagick_isopaqueimage() imagick_ispaletteimage() imagick_ordereddither() imagick_composite() - Added IMAGICK_COMPOSITE_OP_* for use with imagick_composite(). 0.9.0.1 IMPORTANT!!! This release breaks Backwards Compatibility with the 0.1.x series of ext/imagick. read the examples for more information (in $doc_dir/imagick/examples). Big Credits go to Michael C. Montero, who wrote the whole extension from scratch. Without him, we would still be at 0.1.x. He will be the future lead for this package (as soon as he has an account on pear). 0.2-0.5 were never released within PEAR. version 0.9.0.1: - more appropriate changelog/notes, no changes in code. version 0.9: - functions added: imagick_next() imagick_prev() imagick_first() imagick_goto() imagick_getlistsize() imagick_getlistindex() imagick_getimagefromlist() imagick_blob2image() imagick_reducenoise() imagick_shade() imagick_sharpen() imagick_spread() imagick_threshold() imagick_unsharpmask() - cut over deprecation reporting to a more standized and easier to use method - cut over all php_error calls to standard method - added Christian's code to info function for displaying a list of supported image formats - rewrote all code to use proper parameter parsing function - fixed minor issue with a number of example files; was nothing critical version: 0.5a - functions added: imagick_getcanvas() imagick_blur() imagick_despeckle() imagick_edge() imagick_emboss() imagick_enhance() imagick_gaussianblur() imagick_medianfilter() imagick_motionblur() - one major change - renamed everything to imagick*; I've joined my efforts with Christian Stocker who had a previously written but smaller extension - magick_getcanvas() allows you to create a blank image to draw on - changed comment header in imagick.h to match the one in imagick.c - added Christian Stocker to credits - moved over to Christian Stocker's config.m4, removed the need for gen_configm4 - rewrote INSTALL to reflect new config.m4 - slight modifications to config.m4 to get it to work properly - added package.xml - removed ChangeLog, everything is now in package.xml - removed imagick_free_reason() and imagick_free_description() since they are no longer necessary - preceded all internal functions with _php_ - created imagick_read() for backward compatibility with old extension - created imagick_write() for backward compatibility with old extension version 0.4a - functions added: magick_writeimages() magick_destroyhandle() magick_image2blob() magick_drawarc() magick_drawcircle() magick_drawpoint() magick_border() magick_frame() magick_raise() magick_getwidth() magick_getheight() magick_getmimetype() magick_setfillcolor() magick_setfontface() magick_charcoal() magick_implode() magick_oilpaint() magick_solarize() magick_swirl() magick_wave() - more preparation for image lists - fixed incorrect comments in some examples - fixed incorrect calls to magick_failedreason() and magick_faileddescription() in most examples - a number of examples weren't exiting properly on errors, that's been fixed - phpinfo() now displays available font family and font names - coolest function so far: magick_oilpaint(). The output is awesome! - added MaxRGB to phpinfo() section version 0.2a - functions added: magick_rotate() magick_shear() magick_contrast() magick_equalize() magick_gamma() magick_level() magick_modulate() magick_negate() magick_normalize() magick_drawellipse() - slight changes to output of gen_configm4 - fixed comments in all examples after the initial magick_readimage(), they were wrong - fixed all examples so they exit properly on errors - fixed all examples so they work as either standalone script or web page; they do better output as well - fixed output of magick info. when calling phpinfo() - more commenting - significantly better error handling 0.9 IMPORTANT!!! This release breaks BC with the 0.1.x series of ext/imagick. read the examples for more information (in $doc_dir/imagick/examples) 0.2-0.5 were never released within PEAR. - functions added: imagick_next() imagick_prev() imagick_first() imagick_goto() imagick_getlistsize() imagick_getlistindex() imagick_getimagefromlist() imagick_blob2image() imagick_reducenoise() imagick_shade() imagick_sharpen() imagick_spread() imagick_threshold() imagick_unsharpmask() - cut over deprecation reporting to a more standized and easier to use method - cut over all php_error calls to standard method - added Christian's code to info function for displaying a list of supported image formats - rewrote all code to use proper parameter parsing function - fixed minor issue with a number of example files; was nothing critical 0.1.2 - Added imagick_border(). (pierre-alain joye) - Fixed return of annotate and rotate (true on success). (pierre-alain joye) 0.1.1 - Make it compatible with ImageMagick 5.4.5 (and this is also the needed version now) - adjust package.xml to the new "pear build" command imagick-3.6.0/LICENSE0000644000000000000000000000622214145213432012630 0ustar rootroot-------------------------------------------------------------------- The PHP License, version 3.01 Copyright (c) 1999 - 2011 The PHP Group. All rights reserved. -------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, is permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name "PHP" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact group@php.net. 4. Products derived from this software may not be called "PHP", nor may "PHP" appear in their name, without prior written permission from group@php.net. You may indicate that your software works in conjunction with PHP by saying "Foo for PHP" instead of calling it "PHP Foo" or "phpfoo" 5. The PHP Group may publish revised and/or new versions of the license from time to time. Each version will be given a distinguishing version number. Once covered code has been published under a particular version of the license, you may always continue to use it under the terms of that version. You may also choose to use such covered code under the terms of any subsequent version of the license published by the PHP Group. No one other than the PHP Group has the right to modify the terms applicable to covered code created under this License. 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes PHP software, freely available from ". THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- This software consists of voluntary contributions made by many individuals on behalf of the PHP Group. The PHP Group can be contacted via Email at group@php.net. For more information on the PHP Group and the PHP project, please see . PHP includes the Zend Engine, freely available at .