I’ve made extension which reads EXIF from jpegs added to gallery (and stores this data in database), allows editing exif in database. (actually i had to use 4 hooks… heh).
Now i’d like to add support for custom tags - used in templates. Is it possible with extension or I have to write a plugin? it is not big problem, I’m only curious…
Tag looks good, but what i need is on the one hand plain and on the other… specific - exif in offical gallery. Extension which adds support of exif in gallery is mostly finished (one or two more features, lang files). I saw that there is an exif plugin but i was always paranoid of code optimalization, and i couldn’t stand constant exif reading from jpeg (not to mention lost exif data - result of image processing in GD/GD2) that’s why i decided to write extension which stores exif data in DB.
screenshot + little extra history 😉 http://gbt.kuzniki.net/exifextension.html
finished. (only code clean-up remaining)
few additions to exif extension (like “Enable exif” option, which through js shows/hides exif value table) and Gallery EXIF plugin, example:
{exp:gallery_exif}
{if exifavailable == "yes"}
Exif data available: {exifavailable}
Camera producer: {if make == "Canon"}Canon is the best!{if:else}not canon...{/if}
Camera model: {model}
Flash:{if flash == "yes"}fired ({flashdetails}){if:else}not fired{/if}
Exposuremode: {if exposuremode == "Tv-priority"}{exposuremode}{if:else}not Tv-priority (to be exact: {exposuremode}){/if}
ISO speed: {isospeed}
{if:else}
Exif data not available
{/if}
{/exp:gallery_exif}
(within exp:gallery:entries)
would produce:
Exif data available: yes
Camera producer: Canon is the best!
Camera model: Canon EOS 10D
Flash:not fired
Exposuremode: not Tv-priority (to be exact: Program)
ISO speed: 1600
how should i call my “Gallery EXIF”? it is extension+plugin, so… expansion? 😊
anyone would like to test Gallery EXIF? extension and plugin still require code optimalization and clean-up. but should work.
one more thing to do is language file. (it will introduce one problem, because now in plugin you can use conditionals like this: {if flashdetails == “Red eye”) but in different language it wouldn’t be “Red eye”. Maybe i’ll add paremeter in {exp:gallery exif}, for example english_conditionals=”yes”. Setting it to yes would use english in IF statements but translated strings in {flashdetails}.
OH! and one more - important - thing. delete_entry function in mcp.gallery.php does not have hooks. So extension can not remove exif data record from DB when related gallery entry is removed. There are two solutions for this: hook in delete_entry in next EE version or manual triggered “check & delete unused records” through Gallery EXIF extension settings…
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.