dimanche 12 avril 2015

Crop small file fill with intervention image

Have a way to fill black area of my croped png with transparency, using intervention image?



$data = file_get_contents("php://input");

$img = Image::make($data);

$path = sprintf("%/data/%s/img",public_path(),Auth::user()->account_id);

@mkdir($path,0775,true);

$img->crop(350, 150)->encode('png', 90)->save(sprintf("%s/logo.png",$path));


Original


Croped image


Aucun commentaire:

Enregistrer un commentaire