glViewImage (version 1.4.1)
glViewImage is an image viewer, converter and even a very limited image editor.
(64 bit, x86_64)
(32 bit, works on 64-bit too)
Mac OS X
If you like this software, please consider donating.
No installation is required. Just download and unpack these archives wherever you want, and run the program inside. The documentation (this web page) is also included inside (look in the documentation/ subdirectory) for offline viewing.
This is free/open-source software. Developers can download sources of this program.
glViewImage was originally developed to test and demonstrate the power of image handling inside our Castle Game Engine , but it became quite usable utility on it's own. Viewed image can be quickly scaled and moved, you can browse images list, you can test how image looks when tiled (to test is it good for a texture or desktop wallpaper), you can see how alpha channel of the image looks on various background colors. The ability to load and save even some uncommon image formats (DDS, RGBE) is also very useful.
Many image formats are supported:
- PNG: Portable Network Graphic. Excellent open format for images, offering good lossless image compression and full alpha channel.
- JPEG, GIF, TGA, XPM, PSD, PCX, PNM (PBM, PGM, PPM): are loaded using the excellent FPC fcl-image library. This gives us full support for these formats, without any extra libraries necessary (fcl-image is compiled inside our programs).
- DDS: Direct Draw Surface. This image format may be used for advanced texturing, as it can store textures compressed for GPUs, possibly with mipmaps, cube maps, volume textures. With glViewImage you can view all subimages within one DDS file, see menu items Images->Next/Previous subimage in DDS. Saving to DDS images is also supported. Details about using DDS format for textures in our engine are here.
- RGBE: simple HDR (high dynamic range) format. The format name is an acronym for Red + Green + Blue + Exponent, it was developed by by Greg Ward, described in "Graphic Gems II", used e.g. in Radiance.
- BMP: Windows Bitmap. Native support.
- IPL: IPLab image format. Only 16 bits per pixel are supported (gray-scale).
TIFF, SGI, JP2, EXR: To load and save these images, you need to install the ImageMagick package, and make sure it's convert program is available on $PATH. Then our engine will recognize these image formats, and seamlessly load/save them (by running convert "under the hood").
You can simply run the glViewImage without parameters, and open / save images using the menu commands.
|Keys not available as menu items:|
|Arrows + Ctrl||move image 10 x faster|
|- / +||scale image (smaller / larger)|
|x / X||scale only horizontally (smaller / larger)|
|y / Y||scale only vertically (smaller / larger)|
Notes about opening image: glViewImage guesses image format using file extension (yes, yes, I will change it at some time to recognize image format based on file content), so it's important for files to have good filename extension. JPEG images may have extension jpg or jpeg, RGBE images - rgbe or pic, rest is obvious.
Opened image is also added to the image list.
glViewImage remembers image list that you can browse using N (next image on the list) and P (previous image on the list) keys. When you run glViewImage you can give it as parameters a list of images to browse.
Every parameter must be one of:
A directory name — glViewImage will display all images found in this directory.
E.g. run glViewImage ~/my_images/ to display all images in ~/my_images/ directory.
A filename mask — glViewImage will display all images matching given mask, where '?' matches any char and '*' matches any number of any chars. Of course, users of bash and similar non-Windows shells can utilize shell filename expansion instead.
E.g. run glViewImage ~/my_images/*.png to display all PNG images in directory ~/my_images/. Or just run glViewImage ~/my_image.png to display only one image in file ~/my_image.png.
@<filename> — glViewImage will read image filenames from file <filename>, each line is one filename (<filename> "-" means "standard input", as usual; so you can pipe output of e.g. find program to glViewImage).
Running glViewImage with no parameters is equivalent
so you will view all images (that glViewImage can handle) in the current directory. If none found, the default welcome image will be displayed.
Oh, and (as usual) all parameters described in those pages: standard options understood by my OpenGL programs and some notes about command-line options understood by my programs are available. If you will not give any parameter that forces some window size (like --geometry) then program will open a window with the same size as the first displayed image.
Resulting image format is determined by filename extension, unknown extension will result in BMP format.
Image loaded and displayed by glViewImage is internally always stored in format comfortable for OpenGL. This includes many formats, but not RGBE. It means that if you will load RGBE image to glViewImage and then you will save it (even to the RGBE format again) then you loose RGBE precision (and clamp color values above 1.0).
Also, S3TC compressed images (from DDS files) will be always decompressed, and saving them back will always make uncompressed files.
- Libpng, Zlib (under Windows appropriate DLL files are already included in program's archive, so you don't have to do anything)
- Under Unix (Linux, FreeBSD, Mac OS X): GTK+ >= 2.6 and GtkGLExt >= 1.0.6
- Mac OS X users should look at the list of dependencies on Mac OS X
convert program from ImageMagick package must be available on $PATH for some image formats to work.