blob: f0187b5965641a637b850b05b78c2240d3005819 (
plain) (
tree)
|
|
<?php
$image = imagecreatefrompng($_POST['image']);
$id = uniqid();
imagealphablending($image, false);
imagesavealpha($image, true);
imagepng($image, 'uploads/wPaint-' . $id . '.png');
// return image path
echo '{"img": "/test/uploads/wPaint-' . $id . '.png"}';
|