Skip to content

Releases: hourinX/gdenticon

gdenticon v2.3.0

Choose a tag to compare

@hourinX hourinX released this 04 Nov 02:42

Highlights

gdenticon v2.3.0 focuses on image-generation performance, memory efficiency, and stricter library validation.

Performance

  • Reuse PNG encoder workspaces through a concurrency-safe buffer pool.
  • Optimize Paletted, RGBA, and NRGBA rectangle filling.
  • Preserve the simple fast path for narrow indexed-image cells.
  • Add comprehensive benchmarks for generation, rasterization, encoding, and parallel workloads.

For 64×64 PNG generation on an Intel Core i5-12400F:

Benchmark v2.2.0 baseline v2.3.0
Single-thread throughput ~6,300 icons/s ~30,000 icons/s
8-worker throughput ~13,000 icons/s ~155,000 icons/s
Memory per operation ~847 KiB ~4.8 KiB
Allocations per operation 71 20

Results vary by hardware and workload.

Reliability

  • Expand content-addressed cache filenames from 64-bit to 128-bit SHA-256 prefixes.
  • Validate cache extensions before creating files.
  • Reject unsupported PatternStyle values instead of silently treating them as classic.
  • Add regression coverage for concurrent PNG encoding, cache paths, raster stride handling, alpha preservation, and empty rectangles.

Documentation

  • Update the architecture diagram to reflect the current pattern-selection flow.
  • Document the Paletted, RGBA, and NRGBA raster backends.
  • Update cache filename examples for 128-bit names.

Compatibility notes

  • No public API signatures have changed.
  • Cache filenames now use 32 hexadecimal characters. Existing 16-character cache files remain harmless but will no longer be reused.
  • Invalid cache extensions and unsupported pattern-style values now return errors.
  • The CLI cache remains content-addressed: cache hits are determined from encoded output.
  • Go 1.24 or later is required.

gdenticon v2.2.0

Choose a tag to compare

@hourinX hourinX released this 02 Nov 13:59

Highlights

v2.2.0 introduces format-specific raster backends and substantially improves image encoding performance, memory usage, and allocation behavior while preserving the existing public API and concurrent safety.

GIF encoding is over 100× faster in local benchmarks, while PNG, JPEG, BMP, and TIFF also receive significant improvements.

What's new

Format-specific raster backends

Raster rendering is now separated into shared geometry and specialized pixel backends:

  • Paletted rendering for PNG and GIF
  • RGBA rendering for JPEG
  • Paletted rendering for opaque BMP and TIFF images
  • NRGBA fallback for BMP and TIFF images containing alpha
  • Shared grid geometry across all raster backends

The generation algorithm, identicon patterns, colors, and SVG output remain unchanged.

Encoding performance

Local 256×256 benchmarks on an Intel Core i5-14600KF:

Format Before After Improvement
GIF 26.43 ms 227.5 µs ~116× faster
BMP 482.7 µs 39.91 µs ~12.1× faster
TIFF 426.3 µs 51.55 µs ~8.3× faster
PNG 977.0 µs 248.7 µs ~3.9× faster
JPEG 1.431 ms 605.0 µs ~2.4× faster

Performance varies by platform, Go version, image size, and workload.

Reduced memory and allocations

  • JPEG256 allocations reduced from 65,575 to 11 per operation
  • GIF256 memory reduced from approximately 422 KB to 146 KB
  • BMP256 memory reduced from approximately 264 KB to 67 KB
  • TIFF256 memory reduced from approximately 265 KB to 74 KB
  • PNG256 output reduced from 874 bytes to 160 bytes for the benchmark image

JPEG now uses the standard library's specialized RGBA path instead of performing a generic per-pixel conversion.

Transparency handling

  • PNG preserves full palette alpha, including partial transparency
  • GIF preserves binary transparency according to the GIF format
  • BMP and TIFF use their optimized Paletted paths for opaque colors
  • BMP and TIFF retain their NRGBA paths when either color contains alpha

Concurrency and correctness

  • No shared mutable raster canvas
  • No global worker pool or task queue
  • Format-specific encoders remain safe for concurrent use with immutable icons and independent writers
  • Added pixel-level tests for opaque, transparent, and partially transparent colors
  • Added race tests for raster and encoding paths
  • Added benchmarks for speed, memory, allocations, output size, and PNG parallel throughput

Compatibility

This release does not change the public Go API and has no known source-level breaking changes.

Encoded PNG, GIF, BMP, TIFF, and JPEG bytes may differ from previous versions because the optimized encoders use different pixel representations. Decoded image geometry and colors remain equivalent according to each format's capabilities.

Applications that cache or compare encoded files byte-for-byte should regenerate those artifacts after upgrading.

Installation

Using Go:

go install github.com/hourinX/gdenticon/v2/cmd/gdenticon@v2.2.0

gdenticon v2.1.0

Choose a tag to compare

@hourinX hourinX released this 29 Oct 02:51

Highlights

v2.1.0 adds session-based cleanup to the interactive CLI and lowers the minimum supported Go version to Go 1.24.

What's new

Session-based image cleanup

Interactive mode now tracks images generated during the current session.

New commands:

  • outputs — list images generated in the current session
  • remove <number|filename|last> — remove a specific generated image
  • clean — remove all images created during the current session

Cleanup is limited to files created by the active session. Existing cached images and unrelated files are preserved.

Go 1.24 support

  • Lowered the minimum required Go version from 1.26 to 1.24
  • Updated dependencies to versions compatible with Go 1.24
  • Verified the SDK and CLI using Go 1.24

Installation

Using Go:

go install github.com/hourinX/gdenticon/v2/cmd/gdenticon@v2.1.0

gdenticon v2.0.0

Choose a tag to compare

@hourinX hourinX released this 28 Oct 09:15

gdenticon v2.0.0

gdenticon v2 introduces a redesigned generation and output architecture, multi-format image support, expanded test coverage, new branding, and an interactive CLI.

Highlights

  • Separate generation, rendering, encoding, and filesystem responsibilities
  • Support PNG, SVG, JPEG, GIF, BMP, and TIFF output
  • Add deterministic hash-derived and fixed colours
  • Add a unified Write API
  • Add strict interactive CLI mode
  • Add the gdenticon logo and designer Gopher mascot
  • Expand unit-test coverage
  • Migrate the Go module to github.com/hourinX/gdenticon/v2

Breaking changes

  • The Go module path now includes /v2
  • The previous Save and WritePNG APIs have been replaced
  • Generation now uses GenerateOptions
  • Filesystem operations are provided by pkg/gdenticon/file

Installation

go install github.com/hourinX/gdenticon/v2/cmd/gdenticon@v2.0.0

gdenticon v1.0.0

Choose a tag to compare

@hourinX hourinX released this 16 Oct 10:08

gdenticon v1.0.0

First stable release of gdenticon, a lightweight Go library for generating deterministic, customizable identicons.

Features

  • Deterministic identicon generation based on input identifiers.
  • Symmetrical grid patterns with visual balance optimization.
  • Hash-based color generation with contrast-aware color adjustment.
  • Customizable grid sizes, image dimensions, and colors.
  • PNG image generation.
  • Command-line interface for generating identicons.

Installation

go get github.com/hourinX/gdenticon@v1.0.0

For usage examples and documentation, see the [README](https://github.com/hourinX/gdenticon#readme).