略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: 范例

2024-11-14

范例

The following shows some common Gmagick image operations.

示例 #1 Gmagick Example

<?php
//Instantiate a new Gmagick object
$image = new Gmagick('example.jpg');

//Make thumbnail from image loaded. 0 for either axes preserves aspect ratio
$image->thumbnailimage(1000);

//Create a border around the image, then simulate how the image will look like as an oil painting
//Notice the chaining of mutator methods which is supported in gmagick
$image->borderimage("yellow"88)->oilpaintimage(0.3);

//Write the current image at the current state to a file
$image->write('example_thumbnail.jpg');
?>
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/gmagick.examples.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3