473,396 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PHP reading extra file info...

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
Aug 18 '05 #1
5 1807
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

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


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 / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Aug 18 '05 #3
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" <an**@andyh.co.uk> wrote in message
news:th********************************@4ax.com...
On Thu, 18 Aug 2005 23:26:27 +0200, "Janwillem Borleffs"
<jw@jwscripts.com>
wrote:
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


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 / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

Aug 18 '05 #4
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:43***********************@news.euronet.nl...
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

Aug 19 '05 #5
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


Aug 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: ishmael4 | last post by:
hello everyone! i have a problem with reading from binary file. i was googling and searching, but i just cant understand, why isnt this code working. i could use any help. here's the source code:...
8
by: dbuser | last post by:
Hi, I need help on a problem, as described below. I am reading a file "input.txt"which has data like this: abc def gh izk lmnopq rst uvwxyz I am using fstream object to read the file and...
6
by: The_Kingpin | last post by:
Hi again guys, I've decided to cut my project in section and I found it way easier like this. I'm having a little problem reading struct in a file though. I think after this I'll be able to...
7
by: John Dann | last post by:
I'm trying to read some binary data from a file created by another program. I know the binary file format but can't change or control the format. The binary data is organised such that it should...
1
by: Mr. B | last post by:
VB.net 2003 c/w Framework 1.1 and MS Access db We have a commercial program that does our Acounting and Time Sheets (Timberline). At least once a day our Accounting department runs a Script...
2
by: JoeC | last post by:
I am trying to create a graphic library that read bitmap info from a fil this dosn't seem to worlk, it read in the first two values but dosn't seem to read the graphic data am I doing this wrong? ...
11
by: cdkorzen | last post by:
I'm sorry if this is a rehash, but all I see is the same info. Here's my debacle: I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python, Perl, Cmd files... works fine. ASP can't...
13
by: anant | last post by:
Hi all The below code is reading string and then tokenizin it and reading all the info. But i want to call a csv file and it should then read a string from dt file. So what midification should i...
2
by: nikosk | last post by:
I just spent a whole day trying to read an xml file and I got stuck with the following error: Exception Type: UnicodeEncodeError Exception Value: 'charmap' codec can't encode characters in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.