|
Posted by Mohawk Mawk on 05/05/07 12:30
Hey guys...
I have a image string I want to read with exif_read_data() but
exif_read_data() does not read strings, only files.
i can display the picture via php
Header( "Content-type: image/jpg"); echo $string;
save it manually and then read the meta data like this
function EXIFALL($img){
$exif = exif_read_data($img, 0, true);
echo "myimage.jpg:<br />\n";
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<br />\n";
}}return;}
(code from http://th.php.net/manual/en/function.exif-read-data.php)
and it will read out the meta data like i want it.
but i would like to read the meta data from the string without my
interaction!
so I tried this
imagejpeg(imagecreatefromstring($string),'temp.jpg');
EXIFALL('temp.jpg');
unlink ('temp.jpg');
witch creates a temporary.jpg reads it and then deletes it.
but the function imagejpeg() replaces the important meta data from my
original image that i want to read.
what should i do?
thanks for your help
Navigation:
[Reply to this message]
|