Image browser

Hi,
I would like to have a kind of filmstrip along the bottom of my window, which will show small thumbnails of all the images in a specified directory.
Does anyone know if this is possible, and if so, does anyone know if there are any examples of this anywhere?

Thank you all in advance for any help you can provide.

What a nice idea !

Somewhere (in the window Open event ?), you can put code that does:

check the contents of a given folder contents,
in a loop of some sort, you load all images,
resize them to fit the kind of filmstrip size,
then maybe within a timer, you can display sequenctially the images
and loop back to image 1.

Is it enought ?

It is certainly a start :slight_smile:

I do not want the images to animate or anything however, I simply want the thumbnail images to be displayed side-by-side in a strip along the bottom, and be able to scroll through them by the usual scrollbar.

Been a long time since I used Xojo, so I guess I will have to search the interwebs and hope I can find some kind of example project to dissect :slight_smile:

Thanks for the advice anyway.

a canvas that you draw scaled images in to should do it

Unfortunately I have no idea how to do that - hence why I was looking for an example project which I could look at the code and learn from.

Thanks anyway Norman - much appreciated.

Thought someone has posted such a thing on here
But dont recall who or what they titled the post etc

EDIT : There are
https://forum.xojo.com/34161-create-a-picture-gallery
https://forum.xojo.com/7258-best-xojo-thumbnail-class

If you can place it to the left or right you can use a listbox

https://www.dropbox.com/s/ll04efwqtw7ie15/imagefolder.zip?dl=1

Thanks guys.

@Norman, unfortunately both of those 2 links just suggest which class to use, but there is still no example project to learn from.
For example, it says CGImageSource is recommended, but just being told 1 word (CGImageSource) means absolutely nothing to me?

@Axel, when I run your example project - I just get an empty white strip attached to the left of my screen? Not sure what it is supposed to do?

This is obviously way to complex for me, so I will have to forget this idea :frowning:

Thank you all for trying to help - I still appreciate it.

Its a shame the eBay GUI programmer doesnt frequent here. he would be the perfect person to ask.

[quote=303000:@Richard Summers]Thanks guys.

@Norman, unfortunately both of those 2 links just suggest which class to use, but there is still no example project to learn from.
For example, it says CGImageSource is recommended, but just being told 1 word (CGImageSource) means absolutely nothing to me?

@Axel, when I run your example project - I just get an empty white strip attached to the left of my screen? Not sure what it is supposed to do?

This is obviously way to complex for me, so I will have to forget this idea :frowning:

Thank you all for trying to help - I still appreciate it.[/quote]

Richard – Using Axel’s example goto Window1 --> Open event.

  • You have to add the correct path to your images as Axel’s example has this hard coded.
		me.AcceptFileDrop("")
		dim f as FolderItem = GetFolderItem("/Users/mike/Pictures", 3) // <--- CHANGE TO YOUR PATH
		if f <> nil and f.Exists then
				ScanFolder(f, lb)
		end if

Richard,

Try this basic image canvas example project I made for you.

https://www.dropbox.com/s/ut9bq8e2mpz6088/FilmStrip.xojo_binary_project?dl=0

It should get you started into using the canvas with movement.

[quote=303014:@Mike Cotrone]Richard – Using Axel’s example goto Window1 --> Open event.

  • You have to add the correct path to your images as Axel’s example has this hard coded.[/quote]

… and you can drop a folder into the window

Have a look at the IconGrid example. It helped me out.
It might be what you’re looking for.

Paul explains about IconGrid in one of his webinars.

You might want to change the column widths. Or change the column count when your listbox resizes.
This way you have scrolling capabilities without having to do too much. And I am sure it’s faster than drawing every single image on a canvas.

[quote=303028:@Mike Cotrone]Richard,

Try this basic image canvas example project I made for you.

https://www.dropbox.com/s/ut9bq8e2mpz6088/FilmStrip.xojo_binary_project?dl=0

It should get you started into using the canvas with movement.[/quote]
The project is missing the images from folder “DEMO IMAGES”

Put yours in that folder and watch the results ?

Thanks Paul - Sorry it was late when I did this last night :slight_smile:

NEW LINK: Dropbox - File Deleted - Simplify your life

This is how it looks in Linux.
Does it look like this in OSX?

[quote=303101:@Axel Schneider]This is how it looks in Linux.
Does it look like this in OSX?

[/quote]

I testing / built this for OS-X El Capitan as I know Richard S. uses that also. I did 0 testing on this outside of OS X :slight_smile: It literally was about 25 minutes of coding to get Richard S. an example in the most basic form. I also didn’t care about my image types/sizing since Richard Summers is a graphic design expert and I knew he would have his own images.

Your example is much more elaborate :wink:

Woke up this morning to a multitude of answers :slight_smile:
Thanks everyone for all your help, especially Mike and Axel, who actually spent time making a project file for me to learn from.

Much appreciated.

P.S
I will get back to you when I find time to look at the project files, as I have lots of stuff going on at the moment.

THANK YOU.

[quote=303108:@Richard Summers]Woke up this morning to a multitude of answers :slight_smile:
Thanks everyone for all your help, especially Mike and Axel, who actually spent time making a project file for me to learn from.

Much appreciated.

P.S
I will get back to you when I find time to look at the project files, as I have lots of stuff going on at the moment.

THANK YOU.[/quote]

No worries Richard - If you have filmstrip specific images you made/use send them to me and I will incorporate them into my sample project. It would help with context most likely.

Thanks