Displaying EXIF-Thumbnails?
Displaying EXIF-Thumbnails?
am 02.12.2007 21:20:08 von Udo Pecher
In order to preview fotos I tried to read out the exif-pictures.
$exif_picture = exif_thumbnail($picture, $width, $height, $typ);
print("exif_width=" . $width);
print("exif_height=" . $height);
Here the width and height are printed correctly. But the following code
lines do not succeed:
header('Content-type: ' . image_type_to_mime_type($typ));
echo $exif_picture;
i.e. no picture is shown. Moreower the header-statement leads to the error
Cannot modify header information - headers already sent by (output started
at /home/www/webxyz/html/ausstellung_nav.php:6) in
/home/www/webxyz/html/ausstellung_nav.php on line 40
This error may be avoided when placing the header-statement just at the top
of the php-file. But even then thumbnails are not shown. Instead a lot of
letters are filling the screen.
Thanks for any help out
bahncompany.de
Udo Pecher
Re: Displaying EXIF-Thumbnails?
am 02.12.2007 21:25:23 von Jerry Stuckle
Udo Pecher wrote:
> In order to preview fotos I tried to read out the exif-pictures.
>
> $exif_picture = exif_thumbnail($picture, $width, $height, $typ);
> print("exif_width=" . $width);
> print("exif_height=" . $height);
>
> Here the width and height are printed correctly. But the following code
> lines do not succeed:
>
> header('Content-type: ' . image_type_to_mime_type($typ));
> echo $exif_picture;
>
> i.e. no picture is shown. Moreower the header-statement leads to the error
>
> Cannot modify header information - headers already sent by (output started
> at /home/www/webxyz/html/ausstellung_nav.php:6) in
> /home/www/webxyz/html/ausstellung_nav.php on line 40
>
>
> This error may be avoided when placing the header-statement just at the top
> of the php-file. But even then thumbnails are not shown. Instead a lot of
> letters are filling the screen.
>
>
> Thanks for any help out
> bahncompany.de
> Udo Pecher
>
>
You can send html or one image from a file - nothing more. HTTP
protocol doesn't allow it.
You need to call the image generator page with an img statement, i.e.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Displaying EXIF-Thumbnails?
am 02.12.2007 22:36:17 von Udo Pecher
Hallo Jerry
> You can send html or one image from a file - nothing more. HTTP protocol
> doesn't allow it.
>
> You need to call the image generator page with an img statement, i.e.
>
>
>
E.g. I applied
$exif_picture = exif_thumbnail(www.bahncompany.de/path/datei.jpg, $width,
$height, $typ);
echo "";
More precisely questioned: is the $exif_picture only a boolean variable? How
the small EXIF-image is extracted from a jpg-file?
Udo Pecher
Re: Displaying EXIF-Thumbnails?
am 03.12.2007 01:20:48 von Jerry Stuckle
Udo Pecher wrote:
> Hallo Jerry
>> You can send html or one image from a file - nothing more. HTTP protocol
>> doesn't allow it.
>>
>> You need to call the image generator page with an img statement, i.e.
>>
>>
>>
>
>
> E.g. I applied
>
> $exif_picture = exif_thumbnail(www.bahncompany.de/path/datei.jpg, $width,
> $height, $typ);
>
> echo "";
>
> More precisely questioned: is the $exif_picture only a boolean variable? How
> the small EXIF-image is extracted from a jpg-file?
>
> Udo Pecher
>
>
>
Read my comments again.
You are trying to download both html and an image in the same file.
HTTP does not allow this.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Displaying EXIF-Thumbnails?
am 03.12.2007 22:41:20 von Udo Pecher
Hi Jerry,
> Read my comments again.
>
Thank you for the advice! Bahncompany.de now runs with EXIF-thumbnails.
Udo Pecher