There is no function exif_read_data() as called in theme_acidfree_exif_data().

What are your plans for implementing it?

I've included a php file for reading exif data that coppermine gallery uses and is quite simple. Also included is a file that shows how coppermine uses it.

Comments

vhmauery’s picture

Status: Active » Closed (fixed)

exif_read_data is part of the php language: http://php.net/exif_read_data

If it is not defined for you, you need to rebuild or reconfigure php.

jaredwiltshire’s picture

Title: exif_read_data() missing » Read Exif using pure PHP
Status: Closed (fixed) » Needs review
StatusFileSize
new49 KB

The server I use doesnt have exif support enabled, so created this patch that checks if exif_read_data() exists and if not it uses a pure php Exif library implementation that I adapted from the Gallery 2 exif module.

It probably works a lot better than the exif_read_data() function, and I've added the option of selecting which exif properties to display and they are now displayed in a nice table.

You may want to remove the exif_read_data() method altogether.

Rename file to .zip

vhmauery’s picture

StatusFileSize
new4.08 KB

I don't agree with adding an exif parsing library to Acidfree. I don't think that is the right place for it. If a function is missing, it would be trivial to add a helper module that defines exif_read_data. There, you can include the right .inc files and do the parsing. Basically, all it needs to do is have the right stuff defined in the .info file to get it in the modules list. Then, it will get included automatically. But just make sure it returns information in a way similar to the way exif_read_data does -- an array of arrays of key => value pairs.

array(
  'section1' => array(
    'key1' => 'value1',
    'key2' => 'value2',
  ),
  'section2' => array(
    'key3' => 'value3',
  ),
);

But I do like the changes to the UI and the default exif theme. So I have included those in this patch.

I am ready to commit this patch and then close this as 'won't fix'.

jaredwiltshire’s picture

Yeah I agree it would add about 200KB of extra files to acidfree.

It would be more suitable if this functionality would be available as another module. It would be extremely easy to do. Perhaps it could be an acidfree or image contrib module.

jaredwiltshire’s picture

StatusFileSize
new49.98 KB

Heres the little module I put together... rename to zip.

Do you reckon there is any point of making a drupal project for it? There is already a exif module that uses the much larger PEL library which requires PHP 5. AFAIK this module should only require PHP 4.

vhmauery’s picture

I don't really think it makes sense to add it as a contrib module for either Acidfree or Image -- it makes more sense to attach it to Image, but as far as I know, Image doesn't make use of it... I think it would be better to be a stand-alone module. I didn't even know there was already another module (regardless of the php5 requirement.) Maybe this could be worked into that one for those that can't meet the php5 requirement.

jaredwiltshire’s picture

Yeah might be possible to combine with the exif module. Maybe you could remove exif support from acidfree and rely on the exif module instead.

vhmauery’s picture

StatusFileSize
new2.21 KB

hehe. Funny you should mention that. I like that idea the best of all. It goes along with all that Drupal stands for. And that is what Acidfree 5.0 is all about.

I have attached a patch that removes the 'show exif' part of Acidfree.

vhmauery’s picture

Title: Read Exif using pure PHP » Remove EXIF display code from Acidfree -- use Exif module instead
Status: Needs review » Fixed

The patch that removes exif code from Acidfree has been committed to CVS.

vhmauery’s picture

Status: Fixed » Closed (fixed)