Skip to content

Squint 0.5.0

Pre-release
Pre-release

Choose a tag to compare

@TheBenMeadows TheBenMeadows released this 14 Sep 04:26
8a9da01

WebP and AVIF are read. Neither could be opened at all before this, so a picture from a browser or a newer phone was a file Squint had nothing to say about. Both now go through the same door HEIC does: decoded, and written as a JPEG beside the original by Shrink for Email and Shrink for Social. Remove Location Data accepts both and rewrites them as themselves, so a WebP stays a WebP with its EXIF and XMP gone and its colour profile kept.

An animated WebP is refused rather than converted. Every decoder hands back the first frame and Squint has no animated encoder to put the rest back, so a conversion would quietly throw away everything after frame one. The same now holds for an AVIF image sequence, which macOS would otherwise decode to a single still. Stripping either still works and leaves the frames alone.

SVG, WebP and AVIF appear in the Finder menu. SVG was readable in 0.4.0 from the command line only, because no menu entry ever declared the type; the same was true of WebP and AVIF the moment they were added. Two lists in two files decide whether an entry appears and whether the work is then done, and both were missing these formats. AVIF had to be named in its own right: it does not conform to public.heif, and neither does public.heic — both conform to public.heif-standard, so the entries already there covered nothing else.

A colour profile stored in a WebP's ICCP chunk is carried into the JPEG. Without that a Display P3 picture arrives untagged, is read as sRGB, and comes out visibly flat.

Two crashes are gone. A file of twelve to fifteen bytes beginning with ftyp — a truncated download, or anything at all that a right-click reaches — could panic the engine while its container was being identified. And a HEIC or AVIF declaring a box size near the top of the address space sent the structure walk backwards instead of forwards, consuming memory until the machine gave up; that one has been reachable since HEIC support arrived.

Four defects came out of an outside review of this work, each reproduced as a failing test before the code was changed. The record, including where the reviewers were wrong, is in review/webp-avif/.

One limitation worth stating: a WebP has no orientation field of its own, and the only place a turn can be recorded is inside its EXIF chunk, which nothing here reads yet. Such a picture converts the way its pixels are stored rather than the way it is meant to be seen.

Changes: #56, #57.

Not notarized. macOS will refuse to open it on first launch: System Settings, Privacy & Security, scroll down, Open Anyway. Control-click and Open no longer bypasses Gatekeeper on Sequoia and later. Requires macOS 14.

SHA-256

10d1e1d08525099479bd1d6415c3bebb4eaa0147f5f397a44aee70c746b1a321  Squint-0.5.0.dmg
710205beefc0da990d77b067f881d414e631471993fd64d1ff8ad48eae275ee3  Squint-0.5.0.zip