Page 1 of 1

Suggestions & a thing or two

Posted: Mon Feb 13, 2012 3:04 pm
by fredphoesh
Hi there,

I have been enjoying the pro version for a few months now, thanks.

I would love

1/ to be able to rotate an image (R for right, L for Left) and S for Save so images could be rotated and saved as rotated on the fly.

2/ the screensaver seems to be running regardless of whether the screen is on or not... so if I turn off the monitor, windows knows that, but the screen saver should not be activated. It wastes energy, drawing images etc from the HD and also takes longer for the computer to be operable when the monitor goes back on.

3/ the images displayed seem to be not as random as one would think... I very often see the same photo on the same day, and I have about 12,500 photos, so this should hardly ever happen, especially since I only actually see my screensaver for about 15 mins a day. I have set it to be recursive, random and with saved files list ON. I also often seem to get several images from a couple of folders in a row... and given I have 1031 folders, this should also almost never happen.... so the randomness does not seem to work as I would imagine.

Thanks again for the great work.
Kind regards,
Mark.

Re: Suggestions & a thing or two

Posted: Mon Feb 13, 2012 11:29 pm
by gpb
Hi,
thanks for using gPhotoShow Pro
fredphoesh wrote: 1/ to be able to rotate an image (R for right, L for Left) and S for Save so images could be rotated and saved as rotated on the fly.
This has been requested by several users, but there is a problem. Writing a jpeg without damaging exif/xmp/iptc tags is a really complex job, even ExifTool sometimes is not able to do it correctly. The Microsoft libraries I am using now for sure are not able to copy all tags, for this reason I never implemented such function. If I am able to find a solution which doesn't require to write tons of code I will implement it.
fredphoesh wrote: 2/ the screensaver seems to be running regardless of whether the screen is on or not... so if I turn off the monitor, windows knows that, but the screen saver should not be activated. It wastes energy, drawing images etc from the HD and also takes longer for the computer to be operable when the monitor goes back on.
This is not very clear. When windows power management switches off the monitor and gPhotoShow is running it stops displaying pictures until it detects the monitor is on again, this function relies on windows power management notifications so if you turn off monitor from its power button I am afraid windows can't detect it and continues to work normally. You should turn off the monitor using a program, for example I implemented that function in WallpaperSS Pro and my new Dell noteboook has a hard button to do the same thing.
fredphoesh wrote: 3/ the images displayed seem to be not as random as one would think... I very often see the same photo on the same day, and I have about 12,500 photos, so this should hardly ever happen, especially since I only actually see my screensaver for about 15 mins a day. I have set it to be recursive, random and with saved files list ON. I also often seem to get several images from a couple of folders in a row... and given I have 1031 folders, this should also almost never happen.... so the randomness does not seem to work as I would imagine.
Because of the way gPhotoShow has been written it is not possible it displays the same file more than once before all files have been displayed. However this is true only if you enter a folder in the gPhotoShow list only once and if you don't have duplicate files. Check the list of folders you configured in gPhotoShow, then if you see one or more pictures very often there is only a possibility: you have one or more pictures which are identical or very similar.
To be sure you can enable error logging in the gPhotoShow About section. Then when gPhotoShow is running and you see a duplicate file stop it and open the log file, among lots of other info you should see the names of the files displayed.

Re: Suggestions & a thing or two

Posted: Sat Feb 25, 2012 9:07 am
by bluejaywpg
If I may offer my 2 cents on the randomization comment...

I too had similar suspicions about a lack of randomness. I know that it's basic rules of randomization & possibilities that in for example a lottery, certain numbers will get picked more than others, but the thing is that I have about 100,000 pictures & videos total (yes my wife takes TONS of pictures especially when we travel). I was seeing a few of the same pictures repeatedly (almost daily). Then eventually I enabled the same options as Mark (actually only the save option needed to be enabled - the rest were already done). And I started seeing pictures & videos that I never remembered seeing before. I'll readily admit that I have a few duplicated pictures (uploaded twice, copied twice by accident, or whatever) but not very many.

Now, just to give some perspective, here's some math. Note that I am not a mathematician but I always did well in math at school & to this day continue to calculate stats & possibilities in many life situations just for fun, so I should be able to offer some insight. :) If you run the screensaver on my computer (so there are 100,000 unique pictures let's say) & you allow it to repeat pictures that it has already picked, there is a roughly 50/50 chance that by the 316th picture it will have picked the same picture twice by that point. And a near 100% chance that the same picture appeared twice after about 450 pictures. If the screensaver is programmed to change pictures every 6 seconds, it would take 45 minutes for this to happen. So for the same picture to show 3 times, multiply 45 minutes by 450 & you get 238 hours (10 days straight without sleeping) that you would have to have your eyes watching the screensaver - just to see 1 picture likely appear 3 times. In Mark's case with 12,500 pictures, it would still take 200 pictures or 20 minutes for any 1 picture to likely have repeated, & 83 hours until 1 picture has likely appeared 3 times.

Ironically, the same video played twice just a few minutes apart while typing this post (I know this for 100% sure because we were at the same bowling alley & my wife nattered "I told you no more videos!" just before I threw a spare). Granted, in between the 2 times this video was picked & played, the screensaver was stopped accidentally due to mouse movement. But still - even if it reset the screensaver so that all files could be picked again, it still should not show a file that quick under normal circumstances - that should be very rare with nearly 100,000 files! So I have to agree that the random algorithm should be reviewed & revised.

I used to have that problem when I did BASIC programming way back in the day. To get around it, I used the system timer feature in various ways such as taking the last few digits (which would be split seconds so it's very random-like) & along with the number from the computer's so-called random number generator (of course this was always the same pattern of random-looking numbers) & then also have another method of prompting for a keystroke (I guess you can't use this one for a screensaver) & that might for example determine how many random numbers would be discarded in between picking & actually using numbers (sort of like playing Texas Hold-Em when you discard a card before the dealer's cards are drawn). It worked very well.

Re: Suggestions & a thing or two

Posted: Sat Feb 25, 2012 7:37 pm
by fredphoesh
bluejaywpg wrote: there is a roughly 50/50 chance that by the 316th picture it will have picked the same picture twice by that point. And a near 100% chance that the same picture appeared twice after about 450 pictures. If the screensaver is programmed to change pictures every 6 seconds, it would take 45 minutes for this to happen. So for the same picture to show 3 times, multiply 45 minutes by 450 & you get 238 hours (10 days straight without sleeping) that you would have to have your eyes watching the screensaver - just to see 1 picture likely appear 3 times. In Mark's case with 12,500 pictures, it would still take 200 pictures or 20 minutes for any 1 picture to likely have repeated, & 83 hours until 1 picture has likely appeared 3 times.
Hi, interesting, but I think that calculation is based on each subsequent image being randomly selected from the WHOLE library. The reply I got above stated that it is impossible for you to see the same image twice before you have seen ALL the other images... I have very strong doubts that this is true. I often think I saw the SAME image earlier that day, and most the time the screensaver is not on.

Also, about the screensaver running when the screen is off... what is for 100% sure, is that since installing this screen saver, when I wake the screen, Firefox is often the front programme, and it is always white for about 5 seconds, then the screen renders properly after that. So that is why it seems the screen saver is running even when the screen power saver has kicked in and the screen has been blacked out. Do you see this too when your system wakes after the screen has timed out?

Thanks,
Mark.

Re: Suggestions & a thing or two

Posted: Mon Feb 27, 2012 11:58 am
by gpb
bluejaywpg wrote: Now, just to give some perspective, here's some math. Note that I am not a mathematician but I always did well in math at school & to this day continue to calculate stats & possibilities in many life situations just for fun, so I should be able to offer some insight. :) If you run the screensaver on my computer (so there are 100,000 unique pictures let's say) & you allow it to repeat pictures that it has already picked, there is a roughly 50/50 chance that by the 316th picture it will have picked the same picture twice by that point.
If gPhotoShow picked up each image from the WHOLE library what you wrote would be correct. gPhotoShow works in another way. On the first run when there is no cached list gPhotoShow scan all configured folders and builds a complete files list. From this moment it always keeps two lists: one contains all files (full list), another only keeps files which have not been displayed (working list). When gPhotoShow needs to display a files calculates a random index inside the working list and at this point the file is removed from the list, it will not be selected any longer because it's not present in the list. The full list is used when you configure a periodic synchronization, in this case after a directory scan gPhotoShow compares the scanned list with the old full list and all changes are applied to the working list.
If the option to save the files list to disk is ticked gPhotoShow saves to disk both the full list and the working list and uses it again next time it runs. In this way no file will be repeated until all library has been displayed. This is how the program has been designed. Of course there is always the possibility that some bug causes repetitions, however the code to perform all these operation was implemented several years ago and checked several times, so I am rather confident it works well. In the past several users reported issues with files apparently repeated but all times the files were really duplicated or they had several copies of pictures that look almost the same.
All this if you only have one monitor. In case you have two or more monitors.... well in this case occasional repetition are possible but they depends on some options: filters and background directory scan.
Since all files are files lists are saved to disk and they plain text it should not be difficult to check what gPhotoShow does and where is the duplicate files. Enable error logging, then when you see a duplicate file stop gPhotoShow. Open the log file, go to the end see which was the last file displayed and search it inside the log, if you find it more that once I would be very interested in analyzing that log file.
bluejaywpg wrote: I used to have that problem when I did BASIC programming way back in the day. To get around it, I used the system timer feature in various ways such as taking the last few digits (which would be split seconds so it's very random-like) & along with the number from the computer's so-called random number generator (of course this was always the same pattern of random-looking numbers) & then also have another method of prompting for a keystroke (I guess you can't use this one for a screensaver) & that might for example determine how many random numbers would be discarded in between picking & actually using numbers (sort of like playing Texas Hold-Em when you discard a card before the dealer's cards are drawn). It worked very well.
gPhotoShow Pro doesn't use the standard Microsoft random number generator because in older versions it is limited to 16 bit random numbers. I used an implementation of the "Mersenne twister" generator, it's much better then the Microsoft one but it's not perfect. Anyway I don't think the random number generator is the problem, as I wrote the way gPhotoShow is designed should prevent file repetitions.

Re: Suggestions & a thing or two

Posted: Mon Feb 27, 2012 12:14 pm
by gpb
fredphoesh wrote: Hi, interesting, but I think that calculation is based on each subsequent image being randomly selected from the WHOLE library. The reply I got above stated that it is impossible for you to see the same image twice before you have seen ALL the other images... I have very strong doubts that this is true. I often think I saw the SAME image earlier that day, and most the time the screensaver is not on.
As I explained in my previous post because of the way gPhotoShow is designed images should never repeat unless you have duplicate files on your hard disk. Of course a bug is always possible... do you have only one monitor ? Did you configure a periodic files list synchronization ?
fredphoesh wrote: Also, about the screensaver running when the screen is off... what is for 100% sure, is that since installing this screen saver, when I wake the screen, Firefox is often the front programme, and it is always white for about 5 seconds, then the screen renders properly after that. So that is why it seems the screen saver is running even when the screen power saver has kicked in and the screen has been blacked out. Do you see this too when your system wakes after the screen has timed out?
If you enable error logging you check if gPhotoShow continues to display pictures even when the monitor is turned off.
gPhotoShow is designed to suspend itself when it receives a notification from windows stating that the monitor is being switched off. This however doesn't mean gPhotoShow closes itself, it simply stays there without doing anything. If windows sends another notification stating the monitor is on again gPhotoShow will restart.
BTW, I see the same effect on Firefox. I don't know whether it depends from DirectX or because gPhotoShow disables windows composition (Aero) while it's running. Windows Composition also known as Aero Glass is disabled to improve DirectX performances, on Windows 7 Aero disabling/enabling is very fast but it seems Firefox needs more time

Re: Suggestions & a thing or two

Posted: Mon Feb 27, 2012 5:00 pm
by fredphoesh
gpb wrote: As I explained in my previous post because of the way gPhotoShow is designed images should never repeat unless you have duplicate files on your hard disk. Of course a bug is always possible... do you have only one monitor ? Did you configure a periodic files list synchronization ?
Hello gpb,
thanks for the reply.
I did have some sub folders containing smaller jpeg files for emailing and uploading... I have deleted all those, so should have no duplicates at all now.
i am a photographer, so I would not get confused between photos that "look similar" they all look very different to me ;)
I will let you know if it stops happening, I have a feeling it may have been the approx 300 files that were duplicates.
Cheers,
Mark.

Re: Suggestions & a thing or two

Posted: Mon Feb 27, 2012 10:10 pm
by gpb
fredphoesh wrote: Hello gpb,
thanks for the reply.
I did have some sub folders containing smaller jpeg files for emailing and uploading... I have deleted all those, so should have no duplicates at all now.
i am a photographer, so I would not get confused between photos that "look similar" they all look very different to me ;)
I will let you know if it stops happening, I have a feeling it may have been the approx 300 files that were duplicates.
Hi Mark,
I am a photographer too, although only an amateur, so I can understand what you wrote, but this issue has been reported really a lot of times and ofter users were not able able to understand whether the files were duplicated or just "looked the same". As I wrote previously I can't exclude a bug, but in this case it's a well hidden bug and I would be happy to find it :D

Re: Suggestions & a thing or two

Posted: Sun Mar 11, 2012 8:52 am
by bluejaywpg
fredphoesh wrote:
Hi, interesting, but I think that calculation is based on each subsequent image being randomly selected from the WHOLE library. The reply I got above stated that it is impossible for you to see the same image twice before you have seen ALL the other images... I have very strong doubts that this is true. I often think I saw the SAME image earlier that day, and most the time the screensaver is not on.

Also, about the screensaver running when the screen is off... what is for 100% sure, is that since installing this screen saver, when I wake the screen, Firefox is often the front programme, and it is always white for about 5 seconds, then the screen renders properly after that. So that is why it seems the screen saver is running even when the screen power saver has kicked in and the screen has been blacked out. Do you see this too when your system wakes after the screen has timed out?
My screensaver used to crash often until I renamed the extensions of the bad video files. So I cannot say that I had repeats during the same screensaver run. But whenever the screensaver restarted, the same files would repeat pretty quickly & often. Until I enabled the option to save the file list.

As for the screensaver running when monitors are off, mine doesn't work that way. It seems to run all of the time. I have dual screens - 1 is a TV so it may be on another input or off altogether, the other is a monitor turned off overnight via external timer. But when either is turned on, the screensaver appears to be running. Maybe I have to change an option...?

Re: Suggestions & a thing or two

Posted: Mon Mar 12, 2012 12:51 pm
by gpb
bluejaywpg wrote: My screensaver used to crash often until I renamed the extensions of the bad video files. So I cannot say that I had repeats during the same screensaver run. But whenever the screensaver restarted, the same files would repeat pretty quickly & often. Until I enabled the option to save the file list.
This is rather normal. In version 6 I updated the random number generator with the last implementation of the Mersenne Twister, this version is faster and has a better distribution but in any case the only way to avoid repetitions is to enable the option to save the files list.
bluejaywpg wrote: As for the screensaver running when monitors are off, mine doesn't work that way. It seems to run all of the time. I have dual screens - 1 is a TV so it may be on another input or off altogether, the other is a monitor turned off overnight via external timer. But when either is turned on, the screensaver appears to be running. Maybe I have to change an option...?
gPhotoShow stops working when windows sends a message to notify running programs about monitor power state change. If you switch off monitor (or TV, it doesn't matter) externally windows is not aware of this fact and doesn't send any notification.
Starting from Vista windows seems to able to detect when a secondary monitor is connected/disconnected but there seems to be no notification to running programs. In any case the best way to have gPhotoShow to stop using cpu and hd is to configure windows power management to power off monitors.
gPhotoShow plugin MonitorOnOff can be used to turn off monitors at a specified time of the day.