<?php
$file = '/var/www/examples/small.png';
$size = getimagesize($file);
$im = imagecreatefrompng($file);
$imf = imagecreatetruecolor($size[0]*10,$size[1]*10);
imagealphablending($imf, false);
imagesavealpha($imf, true);
imagecopyresampled($imf, $im, 0,0,0,0, $size[0]*10,$size[1]*10,$size[0],$size[1]);
imagePng($imf, '/tmp/image.png');ctrl + c| /var/www/examples/small.pngpath to image to scale up | getimagesizereturns image size from given path | 
| imagecreatefrompngcreates GD image object from given PNG image | imagecreatetruecolorcreates true color GD image object with specified width & height | 
| imagealphablendingwe're disabling alpha blending to prevent transparent background being converted to black color | imagesavealphawe're enabling alpha channel (controls transparency) for resulting image | 
| imagecopyresampledresizes source image and writes result to destination image | imagePngsaves image in PNG format to the given path | 
Usage example
<?php
$file = '/var/www/examples/small.png';
$size = getimagesize($file);
$im = imagecreatefrompng($file);
$imf = imagecreatetruecolor($size[0]*10,$size[1]*10);
imagealphablending($imf, false);
imagesavealpha($imf, true);
imagecopyresampled($imf, $im, 0,0,0,0, $size[0]*10,$size[1]*10,$size[0],$size[1]);
imagePng($imf, '/tmp/image.png');