|
#1
|
|||
|
|||
|
Exposure error in reduceExif of functions.php
The function reduceExif in functions.php incorrectly reduces exposure times of 1 second or more,
i.e. for a 10 (ten) second exposure time it is returned as: 1/0 The function could be re-written as below, but others may find a more efficient way. function &reduceExif($exifvalue) { $vals = split("/",$exifvalue); if(count($vals) == 2) { // MJS 29092005 - Code to deal with exposure times of > 1 sec if ( $vals[1] == 0 ) { $exposure = round($vals[0].$vals[1],2); } else { $exposure = round($vals[0]/$vals[1],2); if ( $exposure < 1 ) $exposure = '1/'.round($vals[1]/$vals[0],0); } } else { $exposure = round($vals[0]/$vals[1], 2); } return $exposure; } |
|
#2
|
||||
|
||||
|
it's working for me. what was wrong?
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#3
|
||||
|
||||
|
i do find it annoying that 1 second is displayed as 1/1 i suppose.
__________________
Affordable Website Design in North Wales |
|
#4
|
||||
|
||||
|
which version? the new or the old?
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#5
|
||||
|
||||
|
1.4.2
londonrubbish - do you have a link please?
__________________
Affordable Website Design in North Wales |
|
#6
|
||||
|
||||
|
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#7
|
||||
|
||||
|
i see
Quote:
__________________
Affordable Website Design in North Wales |
|
#8
|
||||
|
||||
|
the modification that londonrubbish has provided works but I don't know what was the idea behind the proposed algorithm and I'm not diggin into the code to find out.
Dev note: I already have added this into the CVS version
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
| Post Reply |
| Thread Tools | |
|
|