Hi.
I try to use PEL (pel.sourceforge.net) to copy some exif information from
orginial camera jpeg to resized copy with php gd library. But without
success:(
1) File is uploaded to server with html upload form.
2) File is testes is it image/jpeg ?
3) If yes:
4) $copy = copy($_FILES['fotofile_'.$nrx]['tmp_name'],$destination_file);
5) if file height or width is too large - it's scaled:
$new_img = imagecreatetruecolor($new_x, $new_y);
$img = imagecreatefromjpeg($destination_file);
$org_x = imagesx($img);
$org_y = imagesy($img);
imagecopyresampled($new_img, $img,0, 0, 0, 0, $new_x, $new_y, $org_x,
$org_y);
imagejpeg($new_img, $destination_file.'_',$zcompression);
unlink(destination_file);
rename($destination_file.'_',$destination_file);
imagedestroy($new_img);
imagedestroy($img);
Now I've got smaller scaled new $destination_file. But it is without any
exif data now.
How to write a few exif information to it ? I need Camera Manufacturer,
Camera Model, Date&Time and ExposureTime, and ApertureFNumber
Of course I know how to read these informations before rescaling (I use
exif_read_data php function). But I cannot wirte them to new image ........
Thanx a lot for help
Tomm