EXIFIER - SONY/Minolta Lens Type

linuxq

Joined: 2009-02-03
Posts: 5
Posted: Tue, 2009-02-03 11:15

Hi,

I`ve been using Gallery2 for some weeks and want to add Sony/Minolta Lens ID-Support for the Exifier Module. Im am interested in which Lens I did use for which Photo and want to make im conventient :-)

First I tried a modification for Canon http://gallery.menalto.com/node/75321 and tried with a Canon Image of a friend. It works great for Canon.

I know that the information is in the maker tags of sony as an integer (i32u) and I found a table to relate the integer to "plan text": http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Sony.html

I did never write php-scripts but i am familiar with Basic, Pascal and a bit C++ thus the basics of code writing are there for me. Anything else I need to know, I will probably find out.

First step: (I guess)

I modified /gallery/modules/exif/lib/exifer/exif.inc as you can see below:

Quote:
#
if(eregi("NIKON",$make)) {
#
require_once(dirname(__FILE__) . '/makers/nikon.inc');
#
parseNikon($data,$result);
#
$result[$ifd_name]['KnownMaker'] = 1;
#
} else if(eregi("OLYMPUS",$make)) {
#
require_once(dirname(__FILE__) . '/makers/olympus.inc');
#
parseOlympus($data,$result,$seek,$globalOffset);
#
$result[$ifd_name]['KnownMaker'] = 1;
#
} else if(eregi("Canon",$make)) {
#
require_once(dirname(__FILE__) . '/makers/canon.inc');
#
parseCanon($data,$result,$seek,$globalOffset);
#
$result[$ifd_name]['KnownMaker'] = 1;
#
} else if(eregi("SONY",$make)) {
#
require_once(dirname(__FILE__) . '/makers/sony.inc');
#
parseSony($data,$result,$seek,$globalOffset);
#
$result[$ifd_name]['KnownMaker'] = 1;
#

} else if(eregi("FUJIFILM",$make)) {
.....

Now I should be able to write a /gallery/modules/exif/lib/exifer/makers/sony.inc and try it! Or am I wrong?

Did anyone ever try this?

Thanks in advance!

Marcel (LinuxQ)

 
linuxq

Joined: 2009-02-03
Posts: 5
Posted: Thu, 2009-02-05 07:39

Hi tried the following yesterday. Just to test if my thoughts are right I did:

- Took a Canon-Image and changed the maker into "SONY" using ExifTool. Leaving all the other Information as it is.
- I simply copied "canon.inc" into "sony.inc"

The result is, that when uploading is done, the browser shows a white page and stop. Nothing is uploaded.

What is the problem?

Thanks in Advance.

LinuxQ

 
linuxq

Joined: 2009-02-03
Posts: 5
Posted: Thu, 2009-02-05 09:33

OK, I didn`t change the names of the functions. Now at least it imports the picture right including the canon maker tags.

Lets see what i can do else.

 
mridgwel

Joined: 2007-01-27
Posts: 215
Posted: Wed, 2009-02-11 20:35

There is an update (V1.7) of the exifier library, now part of ZenPhoto - G2.3 IIRC uses V1.5:

http://www.zenphoto.org/trac/wiki/ExifixerLibrary

May be an idea to investigating updating the exifier library to 1.7 and submit your Sony file to them when you're happy.
_________
Mark