Author Topic: [MOD] Exif V.1.7.6  (Read 179193 times)

0 Members and 1 Guest are viewing this topic.

Rembrandt

  • Guest
Re: [MOD] Exif V.1.7.6
« Reply #105 on: January 04, 2012, 05:49:59 PM »
@marcinos, I mean the picture that caused this error
« Last Edit: January 05, 2012, 08:37:24 PM by Rembrandt »

Offline marcinos

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Exif V.1.7.6
« Reply #106 on: January 04, 2012, 06:22:34 PM »
I do not have such an image, I installed this MOD

http://www.4homepages.de/forum/index.php?topic=21017.0

indeed have a clean version 1.7.6, this problem occurred

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Exif V.1.7.6
« Reply #107 on: January 05, 2012, 01:35:35 AM »
We need the photo with EXIF to test it with.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline marcinos

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Exif V.1.7.6
« Reply #108 on: January 05, 2012, 05:41:56 PM »
please

Rembrandt

  • Guest
Re: [MOD] Exif V.1.7.6
« Reply #109 on: January 05, 2012, 06:31:08 PM »
The EXIF in your Photos are corrupt.
I have tested a other original Photo and the EXIF works.

one thing, the exposure time function is not correct:

search in your modified code:

        
elseif ($key == "ExposureTime") {
                 
$ExposureTime explode("/"$exif_info);

            if ( 
$ExposureTime[0] == && $ExposureTime[1] == ){
                
$exif_array[$exif_match[$key]] = $ExposureTime[1]." sec(s)";
            }
            elseif ( 
$ExposureTime[0] == ) {
              
$exif_array[$exif_match[$key]] = "1/".($ExposureTime[1] * $ExposureTime[0])." sec(s)";
            }
            elseif((
$ExposureTime[0] > 1)){
              
$exif_array[$exif_match[$key]] = "1/".round($ExposureTime[1]/$ExposureTime[0])." sec(s)";
            }
            elseif ( 
$ExposureTime[1] > ) {
              
$exif_array[$exif_match[$key]] = ($ExposureTime[0]/$ExposureTime[1])." sec(s)";
            }
            elseif( 
$ExposureTime[1] == ) {
              
$exif_array[$exif_match[$key]] = ($ExposureTime[0] * $ExposureTime[1])." sec(s)";
            }
          }

and replace:

        
elseif ($key == "ExposureTime") {
          
$ExposureTime explode("/"$exif_info);
          if ((float)
$ExposureTime[1] == 0) {
            
$exif_array[$exif_match[$key]] = "0 sec(s)";
          }
          elseif ((
$ExposureTime[0]/$ExposureTime[1]) >= 0.3) {
            
$exif_array[$exif_match[$key]] = round(($ExposureTime[0]/$ExposureTime[1]),1)." sec(s)";
          }
          else {
            
$exif_array[$exif_match[$key]] = "1/".round((1/($ExposureTime[0]/$ExposureTime[1])),0)." sec(s)";
          }
        }


mfg Andi

Offline marcinos

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Exif V.1.7.6
« Reply #110 on: January 05, 2012, 09:35:43 PM »
thank you for your help,
improved code and as it turned out it destroyed a Helicon Filter EXIF data are therefore displayed in a wrong way.

I would like to add another function FocalLenghtIn35mmFilm how to do it

Rembrandt

  • Guest
Re: [MOD] Exif V.1.7.6
« Reply #111 on: January 05, 2012, 09:47:47 PM »

Offline marcinos

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Exif V.1.7.6
« Reply #112 on: January 06, 2012, 02:10:48 PM »
I tried to add the code, but nothing I did not show, nor does it update the database, there is something wrong

Code: [Select]
    if(!isset($FocalLengthIn35mmFilm) && !isset($FocalPlaneXResolution)){
      if(isset($model[0]) && isset($FocalLength)){
     
        switch($model[0]){
          case "DSC-P100" : $val = 7.9; break; 
          case "Pro 815" : $val = 3.89; break;
          case "NIKON D300S" : $val = 1.5; break;
        }
       
         if($val > 0){
           $exif_array[$exif_match['FocalLengthIn35mmFilm']] = round($FocalLength * $val) ." mm";
        }
      }
    }

if I enter a variable for your camera
  case "DMC-FZ8": $ val = ????; break;

only what

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Exif V.1.7.6
« Reply #113 on: January 06, 2012, 02:55:27 PM »
it would make more sense what you did if you posted the whole function, not just part of it
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline marcinos

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Exif V.1.7.6
« Reply #114 on: January 06, 2012, 04:10:47 PM »
the rest of the code is a few posts above, the link that gave Rembrandt

http://www.4homepages.de/forum/index.php?topic=29519.msg159818#msg159818

Rembrandt

  • Guest
Re: [MOD] Exif V.1.7.6
« Reply #115 on: January 06, 2012, 04:20:09 PM »
.....
if I enter a variable for your camera
  case "DMC-FZ8": $ val = ????; break;

only what
"$val" is the crop factor from your camera, for FZ8 is the cropfactor "6".
case "DMC-FZ8"$val 6; break;

« Last Edit: January 06, 2012, 05:06:28 PM by V@no »

Offline marcinos

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD] Exif V.1.7.6
« Reply #116 on: January 06, 2012, 05:25:22 PM »
Thank you very much, it's working, I updated the file Update_EXIF_Index.php and update my database automatically

 

Post your comments here