| 1 |
-------------------------- |
| 2 |
OpenGL image viewer plugin |
| 3 |
-------------------------- |
| 4 |
|
| 5 |
This image viewer was designed with speed and ease of usage in mind as well as for mouseless setups (notebooks). |
| 6 |
A image is converted to a non-power-of two OpenGL texture. This means your video driver has to support the GL_ARB_texture_rectangle |
| 7 |
OpenGL extension. Please verify with the command glxinfo. |
| 8 |
|
| 9 |
Please keep in mind that you need a lot of video memory: a 5MP image requires 20MB texture memory. |
| 10 |
If you run out texture ram, the downloading time of the texture can be increased up to several seconds. |
| 11 |
|
| 12 |
------------------- |
| 13 |
Handbook |
| 14 |
------------------- |
| 15 |
|
| 16 |
1) Start |
| 17 |
-------- |
| 18 |
|
| 19 |
- select the images you'd like to view. Ctrl-A for all images |
| 20 |
if no image is selected, all images of the album are loaded and the first image will be displayed |
| 21 |
if one image is selected, all images are loaded and the selected image image will be displayed |
| 22 |
if several images are selected, only the selected images are loaded |
| 23 |
- select View->OpenGl Image viewer |
| 24 |
- for convenience, create a shortcut in the host application. In digiKam, select Settings->Configure Shortcut, search for "image viewer" |
| 25 |
|
| 26 |
|
| 27 |
2) Usage |
| 28 |
-------- |
| 29 |
|
| 30 |
next image : scrollwheel down or n or down arrow or right arrow or Space |
| 31 |
previous image : scrollwheel up or p or up arrow or left arrow |
| 32 |
toggle fullscreen/normal : f |
| 33 |
quit : Esc |
| 34 |
toggle scrollwheel action : c (scrollwheel either zooms or changes the image), default is changing images |
| 35 |
rotation : r |
| 36 |
reset view : double click |
| 37 |
original size : o |
| 38 |
|
| 39 |
|
| 40 |
zooming: |
| 41 |
|
| 42 |
- move mouse in y-direction while pressing the right mouse button |
| 43 |
- alternatively, press c and use the scrollwheel |
| 44 |
- plus/minus |
| 45 |
- ctrl + scrollwheel |
| 46 |
|
| 47 |
|
| 48 |
panning: |
| 49 |
|
| 50 |
- move mouse while pressing the left button |
| 51 |
|
| 52 |
|
| 53 |
3) Performance & technical details |
| 54 |
---------------------------------- |
| 55 |
|
| 56 |
On a PentiumM 1Ghz, slow 2.5 inch harddrive, I measured the following times for changing an image (5 megapixel, 2MB) |
| 57 |
- loading image from cache: 0ms |
| 58 |
- download texture to video memory: 15ms |
| 59 |
- draw image: 16ms |
| 60 |
the new image is on the screen after 31ms of the user interaction |
| 61 |
- preload next image to cache 690ms |
| 62 |
only after preloading is done, the next image can be displayed. |
| 63 |
|
| 64 |
The most expensive part is instantiating a QImage(myimage) object with 690ms, |
| 65 |
which includes reading the file from the harddrive. |
| 66 |
Downscaling to screensize and converting to GL format takes around 70ms. |
| 67 |
At least on my setup, downscaling by CPU is still faster than copying a 20Mb texture to video mem and downscaling by GPU. |
| 68 |
|
| 69 |
Other programs/libraries: time of loading and displaying an image |
| 70 |
SDL: 750ms |
| 71 |
Kuickshow: (imlib) 690ms (without smooth rendering) |
| 72 |
Kuickshow: (imlib) 1770ms (with smooth rendering) |
| 73 |
feh: (imlib2) 670ms |
| 74 |
this Image Viewer plugin: 720ms (implicit smooth rendering due to OGL) |