March 28, 2024, 05:02:19 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Slideshow 3

Started by GWS, March 20, 2019, 02:36:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

Hi,

A few years ago, I posted a slideshow program. 
This is an updated version. :)

The earlier version provided for sequential, random and selected display.
This version adds music accompaniment if required.

I've not included any test images or music files as they are usually quite large.

To use the program, place some of your pictures in a folder, and if you want some music, some music files in another.

Use the Radio buttons at the top to choose which display method you want to use.

Click on the Browse buttons to select the image and music folders you wish to use (they will turn green if files are found) - then click Continue.

Most images will display correctly (enlarged to fit the screen). But as discussed in the earlier version, some problems may arise from the size and format of modern digital photos. (see this thread) ..

http://www.ionicwind.com/forums/index.php?topic=6152.msg45291#msg45291

I found that problems due to Exif data in the jpeg files, can often be cleared by loading the image into Windows Paint or other graphics program and saving it again.  This gets rid of the unwanted tags which cause the read error.

All the best, :)

Graham

Tomorrow may be too late ..

Brian

Graham,

Had a quick look, inbetween decorating. When you press the Spacebar, you get a black bar in the lower centre of the screen. And I found 7 seconds too long to wait for the picture refresh (thought it had stopped). Could it be built in so you could change it yourself? As always, good stuff

Brian

GWS

Hi Brian,

Sounds like you're busy .. :)

The spacebar is only active when the Display window is showing images.
On first press, it pauses the display and the word 'Paused' shows in white.
The second press continues the display at 7 second intervals, and the word 'Continuing' overwrites 'Paused'.

This is the old programming problem when writing stuff to the same part of the screen - after the first write, subsequent writes are superimposed on the first, and the screen in that area, rapidly becomes a jumble of characters. ::)

So a simple solution is to output a rectangle with the same colour as the screen before each write. You can't see the rectangle because it should be exactly the same color as the window. 

That is how the paused/continue status is displayed at the moment.
Another way would be to use a dedicated text box with the same colour background as the window, to make it inconspicuous.

I can't make the program here to show a black bar as you describe - the blanking rectangle (actually screen coloured), should not be visible unless you've altered the background window colour .. :)  In which case, just alter the rectangle colour to that of the window, and it will disappear again.

To locate the rectangle, just do an 'Edit - Find' and search for 'Paused'.
That will place you in the DisplayMessages subroutine and you will find the appropiate blanking rectangle there.

As far as your refresh speed preference goes - this is controlled by the 'Interval = 7000' statement at the beginning of the program. You can just change the value to say 4000 to use a 4 second delay.

I find faster display speeds a bit 'flicky' for my taste - so I settled on 7 seconds to give time for each image to 'register' on my old brain ..  :)

It would need some re-arrangement of the Main window to give the user another control to set the refresh time.  Together with the code to service the control, it would be quite a bit of work ..

All the best, :)

Graham

 

Tomorrow may be too late ..

Brian

Graham,

I can live with the 7-second delay. The bar appears to be the same colour as the screen background - a purple colour. It disappears when the next picture shows, but there is no text shown, either 'Paused' or 'Continuing'

And this happens when running your original, unmodified exe

Brian

GWS

Brian,

Yep .. I think that's OK .. how it should be .. :)

The 'Paused' and 'Continuing' indications are only intended to show temporarily.

Graham
Tomorrow may be too late ..

Brian

Graham,

Not pushing this at all - the program does everything you intended it to, it's just that I don't see the  Paused or Continuing text

Brian

GWS

Very odd Brian ..  :(

Perhaps your graphics setup is different - I'm running on a 4:3 monitor, although I don't see what difference it should make.

When an image is showing, do you see the 'Press Q or ESC to Quit' message, bottom left in green?

That is on the same line as the 'Paused' and 'Continuing' messages, in the bottom 1/4 inch of the screen.

Maybe someone else will try it out and comment ..

Best wishes, :)

Graham




Tomorrow may be too late ..

Brian

Graham
Yes, I do see Press Q, etc. I will try a different colour later. Painting the new shed now...
Brian

GWS

Hi Brian,

I've had a thought where the problem may lie - Screen Resolution  :)

I always have my computer set to 1024x768 pixels - but other folk may well have a screen set for 1280x1024 pixels.

So if I write a program which may use hard coded x,y positions for text and other items, it might not look the same on someone elses computer.

It's an age old problem, which I tend to overlook because I think in terms of 1024x768 all the time.

It's solvable by using positional code such as: ypos = 0.975 * ScreenHeight.

Maybe that's why some things appear on my screen, but not on yours.

You might have to change the source code to suit your setup ..

Best wishes,  :)

Graham



Tomorrow may be too late ..

billhsln

One weird thought, Brian and I worked on a project together.  What he saw on his screen did not match what I saw.  He was creating the program as a project and I was just single program compiling it.  If I ran his compiled version, I saw what he did, but when I ran my version, it looked different.  I don't think we ever figured out why.  The important thing was that it looked good on his machine, since his was the final version.

It could be that I am running on an odd sized 17" laptop.

Bill
When all else fails, get a bigger hammer.