Is there any way to add Copyright info to the image file created by PHP
?
To be clearer, you can add copyright
info to a file with photoshop, so when you get its properties
, you see something similar to:
I want to Add/Edit Details info of a file in php. Is is possible?
EDIT:
I get an image from user input, then resize it with this function:
function image_resize($src, $w, $h, $dst, $width, $height, $extension )
{
switch($extension){
case 'bmp': $img = imagecreatefromwbmp($src); break;
case 'gif': $img = imagecreatefromgif($src); break;
case 'jpg': $img = imagecreatefromjpeg($src); break;
case 'png': $img = imagecreatefrompng($src); break;
default : return "Unsupported picture type!";
}
$new = imagecreatetruecolor($width, $height);
// preserve transparency
if($extension == "gif" or $extension == "png"){
imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));
imagealphablending($new, true);
imagesavealpha($new, false);
}
imagecopyresampled($new, $img, 0, 0, 0, 0, $width, $height, $w, $h);
imageinterlace($new,1);//for progressive jpeg image
switch($extension){
case 'bmp': imagewbmp($new, $dst); break;
case 'gif': imagegif($new, $dst); break;
case 'jpg': imagejpeg($new, $dst); break;
case 'png': imagepng($new, $dst); break;
}
return true;
}