Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Get EXIF data function
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 04 January 2008 :  03:48:27  Show Profile  Visit MarcelG's Homepage
I'm looking for a method to retrieve and display certain EXIF information of a (remote) photo in HTML, below or beside that same picture.
I don't want the webserver to have to retrieve the picture entirely (to preserve bandwidth), and preferably I want the client to do it themselves (using clientside javascript for example).

Does anyone just coincidentally happen to know how to achieve this?

I imagine it to work like this:
<img src="http://othersite.com/image.jpg">
<a href="#" onclick="getExif(http://othersite.com/image.jpg)">show exif info</a>

with this as a result (before clicked)

show exif.
and this after being clicked:

ISO200, f2.8, 1/60th, 35mm, Pentax K100D, Sigma 17-70 2.8-4.5 DX

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 04 January 2008 03:57:26

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 04 January 2008 :  05:17:02  Show Profile  Visit HuwR's Homepage
Client-side javascript cannot do that as the browser object models do
not expose the data contained in image files loaded into Image objects
or IMG elements.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 04 January 2008 :  06:42:41  Show Profile  Visit MarcelG's Homepage
Grmbl....I reckoned that too already, but I did however find a fully client-side javascript based FireFox plugin that does the trick : http://ted.mielczarek.org/code/mozilla/fxif
I've mailed the author of that plugin if he thinks it could be turned in to a webified javascript.

An other method would be to perform a serverside http-request to the image, retrieving only the EXIF info from the target URL, but the solutions I found for that are all perl and python....e.g. jibberish to me.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 04 January 2008 :  07:31:04  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Python isn't that bad. If you can understand Javascript you should have no problem. Servage is supposed to support python as far as I can remember.

I would have thought that there was something available in php though.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 04 January 2008 :  07:39:26  Show Profile  Visit HuwR's Homepage
quote:
Python isn't that bad. If you can understand Javascript you should have no problem

agreed, Python is a fairly easy scripting language to get to grips with.
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 04 January 2008 :  08:31:17  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
There's a php snippet on this page. Looks pretty easy to do - http://vb-forum.com/showthread.php?t=412811


Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 04 January 2008 :  09:51:41  Show Profile  Visit HuwR's Homepage
I think you may still run into issues trying to read the exif data from a remote rather than a local file
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 04 January 2008 :  10:25:12  Show Profile  Visit MarcelG's Homepage
Podge, I saw that one too, but the problem is that I want to integrate it with the forum, so show the exif info in the post, next to the image.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 04 January 2008 :  10:38:12  Show Profile  Visit HuwR's Homepage
you could still use php to do that as you could drop it into an iframe.
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 04 January 2008 :  11:39:55  Show Profile  Send pdrg a Yahoo! Message
You can use a server-side COM component in ASP - I know some of them support exif http://www.componentsource.com/relevance/activex-components/index.html?q=exif
(there may be free ones as well)
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 04 January 2008 :  12:07:40  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
If you have dotnet available on your webserver you could use this - http://www.dotnet247.com/247reference/msgs/28/144569.aspx

It has a C# class and an example of how to use it on a local file. In order to integrate it into the forum you could try using something along the lines of Ajax though a better idea would be to alter the [img] function to output the exif info by calling your aspx page i.e. http://www.oxle.com/exif.aspx?url=http://othersite.com/image.jpg

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 04 January 2008 :  14:56:00  Show Profile  Visit MarcelG's Homepage
quote:
Originally posted by HuwR

you could still use php to do that as you could drop it into an iframe.
Realized that exact same thing when driving home! An iframe in a DIV, hovering over the content, loading the EXIF data via my other site (storage.oxle.com, which has GD and EXIF components, plus PHP installed).
I'll start working on that.

Podge, I've been reading it with interest, and it looks promising...but I know way too little about .NET to understand it...sorry.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07