Skip to content

Releases: flother/spreet

v0.11.0

05 Dec 20:53
Compare
Choose a tag to compare

What's changed

Full changelog: v0.10.0...v0.11.0

v0.10.0

29 Nov 21:13
Compare
Choose a tag to compare

What's changed

This release focused on improving Spreet's internals. Thanks @nyurik for all the hard work.

  • Breaking change: move all public identifiers to the root of the crate, e.g. spreet::error::SpreetErrorspreet::SpreetError, with the exception of resvg.
  • Update oxipng dependency to v9.0.0. This improves compression of PNG spritesheets without visual changes, but the PNGs won't be byte-to-byte compatible with spritesheets output by earlier versions of Spreet
  • Update resvg dependency to v0.36.0
  • Remove the deprecated function spreet::sprite::generate_pixmap_from_svg()
  • The spreet::sprite_name function (previously available as spreet::sprite::sprite_name) now returns Result<String, Error> instead of String, and will no longer panic
  • The spreet::get_svg_input_paths function (previously available as spreet::fs::get_svg_input_paths) now returns Result<Vec<PathBuf>, Error> instead of Vec<PathBuf>, and will no longer panic

Full changelog: v0.9.0...v0.10.0

v0.9.0

08 Oct 20:08
Compare
Choose a tag to compare

What's changed

  • Support stretchable icons (see #53)
  • Make the CLI an optional (but default) feature (#62). This speeds up the build when using Spreet as a Rust library (see README)
  • Fix bug that meant URLs in SVG <image> elements were resolved relative to the current working directory, not to the SVG itself (see #60)
  • Update resvg dependency to v0.35
  • Update clap dependency to v4.4
  • Remove Rayon dependency. This means the Spreet CLI no longer parses SVGs in parallel, but that was a fun-but-unnecessary optimisation in the first place that generally saved only a handful of milliseconds
  • Deprecated: spreet::sprite::generate_pixmap_from_svg() has been deprecated and will be removed in a future version. Use spreet::sprite::Spreet::pixmap() instead

Full changelog: v0.8.0...v0.9.0

v0.8.0

15 Jun 22:13
Compare
Choose a tag to compare

What's changed

  • Improvements to using Spreet as a Rust library (#57 and #59)
  • Optimise Oxipng usage to reduce dev dependencies (#61)
  • Optimise the main function (#56)
  • Update crunch dependency to v0.5.3
  • Update resvg dependency to v0.34
  • Update clap dependency to v4.3
  • Update multimap dependency to v0.9.0
  • Update Rayon dependency to v1.7
  • Update assert_fs dependency to v1.0.13

Note: the update to resvg brings a new image rendering algorithm. This produces smaller images and improves performance, but the PNGs won't be byte-to-byte compatible with spritesheets output by earlier versions of Spreet. There should be no visual change though.

New contributors

Full changelog: v0.7.0...v0.8.0

v0.7.0

26 Feb 22:26
Compare
Choose a tag to compare

What's changed

Full changelog: v0.6.0...v0.7.0

v0.6.0

13 Feb 21:21
Compare
Choose a tag to compare

What's changed

  • Breaking change: update Oxipng dependency to v8. Spritesheet PNGs output by Spreet are now compressed using libdeflate. This produces smaller files but the PNGs won't be byte-to-byte compatible with spritesheets output by earlier versions of Spreet. This also causes Spreet's minimum Rust version to be 1.61.0
  • Add --recursive argument, to include images in sub-directories (see #43)

Full changelog: v0.5.0...v0.6.0

v0.5.0

11 Dec 10:52
Compare
Choose a tag to compare

What's changed

  • Rasterize SVGs in parallel
  • Reduce binary size by ~20%
  • Add tutorial and benchmarks to README
  • Update clap dependency to v4
  • Update oxipng dependency to v6
  • Use tiny-skia and usvg as re-exported from resvg
  • Move predicates to dev-dependencies
  • Add CLI tests

Full changelog: v0.4.0...v0.5.0

v0.4.0

16 Aug 22:44
Compare
Choose a tag to compare

What's changed

  • Switch to crunch-rs rectangle-packing library
  • Added --minify-index-file CLI flag to remove optional whitespace from the JSON-formatted index file

Full changelog: v0.3.0...v0.4.0

New rectangle-packing library

By chance I discovered Chevy Ray Johnston's crunch-rs rectangle-packing library. I experimented with it and found that it's faster than the previous library I was using, rectangle-pack, and it produces smaller spritesheets (total pixels and file size). From version 0.4.0, Spreet uses crunch-rs to pack sprites into spritesheets. Some benchmarks are below.

Change in total pixels

Map style Spritezero pixels Spreet (rectangle-pack) pixels Spreet (crunch-rs)
osm-bright-gl-style 208,810 150,540 (-28%) 130,048 (-38%)
openstreetmap-americana 577,548 638,392 (+11%) 389,640 (-33%)
mapbox-gl-styles (basic) 271,488 348,100 (+28%) 258,064 (-5%)
mapbox-gl-whaam-style 90,944 69,696 (-23%) 59,136 (-35%)

Change in file size

Map style Spritezero file size Spreet (rectangle-pack) file size Spreet (crunch-rs) file size
osm-bright-gl-style 43,860 27,124 (-38%) 25,962 (-41%)
openstreetmap-americana 140,401 82,462 (-41%) 80,899 (-42%)
mapbox-gl-styles (basic) 76,383 43,961 (-42%) 41,546 (-46%)
mapbox-gl-whaam-style 17,342 5,423 (-69%) 5,341 (-69%)

v0.3.0

08 Aug 08:26
Compare
Choose a tag to compare

What's changed

  • Add the --unique command-line flag (see #14)
  • Optimise (reduce size of) output spritesheet PNGs using oxipng
  • Match the way spritezero-cli traverses the input directory
  • Provide a Homebrew formula tap for easy MacOS/Linux installation

Full changelog: v0.2.0...v0.3.0

v0.2.0

25 Mar 17:40
Compare
Choose a tag to compare

This is the first release of Spreet that's suitable for use in production.

What's changed

  • Resize the target bin as required, instead of hardcoding a square 1.4 times the size of the sprites
  • Trim unused transparent pixels from the spritesheet (excluding transparent pixels within sprites)
  • Ensure target bin is at least as wide/tall as the widest/tallest sprite
  • Pretty-print the JSON in the sprite index file
  • Strip symbols from binaries using Cargo
  • Add GitHub Actions workflow to draft a new release when a new tag is created
  • Use one parallel code generation unit for release
  • Bump clap Rust dependency from version 3.1.5 to version 3.1.6
  • Bump actions/checkout GitHub Actions dependency from version 2 to version 3

Complete list of commits: v0.1.0...v0.2.0