For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2005 > PHP reading extra file info...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP reading extra file info...
Shawn Wilson

2005-08-18, 5:56 pm

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

2005-08-18, 5:56 pm

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


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

http://www.php.net/exif


JW



Andy Hassall

2005-08-18, 5:56 pm

On Thu, 18 Aug 2005 23:26:27 +0200, "Janwillem Borleffs" <jw@jwscripts.com>
wrote:

>Shawn Wilson wrote:
>
>For pictures from digital camera's, you can use the exif functions:
>
>http://www.php.net/exif


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

2005-08-18, 5:56 pm

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...
> On Thu, 18 Aug 2005 23:26:27 +0200, "Janwillem Borleffs"
> <jw@jwscripts.com>
> wrote:
>
>
> 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

2005-08-19, 4:13 pm

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/detai...ic=02920003.jpg


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

"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:4304fd00$0$64824$dbd49001@news.euronet.nl...
> Shawn Wilson wrote:
>
> For pictures from digital camera's, you can use the exif functions:
>
> http://www.php.net/exif
>
>
> JW
>
>
>



eraseit@gmail.com

2005-08-22, 6:58 pm

http://us2.php.net/exif_read_data

Shawn Wilson wrote:
> 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


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com