![]() |
EXIF data - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: EXIF data (/showthread.php?tid=7552) |
EXIF data - El Forum - 04-14-2008 [eluser]Ignacio[/eluser] How can I do for save EXIF data from an image? It could be really useful using it with: $data = $this->upload->data(); to: $exif = $this->upload->exif(); and: $exif['exif_device_model']; //Return ie: "iPhone" $exif['exif_device_make']; //Return ie: "Apple" $exif['exif_profile_name']; //Return ie: "Camera RGB Profile" ... ... ... Is there something like this? Is correct using EXIF data right this? I'm trying this stuff using this: Code: $exif = exif_read_data($data['full_path'], 0, true); return: Code: FILE.FileName: 232205172263e659ddea7119b601c152.jpg This is what I want, but I need a CI class to handle all the data. Ideas? Thanks. EXIF data - El Forum - 04-14-2008 [eluser]nmweb[/eluser] Is there not a PEAR class to handle EXIF? EXIF data - El Forum - 04-14-2008 [eluser]Ignacio[/eluser] you mean this one? ExifTool EXIF data - El Forum - 05-02-2008 [eluser]Ignacio[/eluser] Ok, this is my hacked upload library for getting exif data with exiftool. Check this file. This was really really hard to code, so, I don't know if is good, and is not 100% tested. This fix the problem when you're uploading images with a Flash system, check this: http://ellislab.com/forums/viewthread/70979/. First of all, I added a new var. Code: var $tags = ""; After that we're going to call a function for putting an array with all exif tags. Code: $this->tags = $this->get_exiftags($_FILES[$field]['tmp_name']); Now look this part: Code: $this->file_type = $this->set_filetype(); What is the get_exiftags() function? Code: function get_exiftags($filename) I did it with Exiftool (perl). Check my exif_config.pl file Code: #!/usr/bin/perl -s Yeah! Perl gives me and json array! awesome! So I can handle the data easily. Note: you can change this file watching this. Now check this new and changed functions Code: function data() If you look carefully, you'll note that I added more items for upload->data, like: date_original date_taken exiftags: this is awesome! all the entire array! I can save all the info in my bd. I steal this idea from flickr, ;-P Sorry about my english and bad explanation, but I'm happy with this, it took me sometime coding this. EXIF data - El Forum - 05-02-2008 [eluser]Ignacio[/eluser] Oh, I forgot one thing, the script has a function for splitting the files into two folders. EXIF data - El Forum - 05-03-2008 [eluser]Hermawan Haryanto[/eluser] I think you should post this thread to the forum Ignited Code |