Home » Gallery » Tools

castle-view-image 2.0.0

Screenshot from "castle-view-image"
Screenshot from "castle-view-image"

castle-view-image is an image viewer, converter and even a very limited image editor.

If you already have Castle Game Engine, then just run castle-view-image executable in CGE bin subdirectory. There's no need to download it separately.

Download castle-view-image:
Support us on Patreon

Documentation:

  1. Features
  2. Running
  3. Special keys
  4. Command-line options
  5. Image saving notes
  6. Requirements

1. Features

castle-view-image was originally developed to demonstrate the power of image handling inside our Castle Game Engine. It became quite useful utility on it's own, with the following features:

Many image formats are supported:

2. Running

You can simply run the castle-view-image without parameters, and open / save images using the menu commands.

3. Special keys

Keys not available as menu items:
Arrows move image
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: castle-view-image 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.

4. Command-line options

castle-view-image 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 castle-view-image you can give it as parameters a list of images to browse.

Every parameter must be one of:

Running castle-view-image with no parameters is equivalent to running
  castle-view-image .
so you will view all images (that castle-view-image 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.

5. Image saving notes

Resulting image format is determined by filename extension, unknown extension will result in error.

Image loaded and displayed by castle-view-image 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 castle-view-image 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 KTX, DDS files) will be always decompressed, and saving them back will always make uncompressed files.

6. Requirements

convert program from ImageMagick package must be available on $PATH for some image formats to work.