Image browser

Thanks Mike.

The original images would all be different sizes.

I basically want to provide a directory path, and then have all the images in that directory display as thumbnails in the filmstrip.
All the thumbnails would be the same size, so as to make the filmstrip look tidier (as opposed to having all different odd shaped thumbnails).

For example:
I might have a directory called “Ink Splats” which contains 50 images (3000 x 2000 pixels).
In the app, I can enter Ink Splats as the directory (or hard code it), and then the filmstrip displays all the images in that directory at say 400 x 400 pixels.

That’s what I am trying to achieve anyway :slight_smile:

[quote=303117:@Richard Summers]Thanks Mike.

The original images would all be different sizes.

I basically want to provide a directory path, and then have all the images in that directory display as thumbnails in the filmstrip.
All the thumbnails would be the same size, so as to make the filmstrip look tidier (as opposed to having all different odd shaped thumbnails).

For example:
I might have a directory called “Ink Splats” which contains 50 images (3000 x 2000 pixels).
In the app, I can enter Ink Splats as the directory (or hard code it), and then the filmstrip displays all the images in that directory at say 400 x 400 pixels.

That’s what I am trying to achieve anyway :)[/quote]
10/4 I’ll mod my Canvas based demo for you after I get back from a customer site.

If you are coding for macOS, you definitely should use the macOS IKImageBrowserView class (https://developer.apple.com/reference/quartz/ikimagebrowserview)
No need to invent the wheel again and it will look/work/behave much better then any attempt of coding it yourself. :slight_smile:

BTW Both MBS and dtPlugin have this.

[quote=303153:@Christoph De Vocht]If you are coding for macOS, you definitely should use the macOS IKImageBrowserView class (https://developer.apple.com/reference/quartz/ikimagebrowserview)
No need to invent the wheel again and it will look/work/behave much better then any attempt of coding it yourself. :slight_smile:

BTW Both MBS and dtPlugin have this.[/quote]

Christoph - I agree, but I don’t believe the OP has those plugins.

Just for the record, in iOS I use an HTMLViewer and an HTMLTable to show picture files in the Document folder for the user to pick from.

There are several ways to do this.

[quote=303219:@Michel Bujardet]Just for the record, in iOS I use an HTMLViewer and an HTMLTable to show picture files in the Document folder for the user to pick from.

There are several ways to do this.[/quote]
Great idea Michel thanks!

[quote=303219:@Michel Bujardet]Just for the record, in iOS I use an HTMLViewer and an HTMLTable to show picture files in the Document folder for the user to pick from.

There are several ways to do this.[/quote]
Excellent, I forgot about this. We also did something similar in our Cardsmith application, which has a icon list of over 300.

The cool thing was we could use a little CSS animation for it without having to handle the actual animation!

@Richard Summers - Here is the Filmstrip test project that allows you to drop an image or a folder full of images onto the canvas.

  • You can then use the mouse wheel to scroll it or use the nudge buttons
  • Use the Animate button to auto-scroll the film strip

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


  • tested only on OS X

@Mike Cotrone
Pretty cool filmstrip. You should consider adding the following on the Canvas Class open event:

#If TargetWin32 Then Me.DoubleBuffer = True Me.EraseBackground = False #Else Me.DoubleBuffer = False Me.EraseBackground = True #Endif

Niiiiiiiiiice !

@LangueR - Added.

Just a small mistake, Mousewheel should be

Canvas1.nudge(deltaY)

[quote=303320:@Axel Schneider]Just a small mistake, Mousewheel should be

Canvas1.nudge(deltaY)

I only allow Horizontal Scrolling not Vertical scrolling so thats why I used deltaX.
Does this not work for you on Linux as it does for me on OS X?

I also just added two textfield animation control knobs.

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

Added Directional Control

[quote=303321:@Mike Cotrone]I only allow Horizontal Scrolling not Vertical scrolling so thats why I used deltaX.
Does this not work for you on Linux as it does for me on OS X?[/quote]

On Linux I must use deltaY.

Axel thanks buddy - I will add that.

** Added to Canvas1.MouseWheel(X as Integer, Y as Integer, deltaX as Integer, deltaY as Integer) as Boolean

		Dim deltaValueType as Integer
		#If TargetMacOS OR TargetWin32 Then
				deltaValueType = deltaX
		#Elseif TargetLinux Then
				deltaValueType = deltaY
		#endif
		
		Canvas1.nudge(deltaValueType)

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

Kike:$
first, thank you for sharing.

In the link you gave, you have at the end: ?dl=0. If you replace the ending 0 with a 1, the download appears directly without going to a web page and ask for a click to download.

Just a little trick :wink:

I forgot to report: I added some more Me.AcceptFileTypes with image kinds and dropped an all purpose target folder (where I place single comic image files):

very nice !

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