Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 04-26-2007, 11:28 PM
artneilson's Avatar
artneilson Offline
forum loafer
 
Join Date: Apr 2007
Posts: 7
exif_data

Is there any doc on the layout of the pixelpost table exif_info column?

I am using an exif perl script I got here:

http://www.scss.com.au/family/andrew/camera/exif/

currently to update the datetime column in the pixelpost table.

I wrote a perl script which calls the routines in Andrew Gregory's
perl exif module and it writes the filename and timestamp from
the exif data to an output file then transfer that to the webserver.

Then on my webserver I read that file and match the filenames
in the datafile with the filename in the image column and update
the datetime field with the exif time in the input datafile.

My camera, an Olympus Stylus 770SW is unsupported by Exif1_5
in PixelPost 1.6 hence I have to do these extreme maneuvers to get
the exif data into pixelpost.

I would like to update the exif_info field as well, since I can fetch
other info via Andrew Gregory's exif code such as shutter speed,
flash, aperture et cetera.

Where can I find info on how the exif_info field is laid out???
Reply With Quote
  #2  
Old 04-27-2007, 05:39 AM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
The exif in the database is a serialized array, this means we used a PHP function called 'serialize' to save the data. Before using it again we have to 'unserialize' it.

So you have the array 'exif' with a lot of keys (e.g. shutterspeed) and the corresponding value. If you would like to use another exif routine it is best to use the same keys we use now. This will make the replacements in the template easier.

The best way is to extract the exif info by using php and a database query and do a print_r after you unserialize it. Or I can send an ascii file with a typical array layout for exif. Or a nice addon wich shows the layout.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #3  
Old 04-27-2007, 06:01 PM
artneilson's Avatar
artneilson Offline
forum loafer
 
Join Date: Apr 2007
Posts: 7
I'm updating the exif_info field using perl DBI directly. Looks like the array
starts off a:12:{ where 12 is the total number of elements in the array.

Then a bunch of key, value pairs prefixed by type and length,
s:13:"VerboseOutput";s:1:"0" for example where s:13 is string 13
long specifying the length of "VerboseOutput" and s:1:"0" the
VerboseOutput value as string 1 long value "0".

Does it matter what order I use for the the keys when I put them into
exif_info? It looks like the MakerNote is always last, at least the
way exifer does it ... s:17:"DataDumpMakerNote";s:0:"";} with the
terminating curly } signifying the end of the list.

I tested updating the exif_info as described above and it seems
to work, replace_exif_tags is populating the EXIF template variables
as expected.

Is there anything I need to watch our for with the code?
Are you guys planning of sticking with Exifer for a while or
is there something else in the works??
Reply With Quote
  #4  
Old 04-27-2007, 09:28 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Something else is in the make. This will be in 1.7 or even 2.0. This depends on how fast I can code.

You can edit the serialized info, like you describe. It would be better to unserialize it and edit the array and then serialize it again before saving it to the db
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 07:17 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs