There are three new features in this release -- Ctrl-C/Ctrl-V images to/from the clipboard, a cmd-line interface for batch image processing and build pipelines, and improved focus-handling for all modal dialogs -- which now allow simply pressing Enter to proceed.
Command Line Interface
The most extensive feature is the command-line interface (CLI). On both Windows and Linux the TacentView executable (the same one that is run to bring up the ImGui interface) may also be used in a shell / command-prompt. There is some under-the-hood magic to allow the same executable in Windows to be used in a Command window without bringing up a new console, but it seems to be working fairly well. See this page for more information.
To use Tacent View in CLI mode, you specify the input image files. It then runs a number of operations, in order, on them. Finally the images are saved into whatever format you specify. The easiest way to get your feet wet is to call:
tacentview.exe --help
Further instructions may be found in the Tacent View Wiki.
Input Files
Input files may be of any type that the viewer supports. In addition one or more manifest files may be specified. When processing a directory you may only want to process specific image types -- this is also supported in CLI mode.
For example, to specify a single image plus a directory and a manifest file you would call:
tacentview.exe -c -i tga landscape.jpg foldername/ @imagelist.txt
The -c just means use CLI mode. The -i specifies only load targa files for any input directories that are encountered. The @ means read in a manifest file that lists further files and directories to process. The manifest file may contain empty lines and line comments. If a line is neither of those, it is interpreted as either a directory to look in, or an image file to process.
Operations
The operations are what you want to happen to the input images. Things like rotations, resizing, cropping etc. These operations are appied in-order to each and every input image. Supported operations:
- resize -- Specify new dimensions, optionally preserve aspect ratio. Choose the resample filter and filter edge mode, etc.
- canvas -- Resize the image my modifying the canvas area. These are resize modes that do not use resampling. You can choose new dimensions, anchor position, fill colour etc.
- aspect -- Resize an image using aspect mode. You specify the desired aspect ratio and a specific mode (crop or letterbox). In letterbox mode a fill colour will be used. In crop mode the image sides may need to be cut. In either case there is no non-uniform scaling.
- deborder -- Remove borders from an image by specifing a border colour. Optionally read the border colour from the image. You may also specify what colour channels to check during removal. This is useful if the border in the image is made of, for example, only transparent pixels but with varying colour values.
- crop -- Crop an image by specfying a rectangular region. If the region is too big a fill colour wil be used. You may either specify the rectangle extents or an anchor and a size.
- flip -- Horizontal or vertical flips.
- rotate -- Rotate an image by specifying an arbitrary angle in degrees or radians. 90 and 180 degree rotations avoid resampling for better quality. After a rotation the image size will be larger. There are three different modes that allow you to choose how to handle this. The modes are fill, crop, and resize. All resampling filters me be optionally chosen.
- levels -- Adjust image levels by specifying black, white, and mid-points. Choose which frame in animated images to adjust (or choose all of them). The frame number gets clamped to the frame-count of the image being processed. Additinally specify the channels to apply the adjustments to and the algorithm to use for the mid-tone gamma.
- contrast -- Adjust the contrast of an image up or down. Optionally specify a frame number and channels.
- brightness -- Adjust the brightness of an image up or down. Optionally specify a frame number and channels.
- quantize -- Quantize the colours in an image using various high-quaity algorithms. The number of desired colours may be set. Supported algorithms include Wu, Neu, ScolorQ, and Fixed.
- channel -- Various channel manipulations. This can be used to generate premultiplied-alpha images, spreading one channel to the others, setting a particular channel to a specific value, computing intensity and applying to specific channels (to create, for example, a black-and-white image), etc. The modes are blend, set, spread, and intensity.
Currently supported filters include: nearest box bilinear bicubic bicubic_catmullrom bicubic_mitchell bicubic_cardinal bicubic_bspline lanczos_narrow lanczos and lanczos_wide
Output Images
The output files are generated based on the input files and chosen operations. The type of the output images is specified with --outtype. The short version -o may also be used. If no out-type is specified the default is tga. Supported output types are: tga png jpg gif webp qoi apng bmp tif
The output filename matches the input filename except that the extension/type may be different. Eg. Seascape.jpg would save as Seascape.tga if the outtype was tga.
By default if an output file already exists, it is not overwritten. Use the --overwrite (-w) flag to allow overwrites. To have the tool try a different filename if it aready exists, use the --autoname (-a) flag. It will append the string _NN to the name where NN is a number that keeps incrementing until no existing file is found.
Different output image types have different features and may support different parameters when saving. Here is the list of the currently implemented output file types and what parameters may be specified:
- APNG : Bits per pixel (or auto-decide) and an optional frame duration override for animated images.
- BMP: Bits per pixel or auto.
- GIF: Bits per pixel (2 to 256 colours), colour quantization method., number or loops (explicit or infinite), alpha threshold for GIFs with transparency, an optional duration override for animated GIFs, plus various parameters relating to the chosen quantization method (dither level, filter size, and sample factor).
- JPG: Quality parameter.
- PNG: Bits per pixel or auto (inspects image looking for non-opaque pixels).
- QOI: Bits per pixel or auto, colour space (linear or sRGB).
- TGA: Bits per pixel or auto, RLE encoding.
- TIFF: Bits per pixel or auto, ZLib compress, frame duration override for multi-page TIFFs.
- WEBP: Lossy or lossless image, quality or compression amount (depending on lossy/lossless), optional frame duration override for animated WEBP images.
Exit Code
The return error code is 0 for success and 1 for failure. For 0 to be returned every specified image must be successfully loaded, processed, and saved. A failure in any step for any image results in an error. By default processing continues to the next image even on a failure. If the --earlyexit (-e) flag is set, processing stops immediately on any failure. Either way, any failure returns a non-zero exit code.
Examples
tacentview.exe -cw -i tga images/ -o bmp -v 2 --op rotate[10]
In this example all images in the directory "images" that are tga files will be rotated 10 degrees anti-clockwise and than saved as bmp files. The -cw expands to -c -w. The -c means use CLI mode. The -w means overwrite existing output files. The -o specifies the image type of the output files. The -v 2 sets the verbosity level to high (0 is none, 1 is normal). Finally, the --op rotate[10] is the rotation operation.
Chaining operations together is also possible by specifying more than one operation:
tacentview.exe -cw -i tga images/ -o bmp --op rotate[10] --op channel[blend] --op contrast[0.6]
In this example the rotation is performed, then an alpha pre-multiplication blend is performed, and finally the contrast is bumped up to 0.6 (0.5 is normal). This sequence is applied to all tga files in the images folder and a separate bmp file is written for each one.
Modal Focus
All the modal dialogs have been improved. The currently selected button or widget is now outlined, buttons can be 'pressed' with Enter or Space. For example, if you press 'del' to delete a file, a modal pops up asking you to confirm. You may now press 'OK' by simply pressing the Enter key. This is similar to how OS-native modal dialogs work. The Tab key also cycles between widgets that accept keyboard input.
Clipboard
Ctrl-C and Ctrl-V now work in Tacent View. Want to copy an image and paste into GIMP or PS? This now works. The image in Tacent View will briefly flash white when the copy operation is performed.
You may also paste an image into Tacent View with Ctrl-V. In this case a new image is created with an auto-generated name. The type of the image is specified in Preferences->System->PasteType. The image type may only be a type supporting lossless encoding, as you wouldn't want to lose information simply be pasting. In any event, this behaviour allows tacent to be a sort of 'factory' where you can paste a sequence of images and have it generate new files in a format of your liking.
Regarding Linux, Ctrl-C / Ctrl-V works if using the X11 display server protocol. Wayland is not yet supported by the clipping library. Additionally, cipboard memory is not a kernel-level construct with X11/Linux. If you copy from an app in Linux, that app must remain open when you paste the clipboard into another application.
Additional Improvements
These are in addition to the features listed above and does not represent the fill list of changes:
- Fixed issue with the bottom thumbnail progress bar in the content view window not showing up for some UI sizes. It now works for all 3 UI sizes (small, medium, and large).
- Cropping handle in middle so whole cropping area can be moved around at once.
- Upgraded to ImGui 1.89.2. Made a button wrapper to handle pressing enter enter key to press.
- Keyboard nav enabled for all modal dialogs.
- Cropping dialog pan shortcuts labeled as such so they're not confused with anchors.
- Reduced the thickness and distance of nav highlight in ImGui's RenderNavHighlight.
- Tidied up the save dialog modals for the different file-types. In particular they use the help-mark more consistently and the webp slider now changes depending on whether 'lossy' is selected or not.
- Fixed scrollbar appearing too soon in metadata window when UI size medium or large.
- Fine tuned the about dialog for the 3 UI sizes.
Full Changelog: v1.0.35...v1.0.36