示例#1
0
<?php

/**
 * Simple thumbnails
 */
// Require autoload
require '../../vendor/autoload.php';
// Image to load
$image = dirname(dirname(__FILE__)) . '/assets/images/nature.jpg';
// Create thumb and dump
\Borla\Thumb\Thumb::create($image, array('width' => 200, 'height' => 160))->dump();
示例#2
0
<?php

/**
 * Simple thumbnails
 */
// Require autoload
require '../../vendor/autoload.php';
// Image to load
$image = dirname(dirname(__FILE__)) . '/assets/images/logo.png';
// Create thumb and dump
\Borla\Thumb\Thumb::create($image, array('width' => 90, 'height' => 20, 'type' => 'png', 'background' => '#aa0000'))->dump();
示例#3
0
<?php

/**
 * Simple thumbnails
 */
// Require autoload
require '../../vendor/autoload.php';
// Image to load
$image = dirname(dirname(__FILE__)) . '/assets/images/logo.png';
// Create thumb and dump
\Borla\Thumb\Thumb::create($image, array('width' => 90, 'height' => 20, 'type' => 'png'))->dump();