Apps

Image

# Image Tweaker Load an image, tweak it, and save it in any supported format — all through the `image/*` stdlib pipeline (vendored libjpeg-turbo, spng, libwebp). ## Open & Save - File → Open or press o — opens a file picker (`dialog/file-open`). Navigate with arrows, `Tab` to enter a directory, type to filter, `Enter` to select. - File → Save As or press s — opens a save dialog (`dialog/file-save`). - Formats are sniffed from magic bytes (not the extension): JPEG, PNG, WebP. ## Tweaks | Action | Key | |---|---| | Resize (`800x600`, or `800` for aspect-preserving width) | e | | Crop to the rubber-band selection | c / Enter | | Rotate 90° CW / CCW / 180° | ] / [ / x | | Flip (vertical) / flop (horizontal) | f / F | | JPEG / PNG / WebP | 1 / 2 / 3 | | Quality (JPEG/WebP, 1-100) | q | ## Crop (rubber band) Drag over the image area to select a region — a box outline follows the pointer, and the status bar shows the selection size in image pixels. A press in the empty margin (letterboxing) clamps to the nearest image edge, so a drag that sweeps onto a small or fit-to-viewport image still selects. Press c (or Enter, or Image → Crop to Selection) to crop to it. A plain click (no drag), Esc, or clicking outside the image clears the selection; geometry-changing edits (resize/rotate/flip) clear it too. ## View (GL host — retro) The image is drawn at its pixel size × zoom via `draw/image`, clipped to the viewport, with proportional scrollbars to pan. | Action | Key | |---|---| | Zoom in / out | + / - | | Fit to viewport | 0 | | 100% (natural size) | z | | Pan | arrow keys | The ANSI host (retra) renders the same zoom/pan view with half-block characters. Its zoom 1.0 = one source pixel per half-block sample (roughly 10× the GL host's scale — a terminal can't know its client's font metrics), and the scrollbars/pan work identically. ## Show off - b prints a base64 snippet of the current encode (`image/base64`). - The status bar shows dimensions, source → output format, quality, and zoom. ## Supported formats Supported formats: PNG, JPEG, WebP (via libjpeg-turbo, spng, libwebp).