SMFHacks.com

SMF Gallery Pro => Support => Bugs => Topic started by: marcbkk on May 22, 2011, 03:05:37 pm

Title: 2 Major Outstanding Bugs
Post by: marcbkk on May 22, 2011, 03:05:37 pm
There are 2 major bugs that have been outstanding since the release of 3.0 and so far no effort has been made to fix them:

1 - Date and Time on EXIF does not correspond with site clock date and time. Since my site is in SE Asia, and the Forum's standard clock is based on USA East Coast time, all the pictures on my site show in the EXIF data that the member shot the photo in the middle of the night. This is awful. The date and time from the EXIF data should reference the Forum's Overall Time Offset which Set under the Admin area of Features & Options - Basic Features. If it referenced the time offset then the date and time would show correctly according to the actual EXIF data rather than the time it was shot based upon a clock on the other side of the world.

2 - The Aperture data from the EXIF data still shows F-Stop numbers that don't even exist. It seems to take the Aperture EXIF data and do some strange calculation on it. If a picture was shot at F/5.6 it shows as F/7.  

I don't have much time left on my last year of updates that I purchased and I would appreciate having these 2 major bugs fixed so that I can finally get my Gallery working correctly. Forum members are constantly complaining about these 2 issues and it does not look good for me when I keep saying as the forum owner that fixes are coming and they never do.

Thanks.
Title: Re: 2 Major Outstanding Bugs
Post by: SMFHacks on May 22, 2011, 03:09:55 pm
I wouldn't say no effort has been made have gone back and forth looking at different calculations for the FStop Number and it should work.
Will look into the time offset issue for #1 and see what I can find out.
I don't think I can fix #2 at this point i have spent a multiple hours on that issue and haven't found any other way that does it.
Title: Re: 2 Major Outstanding Bugs
Post by: marcbkk on May 22, 2011, 03:13:19 pm
Thanks, but on #2 I once provided a link to all correct Aperture numbers so that a table could be written if necessary. Also, I am not even sure why it doesn't just take the Aperture number from the EXIF data itself and why a calculation needs to be done on it in the first place? What shows in the raw EXIF data for Aperture is correct already. Can't the data just be pulled across as it is to avoid errors? Thanks.  
Title: Re: 2 Major Outstanding Bugs
Post by: marcbkk on May 22, 2011, 03:17:48 pm
Here once again is the link to all possible aperture values:

http://www.photographyuncapped.com/useful-lists-of-iso-settings-f-stops-shutter-speeds-by-third-and-half/articles/2009/03/

I think you mentioned once that rounding was the issue and I can see f/1.8 possibly being shown at f/1.9 (still not even sure why it would need to be done that way though), but I can't see rounding being the problem when f/5.6 is displayed as f/7 and f/9 is displayed as f/22.6, etc.

If you have all possible Aperture values on that link, can't they just be added as a table so that rounding would not even be necessary at all?

Thanks
Title: Re: 2 Major Outstanding Bugs
Post by: SMFHacks on May 22, 2011, 03:29:42 pm
On that page what values are used just wholes? Or the halves and thirds?
Title: Re: 2 Major Outstanding Bugs
Post by: marcbkk on May 22, 2011, 03:37:28 pm
I am afraid both 1/2 and 1/3 stops are used. It depends on how the photographer has set his camera. The cameras all offer the option of 1/2 and 1/3 stops in between the whole full stops. So unfortunately all are needed depending on how the user has set his camera.
Title: Re: 2 Major Outstanding Bugs
Post by: marcbkk on May 23, 2011, 03:08:18 am
It seems the way you have the Aperture values coded now using pow it is basically taking the 1st number and raising it to the power of the 2nd number in the code.

In Gallery.php (line 10481) you have
Code:
$fstop = pow(2, $apex/2);

I don't know what $apex is, but it seems to be Aperture/F-stop values from the EXIF data.

So for example if F/5.6 is pow(2, 5.6/2) then 5.6/2 = 2.8
22.8 = 6.97, which then gets rounded to 7.

That is why F/5.6 in the EXIF data comes out all wrong at F/7 in your coding.

As I have said earlier, I believe getting rid of this whole rounding process and using powers for calculations is not a good approach. The result is always wrong. You could just create a table I think using all the final 1 stop, 1/2 stop and 1/3 stop aperture values and then you don't need the code to do any calculations and all the output from the EXIF data will transpose correctly.   

Cheers.
Title: Re: 2 Major Outstanding Bugs
Post by: marcbkk on May 23, 2011, 04:44:44 am
It just occurred to me that the reason why you created these formulas for the aperture values in the first place is perhaps you thought that some of these aperture values coming out of the EXIF data on some cameras was incorrect and needed to be fixed? As confirmed by that link I provided, there are all kinds of aperture values using 1/2 and 1/3 stops as well. So all those numbers are correct as is and don't need to be changed in some way. So maybe you can simply solve the problem by removing all the formulas and just pulling in the aperture values as it is in the photo's EXIF data.
Title: Re: 2 Major Outstanding Bugs
Post by: SMFHacks on May 23, 2011, 10:10:37 pm
Posted an update
3.0.20
!Fixed bug if caching enabled showed hidden pictures on index page blocks
!Using php date function instead of smf's internal time format to format exif original date time taken
!Removed the calculation for fstopnumber now using the internal computer value if present or empty using the original fstopnumber without the calculation
Title: Re: 2 Major Outstanding Bugs
Post by: marcbkk on May 24, 2011, 11:59:44 am
Bravo. Well Done! Both are working perfectly at this point. You are a champ!