Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP reading extra file info...

Shawn Wilson
Guest
 
Posts: n/a
#1: Aug 18 '05
I am an ameture digital photographer (along with a newbie developer) and
I've an album of my pictures online. I've been building this album to be
just how I want it and I've come to one last feature that I can't figure
out.

How do I read the extra file info from a .jpg image file (or any other file
for that matter)?

Each one of my pictures has 10 or 20 things included in the file like the
Camera model, f-stop used, etc... and I want to be able to parse that out
and show it on screen.

Is that possible with PHP?

Thanks!

-----------------
Shawn Wilson



Janwillem Borleffs
Guest
 
Posts: n/a
#2: Aug 18 '05

re: PHP reading extra file info...


Shawn Wilson wrote:[color=blue]
> How do I read the extra file info from a .jpg image file (or any
> other file for that matter)?
>[/color]

For pictures from digital camera's, you can use the exif functions:

http://www.php.net/exif


JW



Andy Hassall
Guest
 
Posts: n/a
#3: Aug 18 '05

re: PHP reading extra file info...


On Thu, 18 Aug 2005 23:26:27 +0200, "Janwillem Borleffs" <jw@jwscripts.com>
wrote:
[color=blue]
>Shawn Wilson wrote:[color=green]
>> How do I read the extra file info from a .jpg image file (or any
>> other file for that matter)?
>>[/color]
>
>For pictures from digital camera's, you can use the exif functions:
>
>http://www.php.net/exif[/color]

See also: http://pel.sourceforge.net/

... which is a pure PHP implementation of EXIF, useful if you're on shared
hosting that won't modify the config.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Shawn Wilson
Guest
 
Posts: n/a
#4: Aug 18 '05

re: PHP reading extra file info...


I don't have PHP5 on my server yet... and being that it's not MY server
(shared leased multi-domain hosting) I'm not sure if I can get them to
switch up.

-----------
Shawn Wilson


"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:thv9g1pqu4efdl2sttlknnh9mcc4gjib67@4ax.com...[color=blue]
> On Thu, 18 Aug 2005 23:26:27 +0200, "Janwillem Borleffs"
> <jw@jwscripts.com>
> wrote:
>[color=green]
>>Shawn Wilson wrote:[color=darkred]
>>> How do I read the extra file info from a .jpg image file (or any
>>> other file for that matter)?
>>>[/color]
>>
>>For pictures from digital camera's, you can use the exif functions:
>>
>>http://www.php.net/exif[/color]
>
> See also: http://pel.sourceforge.net/
>
> ... which is a pure PHP implementation of EXIF, useful if you're on shared
> hosting that won't modify the config.
>
> --
> Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool[/color]


Shawn Wilson
Guest
 
Posts: n/a
#5: Aug 19 '05

re: PHP reading extra file info...


Perfect... I had to ask for PHP to be recompiled with the EXIF option
though, but they did it in an hour. Sometimes I just love my leased server
company...

I added EXIF functions to my album site and viola! I have camera settings
displayed with all my pictures.

I did find it strange to see the actual EXIF info though... like focal
length was actually stored as 55/1 for 55mm and f-stop was stored as 45/10
for f/4.5. An older camera I have pictures from actually stores the focal
length wrong... storing 55mm as 550/100.

Strange to work with, but I've got it working.

Anyone who'd care to see it in action, feel free:
http://www.dvigroup.net/album

Feel free to browse the album, of if you just care to see just one
picture... I like this one:

http://www.dvigroup.net/album/detail...c=02920003.jpg


-------------
Shawn Wilson

"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:4304fd00$0$64824$dbd49001@news.euronet.nl...[color=blue]
> Shawn Wilson wrote:[color=green]
>> How do I read the extra file info from a .jpg image file (or any
>> other file for that matter)?
>>[/color]
>
> For pictures from digital camera's, you can use the exif functions:
>
> http://www.php.net/exif
>
>
> JW
>
>
>[/color]


eraseit@gmail.com
Guest
 
Posts: n/a
#6: Aug 22 '05

re: PHP reading extra file info...


http://us2.php.net/exif_read_data

Shawn Wilson wrote:[color=blue]
> I am an ameture digital photographer (along with a newbie developer) and
> I've an album of my pictures online. I've been building this album to be
> just how I want it and I've come to one last feature that I can't figure
> out.
>
> How do I read the extra file info from a .jpg image file (or any other file
> for that matter)?
>
> Each one of my pictures has 10 or 20 things included in the file like the
> Camera model, f-stop used, etc... and I want to be able to parse that out
> and show it on screen.
>
> Is that possible with PHP?
>
> Thanks!
>
> -----------------
> Shawn Wilson[/color]

Closed Thread