9951 explained code solutions for 126 technologies


php-gdHow to open PNG image


$file = '/var/www/examples/heroine.png';
$im = imagecreatefrompng($file);

# ...ctrl + c
$file

path of an image to open

imagecreatefrompng

creates GD image object from given PNG image

$im

image resource to manipulate using GD lib