This is a program for viewing images "interactively": click and drag to move the image, and scroll to zoom. See --keybinds
for more. Should support whatever images stb_image.h supports, as long as it can be converted to RGBA.
The program uses OpenGL hardware acceleration, thus it will not work without a video card that supports OpenGL and appopriate drivers. If you are unsure whether you have that, you probably do.
I made this for two reasons: I wanted a feh that you could use with the mouse (though feh has more uses than just viewing images); and I wanted the ability to change how the images are sampled with a keybind. Also, I wanted to use the Lanczos algorithm, as I'd heard it was the "best" technique.
However, using the Lanczos sampling method uses a bit more computing power, as it samples the texture 16 times per fragment, whereas the others sample only once per fragment. Also, it does some other calculations besides. Related: see the fragment shader for original author credit/Copyright (I have no idea what it's doing but it works).
$ glasses [switches] [path_to_image] # to load one image
$ glasses [switches] [path_to_directory] # to load all images in a directory
$ make clean # for subsequent builds
$ make
- OpenGL 4.6 (you can change the version, if you want) supported video card and drivers.
- Linux.
- GLFW3.
Switch | Effect |
---|---|
-l |
shorthand for --bilinear |
-n |
shorthand for --nearest |
-h |
shorthand for --lanczos |
Switch | Effect |
---|---|
--bilinear |
start with bilinear sampling |
--nearest |
start with nearest neighbour sampling |
--lanczos |
start with lanczos sampling |
--help |
print the help message |
--keybinds |
print the keybinds |
Key | Effect |
---|---|
Left click and drag |
move image |
Scroll wheel /+/- |
zoom in and out |
r | reset position and zoom |
n | set sampling mode to nearest neighbour |
l | set sampling mode to bilinear |
h | set sampling mode to lanczos |
ESC/q | quit |
ENTER | next image |
BACKSPACE | previous image |