News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
gallery of demos updated
Author Message
widged
Junior Member
**


Posts: 35
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
gallery of demos updated

(I will use this thread to signal updates to the murgalua gallery... if you have contributions to make, please send them along)

I added a photo gallery. This is an adaptation of Mikshaw's icon display examples. I changed the display to an horizontal one and added functions to take care of the resizing of the picture, so that it fits in the bouding box.



Simply add images (jpg and png by default) in a pix directory, in the folder from which the script is started.

Available in the murgalua Gallery

This post was last modified: 06-11-2007 08:01 PM by widged.

06-11-2007 10:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #2
RE: gallery of demos updated

That's very cool.
I have had 2 problems with the photo gallery so far, though:

1) The download link says photo_gallery.lua, but the filename is actually photogallery.lua
2) It seems to choke on large numbers of files. I believe the icon script has the same or similar trouble.

06-12-2007 01:34 AM
Find all posts by this user Quote this message in a reply
widged
Junior Member
**


Posts: 35
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #3
RE: gallery of demos updated

mikshaw Wrote:
1) The download link says photo_gallery.lua, but the filename is actually photogallery.lua


Oups Sad. Thanks for letting me know. Corrected.

mikshaw Wrote:
2) It seems to choke on large numbers of files. I believe the icon script has the same or similar trouble.


Yes, I noticed that as well. When writing the demo, I was using quite big files (kind of royalty free photos you receive on web-designer magazines 1600x1200 pixels) and noted that the application was very slow to open (mac os x).

I haven't tested that any further. I was rather trying to implement a paging system such that only the pictures that are visible at a given time get uploaded.

06-12-2007 02:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #4
RE: gallery of demos updated

A note about the drag-and-drop demo...
If you use Fl_Double_Window() for w, rather than Fl_Window(), it will reduce or eliminate the flicker caused while dragging. I think this depends on whether or not your graphical environment supports double buffering (should work for most modern systems).

06-12-2007 05:35 AM
Find all posts by this user Quote this message in a reply
observer
Junior Member
**


Posts: 6
Group: Registered
Joined: Aug 2007
Status: Offline
Reputation: 0
Post: #5
RE: gallery of demos updated

Nice work on the demos, these really help to get people up to speed.

I found Fl_Double_Window cured the flicker I was getting in the clock demo, also.

I'm wondering, in scripts like photo_gallery.lua what's the best (or any) way to make it incrementally draw?

Ideally, (for the photo_gallery.lua example) the main window and the image directory scroll would show first, then the images would show as they loaded.

Actually (this might be simpler), even just making the main window show first before the images load, would be nice. As it stands, nothing shows until all the images are loaded, which can take a while.

Any ideas how to do that?

08-03-2007 01:42 PM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #6
RE: gallery of demos updated

I'm not sure exactly what you're looking for, but I'm guessing that the main thing would be not having to wait for the window to display. A quick fix might be to eliminate the thumbnail previews, athough I'm not sure that's acceptible. With no disrespect intended, this script was based on a test which itself was incomplete and in need of serious improvement. So you might consider looking at my image viewer, which stores only one image at a time (or so I assume...maybe ram usage increases with each loaded image, but i haven't checked that yet) and uses a file list instead of thumbnails. It's a work in progress, and it needs to be modified to work in 0.5.5 (I haven't worked on it in a few weeks), but it does not suffer from an initial wait period, and does not lock up when you enter a directory of thousands of images. It might give you some ideas.
http://www.murga-projects.com/forum/show...php?tid=53

08-03-2007 10:07 PM
Find all posts by this user Quote this message in a reply
observer
Junior Member
**


Posts: 6
Group: Registered
Joined: Aug 2007
Status: Offline
Reputation: 0
Post: #7
RE: gallery of demos updated

mikshaw Wrote:
but it does not suffer from an initial wait period, and does not lock up when you enter a directory of thousands of images. It might give you some ideas.
http://www.murga-projects.com/forum/show...php?tid=53


Thanks, that is a help. And it does have a much faster interaction!

Thinking ... what might it take to make an image viewer like this scale well for huge directories of images...

Maybe what would be nice is some kind of a scrolling widget that can tile things (thumbnails) on the scrolling area, such that each tile/thumb knows whether or not it is currently exposed relative to the position of the scroll.

Then something (a separate thread?) can load things on the scroll (thumbs, in this case) only when needed for display. Which is to say, only when the thumb needs to be drawn does it get loaded/drawn. So as the scroll changes position, thumbs get loaded only when they need to be shown, and unloaded as soon as they are scrolled off the display and can't be seen anyway.

08-11-2007 07:23 AM
Find all posts by this user Quote this message in a reply
iGame3D
Moderator
***


Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #8
RE: gallery of demos updated

Could also try a pages method where you load x number of images, that fit into a frame of a certain size, and then page through them with buttons.

Programs like iPhoto and Extensis Portfolio create a database of thumbnails on importing images, instant access to tens of thousands of images 'appears' to
happen after that, but in the background there's a gig or so of these
thumbnails in many folders somewhere.

08-11-2007 12:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: