Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: exif-update  (Read 17096 times)

0 Members and 1 Guest are viewing this topic.

thomasFRU

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 14
    • www.uledoc.de
exif-update
« on: September 09, 2009, 12:08:31 am »

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
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #1 on: April 19, 2010, 11:28:28 am »

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

Harald
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: exif-update
« Reply #2 on: April 19, 2010, 07:52:16 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: exif-update
« Reply #3 on: April 20, 2010, 07:50:43 am »

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.
Logged

thomasFRU

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 14
    • www.uledoc.de
Re: exif-update
« Reply #4 on: April 20, 2010, 10:37:33 pm »

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
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #5 on: April 21, 2010, 08:02:19 am »

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

Harald
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #6 on: April 22, 2010, 07:59:52 am »

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
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #7 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

Logged

M4rkus

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 97
Re: exif-update
« Reply #8 on: April 22, 2010, 10:26:38 am »

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.
Logged
Best all, Markus

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #9 on: April 22, 2010, 07:26:29 pm »

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
Logged

M4rkus

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 97
Re: exif-update
« Reply #10 on: April 23, 2010, 06:17:50 am »

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.
« Last Edit: April 23, 2010, 06:23:34 am by M4rkus »
Logged
Best all, Markus

thomasFRU

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 14
    • www.uledoc.de
Re: exif-update
« Reply #11 on: April 24, 2010, 09:13:31 pm »

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:

Code: [Select]
$exifNew = array_combine($exifSortKey, $exifSortValue);

        return $exifNew;
}


Code: [Select]
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
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #12 on: April 26, 2010, 10:54:26 am »

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
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #13 on: April 26, 2010, 11:20:46 am »

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

Harald
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #14 on: April 26, 2010, 11:55:12 am »

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
Logged

thomasFRU

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 14
    • www.uledoc.de
Re: exif-update
« Reply #15 on: April 26, 2010, 10:25:37 pm »

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

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

Thomas
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #16 on: May 09, 2010, 09:49:12 am »

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
Logged

thomasFRU

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 14
    • www.uledoc.de
Re: exif-update
« Reply #17 on: May 10, 2010, 12:58:27 am »

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
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: exif-update
« Reply #18 on: May 10, 2010, 07:34:59 pm »

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

Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.