ANN: ThumbnailCtrl For wxPython ;-)

Hello NG,

      thanks a lot for all your suggestions. Regarding:

< Alex >:

In any case, I'm sorry if what I said led others to think
I was accusing this of bloat. And I'm sad that what was
intended to be praise for the widget has seemed like
accusation; I'm very sorry about that, Andrea.

I didn't take it bad, Alex, no problem :wink: I fully agree with you that
adding features to a widget should always be considered carefully. However,
most of the suggestions I got from this kind NG (and not only for
ThumbnailCtrl), were really good ideas (in my opinion, obviously), so I
decided to implement them. Some of them didn't convince me a lot, and I
didn't implement them. In other cases, some suggestions were somewhat
"jarring", like the ones from Franz and Peter about the ComboBox inside
ThumbnailCtrl. Franz woulk like it to be a part of ThumbnailCtrl, while
Peter would like to have it in a separate decorator panel with other
buttons and functionalities. In these cases, while I admit both of the
suggestions are nice ideas, I don't know what to do :wink:

< Franz >:

If I choose under more options another zoom factor (say 2),
then press the button "Set Zoom Factor", nothing happens,
(the thumbs stay unchanged).

Mhm, the "Set Zoom Factor" is useful only if you zoom the thumbnails with
the mouse wheel + Ctrl key down or if you hit the "+" and "-" keys. Every
time you do one of these actions, the thumbnails are resized (zoomed in or
out) by a factor *zoomfactor*. Didn't this work? Or have I misunderstood
something?

Or use less lines and make them broader, so the display
is somewhat consistend:

test.tif->12 Dec 2005->11:21:49->32.111->(230,197)
-----------------------------------------^^^^^^ (here the total size, not

the thumb size)

or maybe:
test.tif | 12 Dec 2005 | 11:21:49 | 32.111 | (230,197)

I don't know if there is a simple way to do it with wx.ToolTip and
SetToolTip(). wx.ToolTip decides by itself which font to use and how many
characters per line it will display, and I don't know if there is a way to
change this behavior. Because this is what I use at the moment (wx.ToolTip
+ SetToolTip). Using other tip things, like TipWindow, creates some focus
problem in ThumbnailCtrl, while PopupWindow is not supported on all
platforms... I really don't have a claer idea on what to do about this one.

What about using the statusbar (there should be enough place
for displaying also EXIF data), when hovering over a thumbnail
or selecting one?

This is a nice suggestion... I will try to implement some kind of "switch"
that allows the info to be displayed in the TopLevel window statusbar (if
it exists).

<Peter>:

We should push
for more eye candy, even if this might mean a little bit less performance.

What would you rather have? Something that looks like Cornice or something

that looks like Picasa? The highlighting that Andrea put in his control is

a very nice touch but... not enough, we need ,more bling bling! :o)

Peter, could you please elaborate something more about it? Which kind of
"eye-candy" feature would you like to have? I am always in search of new
ideas :wink:

Thank you a lot, as usual, for your kind and useful suggestions.

Andrea.

···

_______________________________________________
Andrea Gavana
Reservoir Engineer
MOGI ? Reservoir Characterization and Modeling Dept.
ENI S.p.A. ? Exploration & Production Division
Via Emilia, 1 ? 20097 San Donato Milanese (MI) ? Italy
Phone: +39 02 520 62972
Fax: +39 02 520 61824
E-mail: andrea.gavana@agip.it
Restyled Internet Site: http://xoomer.virgilio.it/infinity77/
____________________________________________________

Eni S.p.A.
Sede legale in Roma,
Piazzale Enrico Mattei 1, 00144 Roma
Tel. centralino: +39 06598.21
www.eni.it
Capitale sociale € 4.002.934.326 i.v.
Registro Imprese di Roma,
Codice Fiscale 00484960588
Part. IVA 00905811006
R.E.A. Roma n. 756453

well... just make it look as good as Picasa: shadows under the thumbnails, 2 alternating color rectangles on the selected thumbnails or maybe around the thumbnail area (thumbs +captition) like in ACDSee. Also distribute the horizontal space between the thumbnails. This problem is evident when there is a big zoom... a white band remains on the right of the thumbnails (you can see this in ACDSee too but this doesn't make it right).

Also... one more thing I noticed... there is a brief pop-up dialog when you rotate the thumbnails... since only the thumbnails get rotated this should be fairly fast and at least in theory it should not require a pop-up.

Another idea I would like people to comment about is a database of thumbnails, maybe the control could take a database file and hold the thumbnail data there between sessions. What do you think?

Peter.

···

On Wed, 14 Dec 2005 13:02:43 +0200, <andrea.gavana@agip.it> wrote:

<Peter>:

We should push
for more eye candy, even if this might mean a little bit less performance.
What would you rather have? Something that looks like Cornice or something
that looks like Picasa? The highlighting that Andrea put in his control is
a very nice touch but... not enough, we need ,more bling bling! :o)

Peter, could you please elaborate something more about it? Which kind of
"eye-candy" feature would you like to have? I am always in search of new
ideas :wink:

Hi Andrea,

In other cases, some suggestions were somewhat
"jarring", like the ones from Franz and Peter about the ComboBox inside
ThumbnailCtrl. Franz woulk like it to be a part of ThumbnailCtrl, while
Peter would like to have it in a separate decorator panel with other
buttons and functionalities. In these cases, while I admit both of the
suggestions are nice ideas, I don't know what to do :wink:

Sorry, that was a misunderstanding;
I only meant for the demo and not to the widget itself.

< Franz >:

If I choose under more options another zoom factor (say 2),
then press the button "Set Zoom Factor", nothing happens,
(the thumbs stay unchanged).

Mhm, the "Set Zoom Factor" is useful only if you zoom the thumbnails with
the mouse wheel + Ctrl key down or if you hit the "+" and "-" keys. Every
time you do one of these actions, the thumbnails are resized (zoomed in or
out) by a factor *zoomfactor*. Didn't this work? Or have I misunderstood
something?

Oops, again my fault.
Of course, there stands written "set Zoom FACTOR" and not "Set Zoom".

What confused me a little bit.
You have to enter the value in the textctrl and the confirm this
with the button Set Zoom Factor.
The other two buttons below open a (common) dialog,
so (for me) it would be more clear to have only the button "Set Zoom Factor"

and this opens a simple TextEntry Dialog and write the current zoom factor as static text.
(If the value is under one, the value is not valid).

Or use less lines and make them broader, so the display
is somewhat consistend:

test.tif->12 Dec 2005->11:21:49->32.111->(230,197)
-----------------------------------------^^^^^^ (here the total size, not

the thumb size)

or maybe:
test.tif | 12 Dec 2005 | 11:21:49 | 32.111 | (230,197)

I don't know if there is a simple way to do it with wx.ToolTip and
SetToolTip(). wx.ToolTip decides by itself which font to use and how many
characters per line it will display, and I don't know if there is a way to
change this behavior. Because this is what I use at the moment (wx.ToolTip
+ SetToolTip). Using other tip things, like TipWindow, creates some focus
problem in ThumbnailCtrl, while PopupWindow is not supported on all
platforms... I really don't have a claer idea on what to do about this one.

Anyway, only a loud thought, and not a "feature request". :wink:
I see, the Tooltip class doesn't provide that feature.

What about using the statusbar (there should be enough place
for displaying also EXIF data), when hovering over a thumbnail
or selecting one?

This is a nice suggestion... I will try to implement some kind of "switch"
that allows the info to be displayed in the TopLevel window statusbar (if
it exists).

(Only loud thinking):
Best to leave tooltips (they are displayed while hovering over each thumbnail).
Addidionally (for the demo), if a toplevel statusbar exists, display detailed
information about the currently selected thumbnail.
If more are selected, the last selected one could be displayed.

One more thing:
In the demo it is not possible to swith to the thumbs panel by keyboard only(?)
Please correct me if I'm wrong.

If the focus is in the thumbs panel, it would be nice to have:
cursor-up, cursor down, or right and left to navigate to another thumb.

page up and down (next - previous page in thumbnail view).
ctrl-Pos1 and ctrl-End go to first or last thumbnail

I think, navigation with keyboard only is important.

What about being able to sort the thumbs after name, extension, date, size and
also reverse for every item (like in a filemanager).

Initially they are not sorted, I suppose (as they are stored on the disk).
Then you can clear the Checkbox Sort.

On the right side of the settings panel, there is still room for that. :wink:
There could be four radio boxes:

O Name |_| (Checkbox) Sort
O Ext. |_| (Checkbox) Reverse
O Date
O Size

So now I stop... :wink:

Please don't hesitate to correct me,
if some things, I suggested, are not good/false/uninteresting.

···

On Wed, 14 Dec 2005 12:02:43 +0100, andrea.gavana@agip.it wrote:
--
Franz Steinhaeusler

Yes, for big directories, a cache (which is stored on disk) would be convenient.

What about displaying a thumb in its real size after double clicking on a thumb
or pressing the enter key;

or rather start with the linked program in windows (for example mspaint), and
put a entry in the right context menu (show in full size).
But this without looking at the code now, is more related to the demo
than with the widget, I suppose.

···

On Wed, 14 Dec 2005 14:18:48 +0200, "Peter Damoc" <peter@sigmacore.net> wrote:

Another idea I would like people to comment about is a database of
thumbnails, maybe the control could take a database file and hold the
thumbnail data there between sessions. What do you think?

--
Franz Steinhaeusler

I'll make it easy for you: follow Peter's suggestion! :wink:

Having a toolbar that can be nested with the thumbnail control is a great
idea. You could put some standard stuff on it, and users could add their own.

See wx.lib.floatcanvas.NavCanvas.py

For one way to do that.

-Chris

···

On Wednesday 14 December 2005 3:02 am, andrea.gavana@agip.it wrote:

In other cases, some suggestions were somewhat
"jarring", like the ones from Franz and Peter about the ComboBox inside
ThumbnailCtrl. Franz woulk like it to be a part of ThumbnailCtrl, while
Peter would like to have it in a separate decorator panel with other
buttons and functionalities. In these cases, while I admit both of the
suggestions are nice ideas, I don't know what to do :wink:

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Yes, for big directories, a cache (which is stored on disk) would be
convenient.

I vote for keeping it simple, just store the thumnails on disk, perhaps in a
directory created, called "thumbs".

However, this strikes me as something that should be part of an image viewer
program that uses the thumbnail control, rather than part of the thumbnail
control itself.

What about displaying a thumb in its real size after double clicking on a
thumb or pressing the enter key;

or rather start with the linked program in windows (for example mspaint),

don't even bother with that. It's really not that hard to display an image
with wxPython. Hey! there's your next project: an image dispaly widget, with
assorted functionalitly like zoooming, scrolling, rotating, cropping, maybe
even editing!

and put a entry in the right context menu (show in full size).
But this without looking at the code now, is more related to the demo
than with the widget, I suppose.

exactly!

If I ever get some time at home, I really want to build an image viewer,
organizer and printing program. I was intending to add some images to
Cornice, but if this keeps rolling, I may go this route.

-Chris

···

On Wednesday 14 December 2005 5:15 am, Franz Steinhaeusler wrote:

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Yes, for big directories, a cache (which is stored on disk) would be
convenient.

I vote for keeping it simple, just store the thumnails on disk, perhaps in a
directory created, called "thumbs".

However, this strikes me as something that should be part of an image viewer
program that uses the thumbnail control, rather than part of the thumbnail control itself.

In my implementation I use a dictionary to keep the thumbnail data and a separate thread to get this data by going through the files and using PIL to get the thumbnails. This is nice but when loading a path with let's say 1GB of 8MPixel photos it takes a severe hit on performance. If I view that directory more often it would be a bonus to be able to load it faster and this could be done by making the algorithm that gets the thumbnails first look somewhere else for the data and only if it doesn't find it read the files and create the thumbs.
I don't like per directory files/dirs, I would prefer a central database.
This central database could be provided to the thumbnail control by the application BUT first the control has to be aware that it can get the thumbs faster from some other place.

What about displaying a thumb in its real size after double clicking on a
thumb or pressing the enter key;
or rather start with the linked program in windows (for example mspaint),

don't even bother with that. It's really not that hard to display an image
with wxPython. Hey! there's your next project: an image dispaly widget, with
assorted functionalitly like zoooming, scrolling, rotating, cropping, maybe
even editing!

and put a entry in the right context menu (show in full size).
But this without looking at the code now, is more related to the demo
than with the widget, I suppose.

well... code for that is something like

         self.Bind(wx.EVT_LEFT_DCLICK, self.ActivateCursor)
     def ActivateCursor(self, evt):
         os.startfile(self.cursor)

it would be a nice, default, thing that I don't think would bother to many people.

···

On Wed, 14 Dec 2005 20:55:54 +0200, Christopher Barker <Chris.Barker@noaa.gov> wrote:

On Wednesday 14 December 2005 5:15 am, Franz Steinhaeusler wrote:

If I ever get some time at home, I really want to build an image viewer,
organizer and printing program. I was intending to add some images to
Cornice, but if this keeps rolling, I may go this route.

Hello NG,

    thanks a lot for all your suggestions about ThumbnailCtrl... I got
really *a lot* of nice ideas :wink:

After Peter's comments, I have downloaded Picasa, just to give a look to it.
It is far far far far (far)**100 superior to ThumbnailCtrl, it's incredibly
fast and has a very nice way to display images and thumb information.
However, as for Peter's comments, I have added some small cosmetic things
like shadows under thumbs (like Picasa), 2 alternating coloured rectangles
on selected thumbs (like Picasa), and removed the popup dialog during image
rotation and so on.
I *think* (hope? :wink: ) to be able to implement some other features that I
found interesting and visually effective on Picasa, like improving thumbnail
visualization, displaying file info, and probably handling different
directory structure with folder info, as in Picasa (also with similar visual
effects, I hope).

All other suggestions (like images database, rubberband selection, different
sorting options [now the thumbs are sorted by file names] ans so on) are
noted :wink: . I am working at the moment on NotebookCtrl and it's an hard
period at work, so I hope to be able to implement these "features" a soon as
possible. In the meanwhile, if someone of you has suggestions on how to
start implementing these features, they will be more than welcome :wink:

Thanks a lot to you all.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77

···

----- Original Message -----
From: "Peter Damoc" <peter@sigmacore.net>
To: <wxPython-users@lists.wxwidgets.org>
Sent: Wednesday, December 14, 2005 8:49 PM
Subject: Re: [wxPython-users] Re: ANN: ThumbnailCtrl For wxPython :wink:

On Wed, 14 Dec 2005 20:55:54 +0200, Christopher Barker > <Chris.Barker@noaa.gov> wrote:

> On Wednesday 14 December 2005 5:15 am, Franz Steinhaeusler wrote:
>> Yes, for big directories, a cache (which is stored on disk) would be
>> convenient.
>
> I vote for keeping it simple, just store the thumnails on disk, perhaps
> in a
> directory created, called "thumbs".
>
> However, this strikes me as something that should be part of an image
> viewer
> program that uses the thumbnail control, rather than part of the
> thumbnail control itself.

In my implementation I use a dictionary to keep the thumbnail data and a
separate thread to get this data by going through the files and using PIL
to get the thumbnails. This is nice but when loading a path with let's say
1GB of 8MPixel photos it takes a severe hit on performance. If I view that
directory more often it would be a bonus to be able to load it faster and
this could be done by making the algorithm that gets the thumbnails first
look somewhere else for the data and only if it doesn't find it read the
files and create the thumbs.
I don't like per directory files/dirs, I would prefer a central database.
This central database could be provided to the thumbnail control by the
application BUT first the control has to be aware that it can get the
thumbs faster from some other place.

>
>
>> What about displaying a thumb in its real size after double clicking on
>> a
>> thumb or pressing the enter key;
>> or rather start with the linked program in windows (for example
>> mspaint),

> don't even bother with that. It's really not that hard to display an
> image
> with wxPython. Hey! there's your next project: an image dispaly widget,
> with
> assorted functionalitly like zoooming, scrolling, rotating, cropping,
> maybe
> even editing!
>
>> and put a entry in the right context menu (show in full size).
>> But this without looking at the code now, is more related to the demo
>> than with the widget, I suppose.

well... code for that is something like

         self.Bind(wx.EVT_LEFT_DCLICK, self.ActivateCursor)
     def ActivateCursor(self, evt):
         os.startfile(self.cursor)

it would be a nice, default, thing that I don't think would bother to many
people.

>
> If I ever get some time at home, I really want to build an image viewer,
> organizer and printing program. I was intending to add some images to
> Cornice, but if this keeps rolling, I may go this route.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Did you uploaded the files? I just redownloaded the control and it is still the old one ( no shadow) :wink:

Peter

···

On Thu, 15 Dec 2005 03:07:13 +0200, Andrea Gavana <andrea_gavana@tin.it> wrote:

Hello NG,

    thanks a lot for all your suggestions about ThumbnailCtrl... I got
really *a lot* of nice ideas :wink:

After Peter's comments, I have downloaded Picasa, just to give a look to it.
It is far far far far (far)**100 superior to ThumbnailCtrl, it's incredibly
fast and has a very nice way to display images and thumb information.
However, as for Peter's comments, I have added some small cosmetic things
like shadows under thumbs (like Picasa), 2 alternating coloured rectangles
on selected thumbs (like Picasa), and removed the popup dialog during image
rotation and so on.