Browse Source

Ready for v1.3.0

pull/17/head v1.3.0
makeworld 2 years ago
parent
commit
409cfa6ce7
No known key found for this signature in database
GPG Key ID: 7DE9FA10A6B58CA5
  1. 2
      .github/workflows/goreleaser.yml
  2. 2
      .github/workflows/test.yml
  3. 6
      CHANGELOG.md
  4. 4
      MANPAGE.md
  5. 83
      didder.1
  6. 2
      go.mod
  7. 4
      go.sum
  8. 2
      main.go

2
.github/workflows/goreleaser.yml

@ -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:

2
.github/workflows/test.yml

@ -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

6
CHANGELOG.md

@ -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

4
MANPAGE.md

@ -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

83
didder.1

@ -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
@ -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]
@ -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]
@ -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.
@ -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
@ -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
@ -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],
@ -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
@ -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
@ -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.
@ -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
@ -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
@ -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
go.mod

@ -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
go.sum

@ -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=

2
main.go

@ -10,7 +10,7 @@ import (
// Set by compiler, see Makefile
var (
version = "v1.2.0"
version = "v1.3.0"
commit = "unknown"
builtBy = "unknown"
)

Loading…
Cancel
Save