Exemplo n.º 1
0
<?php

require "miniImage/miniImage.php";
// header("Content-type: image/png");
$miniImage = new MiniImage\MiniImage(["path" => "images"]);
$append = "data:image/png;base64,";
$image = $append . base64_encode(file_get_contents("images/mario.png"));
$info = $miniImage->create(["base64" => $image, "size" => [200], "save" => ["dir" => "images", "name" => "unique"]]);
var_export($info);
Exemplo n.º 2
0
<?php

require "miniImage/miniImage.php";
$MiniImage = new MiniImage\MiniImage(["path" => "images"]);
$perfil_facebook = "https://scontent-mia1-1.xx.fbcdn.net/hphotos-xtp1/v/t1.0-9/11391150_10206547629790255_4725550947577463650_n.jpg?oh=6cbfa7c10771fc868086c41428101ec3&oe=56DB638B";
$MiniImage->create(["url" => $perfil_facebook, "size" => [200, 200, "cover"], "out" => "png"]);