Longhorn PHP 2025 - Call For Papers

Examples

The following shows some common Gmagick image operations.

Example #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(100, 0);

/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", 8, 8)->oilpaintimage(0.3);

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

User Contributed Notes

There are no user contributed notes for this page.
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant