From: Krister L. <kr...@km...> - 2002-07-16 06:12:25
|
Dirk Meyer wrote: > So I took a look in the osd server main.c and added a cache array with > 10 images in each cache. This is much faster now. Nice job Dischi! The code looks good and it is much faster as you say. It seems to me that OSD is faster in general also, not just for the image module. We should probably keep an eye open for the OSD server memory usage, one large image can be several megs, which adds up pretty quickly. But it looks OK for now. > But one thing I don't understand. What is this bounding box you're > writing about in the code. It is the area that is to be zoomed, if any. It is used for zooming any part of the image to any size (smaller or larger). > The affect is, that every image will be > zoomed, this costs too much time. > > Let's take a look in the source: That's a bug as you point out. It wasn't meant to do any scaling for that case. I've programmed long enough to know I get stuff like this wrong sometimes, so I should've tested it better, but I didn't want to delay committing it since it seemed to work. I saw the changes you made to iview.py. I consider you to be in charge of the image module, so you'll get to decide how stuff should be in the end. Having said that, here's some ideas that you might or might not like to use: * Let the OSD display be off by default, but let the setting (on/off) remain the same when displaying a new image. If the user wants to see the filename for each image it is easier this way. * Let buttons 0-9 set the zoom level, 0 is whole pic and 9 is max zoom (whatever that is). The cursor keys can be used to move the zoom area around. Keep up the excellent work! / Krister |