diff --git a/README.md b/README.md index be56c66..479b93f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ ![](./docs/logo/DitheredPunk.png) # 💀 DitherPunk.jl 💀 -| **Documentation** | **Build Status** | -|:--------------------------------------------------------------------- |:----------------------------------------------------- | -| [![][docs-stab-img]][docs-stab-url] [![][docs-dev-img]][docs-dev-url] | [![][ci-img]][ci-url] [![][codecov-img]][codecov-url] | +| **Documentation** | **Build Status** | +|:--------------------------------------------------------------------- |:------------------------------------------------------------------------------- | +| [![][docs-stab-img]][docs-stab-url] [![][docs-dev-img]][docs-dev-url] | [![][ci-img]][ci-url] [![][codecov-img]][codecov-url] [![][aqua-img]][aqua-url] | -A dithering / digital halftoning package inspired by Lucas Pope's [Obra Dinn](https://obradinn.com) and [Surma's blogpost](https://surma.dev/things/ditherpunk/) of the same name. -**[Check out the gallery](https://JuliaImages.github.io/DitherPunk.jl/stable/generated/gallery_images/)** for an overview of all currently implemented algorithms. +A dithering / digital halftoning package +inspired by Lucas Pope's [Obra Dinn](https://obradinn.com) +and [Surma's blogpost](https://surma.dev/things/ditherpunk/) of the same name. +**[Check out the gallery](https://JuliaImages.github.io/DitherPunk.jl/stable/generated/gallery_images/)** +for an overview of all currently implemented algorithms. ## Installation To install this package and its dependencies, open the Julia REPL and run @@ -38,7 +41,8 @@ If no color palette is provided, DitherPunk will apply binary dithering to each Any of the [29 implemented algorithms][alg-list-url] can be used. ### Color dithering -All error diffusion, ordered dithering and halftoning methods support custom color palettes. Define your own palette or use those from [ColorSchemes.jl](https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue): +All error diffusion, ordered dithering and halftoning methods support custom color palettes. +Define your own palette or use those from [ColorSchemes.jl](https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue): ```julia using ColorSchemes @@ -123,7 +127,7 @@ Check out our [talk at JuliaCon 2022][juliacon-url] for a demonstration of the p * `ShiauFan2` * `SimpleErrorDiffusion` * Ordered dithering: - * `Bayer` (default level = 1) + * `Bayer` * Halftoning: * `ClusteredDots` * `CentralWhitePoint` @@ -147,7 +151,8 @@ Check out our [talk at JuliaCon 2022][juliacon-url] for a demonstration of the p ___ -**Share your creations in the [discussions tab](https://github.com/JuliaImages/DitherPunk.jl/discussions/categories/show-and-tell) and leave a GitHub Issue if you know of any cool algorithms you'd like to see implemented! 🔬🔧** +**Share your creations in the [discussions tab](https://github.com/JuliaImages/DitherPunk.jl/discussions/categories/show-and-tell) +and leave a GitHub Issue if you know of any cool algorithms you'd like to see implemented! 🔬🔧** [docs-stab-img]: https://img.shields.io/badge/docs-stable-blue.svg [docs-stab-url]: https://JuliaImages.github.io/DitherPunk.jl/stable @@ -158,6 +163,9 @@ ___ [ci-img]: https://github.com/JuliaImages/DitherPunk.jl/workflows/CI/badge.svg [ci-url]: https://github.com/JuliaImages/DitherPunk.jl/actions +[aqua-img]: https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg +[aqua-url]: https://github.com/JuliaTesting/Aqua.jl + [codecov-img]: https://codecov.io/gh/JuliaImages/DitherPunk.jl/branch/master/graph/badge.svg [codecov-url]: https://codecov.io/gh/JuliaImages/DitherPunk.jl diff --git a/test/Project.toml b/test/Project.toml index e25a2e9..5688ada 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4" ImageBase = "c817782e-172a-44cc-b673-b171935fbb9e" ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19" diff --git a/test/runtests.jl b/test/runtests.jl index 7f88eb1..ad3be25 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,13 @@ using DitherPunk using Test +using Aqua using ImageBase: Gray +# Run Aqua.jl quality assurance tests +Aqua.test_all(DitherPunk; ambiguities=false) +Aqua.test_ambiguities([DitherPunk, Core]) + +# Run package tests function gradient_image(height, width) row = reshape(range(0; stop=1, length=width), 1, width) grad = Gray.(vcat(repeat(row, height))) # Linear gradient