exif-update exif-update
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

exif-update

Started by thomasFRU, September 09, 2009, 12:08:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thomasFRU

I have added a lot of new exif-tags specially for canon and panasonic.
The tags are now shown in a fixed order and not alphabetically,
which depends on $exif_info. This var I've moved to exif_tags.inc.php
because it is used twice in other files.
To make it easier to update the exif-info from pictures, I've added
a new topic in the admin-tools, called update_exif. It scans the picture-table
deletes the associated data in the exif-table and writes the new data to the
db.
Because I'm using german-lanuage in my gallery, I've added new translations
for various tags only in the german.php and add this file for reference.

All changes are made on basis of version 1.4.20, you can find them in the
attached zip.

Have fun
Thomas

hlabout

I am very interested in this mod.
How do I install & run it.

Harald

Joachim Müller

I guess you need to extract the content of the zip archive and replace the files in coppermine's package with the ones that reside inside the archive that is attached to the initial posting. But that is only guessing - this mod is very basic and should not be applied if you're timid or inexperienced.

Joachim Müller

Originally I intended to convert the zip file into a proper set of instructions (using the common mod syntax "find FOO and replace with BAR"), but looking at the code submit I must say that some of it is just nonsensical and invalid. I can not recommend using this mod. What I did is re-organizing the zip file to explain to end users what folders they need to put the files into. See attachment.

thomasFRU

as supposed by Joachim, you have to replace the original files with the files from zip. The most important files are: exif.php, exif.inc.php in the folder include and all files in include/makers. Additionally you have to add entries in $lang_picinfo array inside your preferred language-file in the folder lang. Last you have to add the file exif_tags.inc.php inside include-folder. If you want not to update the file util.php from the base-folder, you have to delete the complete data from the table cpg14x_exif to force a renew of all exif-data inside the db.
There is another problem in the original source: some exif data written to the db will be corrupted, because the exifData filed is defined as string-type. To prevent this, you have to change the field into a blob.

For reference I add a sample screenshot  what you will get as a result.

Cheers Thomas

hlabout

Thanks for the support on my question.
Will look in to it in the near future and try to get things to work.

Harald

hlabout

Thomas,

Installed as discribed but untill now my gallery crashes as soon as exif_tags.inc.php is installed in mu include folder.
Will do more investigation soon.
Looks like a great Mod.

Harald

hlabout

Thomas,

Below you will finde the error message I get when opening the intermediate picture page:

Fatal error: Call to undefined function: array_combine() in /home/vhosts/haraldlabout.nl/httpdocs/fotografie/include/exif_php.inc.php  on line 116

Line 116 in exif_php.inc.php looks like this:

$exifNew = array_combine($exifSortKey, $exifSortValue);

Unfortunately I am not that experienced in s/w programming / web building to solve problems like this.
Temporary removed all changes made in my gallery.ld

www.haraldlabout.nl

Harald


M4rkus

Hi Harald,

your CPG-Version is 1.4.26 like my Gallery: https://www.naturfoto-galerie.net.
I have implement this mod too and it is functional.
Take a look at my gallery and see the Exif-Data.
I guess you have made an error in the implementation.

Feel free to contact me, mailadress is on my side.
Best all, Markus

hlabout

Markus,

Thanks for you reply and wow what a great nature gallery you have.
Beautiful picture and great theme.

Did you use this extended EXIT mod or the simple one that can be found on the coppermine site.
Currently I am using the simple one and that one is working fine.
When I install this extended version my intermediate picture page crashes.
Will do my implementation again and perhaps correct an error I made.

Harald

M4rkus

#10
Hi Harald,

thanks for your commendation.
By the way, the theme is hermes_gray and you are welcome to register in my gallery.
The gallery is public. Your photos are also beautiful and feel free to upload your pics and talk about it.

I'm using the extended EXIT Mod, but i don't generat intermediate pics !
Sorry, i have overlook it in your post  :-\
Waiting of thomasFRU for an answer.
Best all, Markus

thomasFRU

Quote from: hlabout on April 22, 2010, 10:07:09 AM
Thomas,

Below you will finde the error message I get when opening the intermediate picture page:

Fatal error: Call to undefined function: array_combine() in /home/vhosts/haraldlabout.nl/httpdocs/fotografie/include/exif_php.inc.php  on line 116

Line 116 in exif_php.inc.php looks like this:

$exifNew = array_combine($exifSortKey, $exifSortValue);

Unfortunately I am not that experienced in s/w programming / web building to solve problems like this.
Temporary removed all changes made in my gallery.ld

www.haraldlabout.nl

Harald


Hi Harald,

I suppose you are using php4 which is the default for coppermine. Because I'm using php5 and forgot to test with php4 I did not realize
that the function array_combine() is only valid in php5.
So as a workaround add the following lines to the end of the file exif_php.inc.php after the line 119 just behind this code:


$exifNew = array_combine($exifSortKey, $exifSortValue);

        return $exifNew;
}




function array_combine($arr1, $arr2) {
    $out = array();
   
    $arr1 = array_values($arr1);
    $arr2 = array_values($arr2);
   
    foreach($arr1 as $key1 => $value1) {
        $out[(string)$value1] = $arr2[$key1];
    }
   
    return $out;
}


Thomas

hlabout

Thomas,

Thanks for this great fix.
Installed the exif changes again ad the updated exif mod is working now.

Still got some minor problems with the exif manager in the configuration mode, not all fields have text, but I will solve that in the near future. (language file problem i think)
In the mean time i am very happy with it.

Thanks again for your reply and fix.

Harald

hlabout

Can post Dutch and English lang files, would it be interesting?

Harald

hlabout

Thomas,

Solved the language problem, just two typing errors.
The only thing I now have to fix is the fact that the image info does not show some Exif info, like the lens type.

I have to dig deeper into this.
It is very time consuming for a not experienced s/w programmer like me but it is fun to do, especially if the things I do work. (not always that lucky)

Harald

thomasFRU

Hi Harald,

glad to hear the mod is now working for you.

If the problem is with Canon cameras you should have a look inside

include/makers/canon.php

There are the definitions for known LensType. If you are using other types, which are not defined,
you might use for example the great software PhotoMe from Jens Duttke. Test the picture with it
and see if it will show the LensType. Under the item Manufacturer notes you will find your lens. The
associated data must be a decimal number which you might add to the canon.php file like

if($result['LensType']==226) $result['LensType'] = "Canon EF 70-200mm F2.8L IS x2";

Have fun

Thomas

hlabout

Thomas,

Having Fun but still could not solve a specific problem with my Exif data.

In the configuration settings I can make a lot of Exif selections with the goal they show up under the Picture Exif information.
I made the selections like shown in the Exif manager 1 & 2 files that are shown in this reply.
The problem now is that not all selections show up under the Picture Exif information.
With the selections shown in the manager 1 & 2 files my results are as in the Exif information window example I uploaded.
You can see a lot of data not shown.

I already ran the exif information update through the Exif manager.
Any ideas why not all the Exif information is shown?

Harald

thomasFRU

Dear Harald,

as far as I can see, there is no more Information in your picture. This depends on the tags which are written by your camera into
the picture data. One thing you may check, is the firmware-version of your camera (last is 2.0.3), may be, this will improve the
exif-data written to the pictures. If you are interested, I may send one of my pictures (EOS 30D) to you, which you can test with
your coppermine.

Greetings Thomas

hlabout

Thomas,

Thanks again for your reply.
I am running the latest firmware ver 1.1.1 on my EOS 40D.

When I open my images in adobe bridge I can see that not all EXIF data is there like in the CPG Exif settings selection, but there is more data available than my Gallery shows now (for example lens type data).
I will do more investigations on my picture Exif data soon.

Harald