Contents

ryanfrancesconi/spfk-image

Pixel-level image work for Swift, over Core Image and ImageIO: encoding, decoding, resizing and

Features

  • Adjusting — ImageAdjustmentDescription is a color adjustment stored as slider positions, and

ImageAdjustmentRenderer applies it through Core Image: render(:source:) for a preview bitmap, and renderFile(:source:destination:quality:) to write a new file in the source's format that keeps its metadata, orientation and auxiliary images (gain maps, depth, mattes).

  • Encoding — export(utType:to:) writes PNG, JPEG, HEIF or TIFF through CIContext, and

dataRepresentation(utType:dpi:compression:excludeGPSData:otherOptions:) returns encoded data through ImageIO. Neither carries the source file's metadata: they encode a bare image.

  • Decoding — CGImage.create(from:) and CGImage.contentsOf(url:) decode the first image of a

file or data blob.

  • Resizing — scaled(to:) redraws at a target size with high-quality interpolation.
  • Byte identity — fingerprint hashes geometry plus the whole pixel buffer, and

hasEqualPixelData(_:) compares buffers directly. The right question for a store deduplicating what it has already written.

  • Perceptual identity — perceptualHash is a 64-bit difference hash, compared with

perceptualDistance(to:) or isPerceptuallySimilar(to:tolerance:). The right question for "is this the same picture", across re-encoding and resizing.

Dependencies

| Package | Description | |---------|-------------| | spfk-base | Core utilities and extensions |

Requirements

  • Platforms: macOS 13+, iOS 16+
  • Swift: 6.2+

About

Spongefork is the personal software projects of musician and developer Ryan Francesconi. Dedicated to creative sound manipulation, his first application, Spongefork, was released in 1999 for macOS 8. From 2026, Spongefork returns as his software container for more musical experimentation. In addition to software releases, open source components can be found on his GitHub page.

Package Metadata

Repository: ryanfrancesconi/spfk-image

Default branch: main

README: README.md