Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > MISCELLANEOUS > Archives > Bug Report 1.4.x

Post Reply
 
Thread Tools
  #1  
Old 09-29-2005, 09:45 AM
londonrubbish Offline
forum loafer
 
Join Date: May 2005
Posts: 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;

}
Reply With Quote
  #2  
Old 09-29-2005, 04:22 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
it's working for me. what was wrong?
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #3  
Old 09-29-2005, 04:32 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
i do find it annoying that 1 second is displayed as 1/1 i suppose.
Reply With Quote
  #4  
Old 09-29-2005, 05:10 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
which version? the new or the old?
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #5  
Old 09-29-2005, 05:18 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
1.4.2


londonrubbish - do you have a link please?
Reply With Quote
  #6  
Old 09-29-2005, 05:53 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
http://www.londonrubbish.com/
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #7  
Old 09-29-2005, 06:02 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
i see

Quote:
(25 mm) | 10 sec | 0 EV (Multi-
i assume you edited functions.php so the problem isn't there anymore. are you using 1.4.2 ?
Reply With Quote
  #8  
Old 09-30-2005, 04:53 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
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
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:22 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs