PHP code example of imanee / imanee

1. Go to this page and download the library: Download imanee/imanee library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

imanee / imanee example snippets


header("Content-type: image/jpg");

$imanee = new Imanee('path/to/my/image.jpg');
echo $imanee->thumbnail(200, 200)->output();


header("Content-type: image/jpg");

$imanee = new Imanee('path/to/my/image.jpg');
echo $imanee->placeText('imanee test', 40, Imanee::IM_POS_MID_CENTER)
            ->output();

header("Content-type: image/jpg");

$imanee = new Imanee('path/to/my/image.jpg');

/** places 4 different png images on the 4 corners of the original image */

echo $imanee->placeImage('img1.png', Imanee::IM_POS_TOP_LEFT)
    ->placeImage('img2.png', Imanee::IM_POS_TOP_RIGHT)
    ->placeImage('img3.png', Imanee::IM_POS_BOTTOM_LEFT)
    ->placeImage('img4.png', Imanee::IM_POS_BOTTOM_RIGHT)
    ->output()
;

$frames[] = 'img01.png';
$frames[] = 'img02.png';
$frames[] = 'img03.png';
$frames[] = 'img04.png';

header("Content-type: image/gif");

echo Imanee::arrayAnimate($frames, 30);

header("Content-type: image/gif");

echo Imanee::globAnimate('resources/*.jpg');

header("Content-type: image/jpg");

$imanee = new Imanee('path/to/my/image.jpg', new GDResource());
echo $imanee->thumbnail(200, 200)->output();