Efficient way of display thumbnails
Efficient way of display thumbnails
Hi!
My application needs to display several thumbnails (small images with a legend).
It may come from files, or generated on the fly ("virtual" thumbnails).
Is there an efficient way of do this?
Thanks!
My application needs to display several thumbnails (small images with a legend).
It may come from files, or generated on the fly ("virtual" thumbnails).
Is there an efficient way of do this?
Thanks!
Re: Efficient way of display thumbnails
Hi!
If you own the wxBook, you may want to look at the Riffle application. It has a thumbnail control you could use or extend.
However, there may be other ways to do that. I developed a small application called VidBeacon which gets animated thumbnails from movies and stills from images, displays them and allows the user to click them (for playback of movie files and shwoing images). I used a wxPanel as the base class and paint the images in OnPaint(). The info is displayed by wxStaticText controls. Mouse handling is the same as with other apps, except that I wrote my own event class for passing all needed info. Creating a simple thumbnail control isn't very hard to do.
For displaying all thumbs I used a wxScrolledWindow with a wxGridSizer and add the tumbnails accordingly.
VidBeacon hasn't been release yet, as there are some issues with it (sampling the images for movies doesn't work in all cases and storing the thumbs for later preview using a DB is sometimes too slow). Maybe I find some time today and add it to my site and post an announcement here. It's basically a simple app I wrote for personal use, but it may be a free replacement for something like Acdsee, although it hasn't nearly as much features...
Well, that is a pretty general question...josemarin wrote:Hi!
My application needs to display several thumbnails (small images with a legend).
It may come from files, or generated on the fly ("virtual" thumbnails).
Is there an efficient way of do this?
If you own the wxBook, you may want to look at the Riffle application. It has a thumbnail control you could use or extend.
However, there may be other ways to do that. I developed a small application called VidBeacon which gets animated thumbnails from movies and stills from images, displays them and allows the user to click them (for playback of movie files and shwoing images). I used a wxPanel as the base class and paint the images in OnPaint(). The info is displayed by wxStaticText controls. Mouse handling is the same as with other apps, except that I wrote my own event class for passing all needed info. Creating a simple thumbnail control isn't very hard to do.
For displaying all thumbs I used a wxScrolledWindow with a wxGridSizer and add the tumbnails accordingly.
VidBeacon hasn't been release yet, as there are some issues with it (sampling the images for movies doesn't work in all cases and storing the thumbs for later preview using a DB is sometimes too slow). Maybe I find some time today and add it to my site and post an announcement here. It's basically a simple app I wrote for personal use, but it may be a free replacement for something like Acdsee, although it hasn't nearly as much features...
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
I'm thinking on design the app with multiple pages (I'll use wxNotebook); on each page I will insert a wxGrid, and define a wxGridCellRenderer to render the cells.
Talking about wxNotebook, I've read somewhere (can't remember where), that on MacOS it's not possible to have a wxNotebook with more tabs that can be displayed. There is no "NextPage" or "PrevPage" buttons. It's that true?
It's possible to create a wxGrid without column headers or the first column?
I'll need only the grid.
Talking about wxNotebook, I've read somewhere (can't remember where), that on MacOS it's not possible to have a wxNotebook with more tabs that can be displayed. There is no "NextPage" or "PrevPage" buttons. It's that true?
It's possible to create a wxGrid without column headers or the first column?
I'll need only the grid.
Hi!
Personally I think that using wxGrid won't be very suitable, but then again I don't really know what you're up tojosemarin wrote:I'm thinking on design the app with multiple pages (I'll use wxNotebook); on each page I will insert a wxGrid, and define a wxGridCellRenderer to render the cells.
I'm not sure what you mean. From what I've heard, wxNotebook work well on Mac, although the layout is pretty different from Windows.josemarin wrote:Talking about wxNotebook, I've read somewhere (can't remember where), that on MacOS it's not possible to have a wxNotebook with more tabs that can be displayed. There is no "NextPage" or "PrevPage" buttons. It's that true?
I guess not, as you can only set the height of the column headers in general.josemarin wrote:It's possible to create a wxGrid without column headers or the first column?
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
-
- Super wx Problem Solver
- Posts: 424
- Joined: Tue Jul 12, 2005 8:44 pm
- Location: Alabama, USA
Although I don't personally use a Mac, I believe you are right about it not using multiple rows of tabs or being able to scroll the tabs. I think this is one reason why wxListbook was developed. Have you thought of using this instead? I used it in place of a notebook in one application and was very satisfied.
As for drawing the images, I'd agree with upCASE that it would be easier and faster to use a wxScrolledWindow and a wxGridSizer than to use the wxGrid control.
-Scott
As for drawing the images, I'd agree with upCASE that it would be easier and faster to use a wxScrolledWindow and a wxGridSizer than to use the wxGrid control.
-Scott
Right. This would work as well. I didn't use a static bitmap because the size of the thumbs is different each time and I had some problems in updating properly.phlox81 wrote:Acutally for displaying you can take a StaticBitmap, works very well.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
-
- In need of some credit
- Posts: 2
- Joined: Sun Apr 17, 2005 9:33 pm
hi! i also would like to create a scrolled window that displays thumbnails of images but i would like mine to have no definite number of rows or columns. images will adjust depending on the frame size like windows explorer or package manager of dev-c++. Do you guys have any idea how to do this?
the only solution i can think of is using wxHTML. am i going in the right direction?
the only solution i can think of is using wxHTML. am i going in the right direction?
Re: Efficient way of display thumbnails
@Ken_Afford
Did you get solution?
Did you get solution?
Re: Efficient way of display thumbnails
This can be done with a wxWrapSizer.
http://docs.wxwidgets.org/trunk/classwx_wrap_sizer.html
http://docs.wxwidgets.org/trunk/classwx_wrap_sizer.html
Use the source, Luke!
Re: Efficient way of display thumbnails
wxWrapSizer can be used. Only thing is the performance when I want to treat as wxDataViewCtrl (lots of add/delete/update) in the items.
Did you guys found some solution? My requirement is to display 10K image items.
Did you guys found some solution? My requirement is to display 10K image items.
Re: Efficient way of display thumbnails
I would probably build something myself based on wxHVScrolledWindow.
http://docs.wxwidgets.org/trunk/classwx ... indow.html
http://docs.wxwidgets.org/trunk/classwx ... indow.html
Use the source, Luke!