now palette project lays here
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 424 KiB |
@@ -0,0 +1,20 @@
|
|||||||
|
//go:build ignore
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"image/jpeg"
|
||||||
|
"image/png"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
img, err := jpeg.Decode(os.Stdin)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
err = png.Encode(os.Stdout, img)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"image"
|
||||||
|
|
||||||
"git.nkpl.cc/twocookedfaggots/imageutils/pkg/dithering"
|
"git.nkpl.cc/twocookedfaggots/imageutils/pkg/dithering"
|
||||||
"git.nkpl.cc/twocookedfaggots/imageutils/util"
|
"git.nkpl.cc/twocookedfaggots/imageutils/util"
|
||||||
)
|
)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 145 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Submodule
+1
Submodule pkg/palette added at e161720f1c
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package imageutils
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"image/color"
|
"image/color"
|
||||||
"errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var ParseHexColorErr = errors.New("invalid length, must be 7 or 4")
|
var ParseHexColorErr = errors.New("invalid length, must be 7 or 4")
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package imageutils
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|||||||
+8
-2
@@ -1,7 +1,13 @@
|
|||||||
package imageutils
|
package util
|
||||||
|
|
||||||
|
import (
|
||||||
|
"image"
|
||||||
|
"image/png"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
// ProcessImage takes input png image from stdin, processes it with f and outputs it to stdout.
|
// ProcessImage takes input png image from stdin, processes it with f and outputs it to stdout.
|
||||||
func ProcessStdio(f func(image.Image) image.Image) {
|
func ProcessStdio(f func(image.Image) image.Image) error {
|
||||||
img, err := png.Decode(os.Stdin)
|
img, err := png.Decode(os.Stdin)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user