Re: Patch for loading EXIF data on image upload
"Heath S. Hendrickson" <[email protected]>
| Newsgroups | gmane.comp.horde.ansel |
|---|---|
| Message-ID | <[email protected]> |
Heath S. Hendrickson wrote: > What may be more important is to have it write the data (if not > already there) before committing any edits to the image file. That > would keep from losing the data before it's too late. > Answering myself, attached is a simple patch that modifies image.php to do just that... this should be done in addition to the previous super-patch (I removed all the stuff that was included in that patch from here). h -- ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
image.php.exif_patch_updated
(text/plain, 670 B)
Index: image.php
===================================================================
RCS file: /usr/local/horde/cvs/ansel/image.php,v
retrieving revision 1.68
diff -u -r1.68 image.php
--- image.php 16 Mar 2004 02:51:17 -0000 1.68
+++ image.php 23 Mar 2004 03:37:05 -0000
@@ -348,6 +387,12 @@
} else {
$image = &$ansel_shares->getImageById($image_id);
+ // check to see if we have the Exif data preserved in the datatree
+ if (!$image->get('Exif')) {
+ // no, so let's do that now.
+ @Ansel_ImageData::setExifData($image);
+ }
+
switch ($actionID) {
case 'rotate90':
case 'rotate180':