Skip to content

Commit

Permalink
Ready for v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
makew0rld committed Dec 20, 2023
1 parent 422a9b4 commit 409cfa6
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: 1.21
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.17", "1.18", "1.19"]
go-version: ["1.20", "1.21"]
steps:
- name: Install Go
uses: actions/setup-go@v2
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.0] - 2022-12-20
## Changed
- Updated dither library to v2.4.0
- Increased error diffusion dithering speed by ~50%
- Reduced error diffusion dithering memory usage by ~70% (#13)

## [1.2.0] - 2022-12-20
### Changed
- Updated dither library to v2.3.0
Expand Down
4 changes: 2 additions & 2 deletions MANPAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
title: DIDDER
section: 1
header: User Manual
footer: didder v1.2.0
date: December 20, 2022
footer: didder v1.3.0
date: December 20, 2023
---

# NAME
Expand Down
83 changes: 39 additions & 44 deletions didder.1
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
.\" Automatically generated by Pandoc 2.19.2
.\" Automatically generated by Pandoc 3.1.9
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "DIDDER" "1" "December 20, 2022" "didder v1.2.0" "User Manual"
.hy
.TH "DIDDER" "1" "December 20, 2023" "didder v1.3.0" "User Manual"
.SH NAME
.PP
didder \[em] dither images
.SH SYNOPSIS
.PP
\f[B]didder\f[R] [global options] command [command options]
[arguments\&...]
.SH DESCRIPTION
.PP
Dither images with a variety of algorithms and processing options.
.PP
Images with transparency are supported, and their alpha channel is kept
Expand All @@ -38,7 +20,9 @@ input image(s).
The most important parts of this manual are highlighted in the
\f[B]TIPS\f[R] section, make sure you check it out!
.PP
Homepage: <https://github.com/makeworld-the-better-one/didder>
Homepage: \c
.UR https://github.com/makeworld-the-better-one/didder
.UE \c
.SH OPTIONS
.TP
\f[B]-i\f[R], \f[B]--in\f[R] \f[I]PATH\f[R]
Expand All @@ -52,8 +36,9 @@ The input file path can also be parsed as a glob.
This will only happen if the path contains an asterisk.
For example \f[B]-i \[aq]*.jpg\[cq]\f[R] will select all the .jpg files
in the current directory as input.
See this page for more info on glob pattern matching:
<https://golang.org/pkg/path/filepath/#Match>
See this page for more info on glob pattern matching: \c
.UR https://golang.org/pkg/path/filepath/#Match
.UE \c
.RE
.TP
\f[B]-o\f[R], \f[B]--out\f[R] \f[I]PATH\f[R]
Expand Down Expand Up @@ -81,8 +66,9 @@ W3C color names).
All colors are interpreted in the sRGB colorspace.
.RS
.PP
A list of all color names is available at
<https://www.w3.org/TR/SVG11/types.html#ColorKeywords>
A list of all color names is available at \c
.UR https://www.w3.org/TR/SVG11/types.html#ColorKeywords
.UE \c
.PP
Images are converted to grayscale automatically if the palette is
grayscale.
Expand Down Expand Up @@ -110,7 +96,11 @@ representing the image colors with the desired palette is impossible.
Instead of accuracy of color, the new goal is accuracy of luminance, or
even just accuracy of contrast.
For example, the original Nintendo Game Boy used a solely green palette:
<https://en.wikipedia.org/wiki/List_of_video_game_console_palettes#Game_Boy>.
\c
.UR
https://en.wikipedia.org/wiki/List_of_video_game_console_palettes#Game_Boy
.UE \c
\&.
By setting \f[B]--palette\f[R] to shades of gray and then
\f[B]--recolor\f[R]-ing to the desired shades of green, input images
will be converted to grayscale automatically and then dithered in one
Expand Down Expand Up @@ -301,8 +291,10 @@ Or a path to JSON for your custom matrix.
\[aq]\f[B]-\f[R]\[cq] means standard input.
.PP
Here are all the built-in ordered dithering matrices.
You can find details on these matrices here:
<https://github.com/makeworld-the-better-one/dither/blob/v2.0.0/ordered_ditherers.go>
You can find details on these matrices here: \c
.UR
https://github.com/makeworld-the-better-one/dither/blob/v2.0.0/ordered_ditherers.go
.UE \c
.IP \[bu] 2
ClusteredDot4x4
.PD 0
Expand Down Expand Up @@ -382,12 +374,13 @@ treated the same.
The JSON format (whether inline or in a file) looks like the below.
The matrix must be \[lq]rectangular\[rq], meaning each array must have
the same length.
More information how to use a custom matrix can be found here:
<https://pkg.go.dev/github.com/makeworld-the-better-one/dither/v2#OrderedDitherMatrix>
More information how to use a custom matrix can be found here: \c
.UR
https://pkg.go.dev/github.com/makeworld-the-better-one/dither/v2#OrderedDitherMatrix
.UE \c
.RE
.IP
.nf
\f[C]
.EX
{
\[dq]matrix\[dq]: [
[12, 5, 6, 13],
Expand All @@ -397,8 +390,7 @@ More information how to use a custom matrix can be found here:
],
\[dq]max\[dq]: 16
}
\f[R]
.fi
.EE
.TP
\f[B]edm\f[R] \f[I]NAME/JSON/FILE\f[R]
Error Diffusion Matrix
Expand All @@ -421,8 +413,10 @@ Or a path to JSON for your custom matrix.
\[aq]\f[B]-\f[R]\[cq] means stdin.
.PP
Here are all the built-in error diffusion matrices.
You can find details on these matrices here:
<https://github.com/makeworld-the-better-one/dither/blob/v2.0.0/error_diffusers.go>
You can find details on these matrices here: \c
.UR
https://github.com/makeworld-the-better-one/dither/blob/v2.0.0/error_diffusers.go
.UE \c
.IP \[bu] 2
Simple2D
.PD 0
Expand Down Expand Up @@ -490,7 +484,6 @@ moving down the image, instead of going left-to-right each time.
This can reduce artifacts or patterns in the noise.
.RE
.SH TIPS
.PP
Read about \f[B]--strength\f[R] if you haven\[cq]t already.
.PP
Read about \f[B]--recolor\f[R] if you haven\[cq]t already.
Expand Down Expand Up @@ -530,10 +523,10 @@ original image and will not adjust your selected palette colors.
.SH EXAMPLES
.TP
\f[B]didder --palette \[dq]black white\[rq] -i input.jpg -o test.png bayer 16x16\f[R]
This command dithers \f[V]input.jpg\f[R] using only black and white
This command dithers \f[CR]input.jpg\f[R] using only black and white
(implicitly converting the image to grayscale first), using a 16x16
Bayer matrix.
The result is written to \f[V]test.png\f[R].
The result is written to \f[CR]test.png\f[R].
.TP
\f[B]didder --palette \[dq]black white\[rq] -i input.jpg -o test.png odm ClusteredDot4x4\f[R]
Same command as above, but dithering with the preprogrammed ordered
Expand All @@ -551,8 +544,10 @@ dithering artifacts can be seen more clearly.
\f[B]didder -i input.png -o output.png -p \[dq]1E1E1E CDCDCD EDEDED FFFFFF\[rq] -r \[dq]11161e 116bcd 63b3ed e1efff\[rq] --strength 64% --brightness 20% bayer 32x32\f[R]
This command uses a blue recolor palette, one that is biased to being
darker.
The palette can be viewed at
<https://colorpeek.com/#11161e,116bcd,63b3ed,e1efff>.
The palette can be viewed at \c
.UR https://colorpeek.com/#11161e,116bcd,63b3ed,e1efff
.UE \c
\&.
The dithering palette is the grayscale version of those colors, to keep
luminance accurate.
Strength is set to 64%, which although usually recommended for Bayer
Expand All @@ -566,6 +561,6 @@ dithering and recoloring them along the way.
The GIF moves at 1 frame per second, and by default loops infinitely.
Random dithering is used, with recommended default of -0.5,0.5.
.SH REPORTING BUGS
.PP
Any bugs can be reported by creating an issue on GitHub:
<https://github.com/makeworld-the-better-one/didder>
Any bugs can be reported by creating an issue on GitHub: \c
.UR https://github.com/makeworld-the-better-one/didder
.UE \c
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/disintegration/imaging v1.6.2
github.com/makeworld-the-better-one/dither/v2 v2.3.0
github.com/makeworld-the-better-one/dither/v2 v2.4.0
github.com/urfave/cli/v2 v2.3.0
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
github.com/makeworld-the-better-one/dither/v2 v2.3.0 h1:s9wgm88KFZSzvZh9gL79tPayp5sDUGIku/1aJewxlB4=
github.com/makeworld-the-better-one/dither/v2 v2.3.0/go.mod h1:VBtN8DXO7SNtyGmLiGA7IsFeKrBkQPze1/iAeM95arc=
github.com/makeworld-the-better-one/dither/v2 v2.4.0 h1:Az/dYXiTcwcRSe59Hzw4RI1rSnAZns+1msaCXetrMFE=
github.com/makeworld-the-better-one/dither/v2 v2.4.0/go.mod h1:VBtN8DXO7SNtyGmLiGA7IsFeKrBkQPze1/iAeM95arc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// Set by compiler, see Makefile
var (
version = "v1.2.0"
version = "v1.3.0"
commit = "unknown"
builtBy = "unknown"
)
Expand Down

0 comments on commit 409cfa6

Please sign in to comment.