draft work as intended :)
This commit is contained in:
@@ -3,7 +3,6 @@ package blank
|
||||
import (
|
||||
"image"
|
||||
"image/color"
|
||||
"image/draw"
|
||||
|
||||
"git.nkpl.cc/twocookedfaggots/imageutils"
|
||||
)
|
||||
|
||||
22
http/test.go
22
http/test.go
@@ -1,11 +1,21 @@
|
||||
//go:build ignore
|
||||
//go:build ignore
|
||||
|
||||
// works as i wanted
|
||||
|
||||
package main
|
||||
|
||||
import "git.nkpl.cc/twocookedfaggots/imageutils/http/blank"
|
||||
import (
|
||||
"image"
|
||||
"image/color"
|
||||
"image/png"
|
||||
"os"
|
||||
"git.nkpl.cc/twocookedfaggots/imageutils"
|
||||
"git.nkpl.cc/twocookedfaggots/imageutils/http/blank"
|
||||
)
|
||||
|
||||
func BlankFillWhiteUp(img image.Image) image.Image {
|
||||
for i := 0; i < img.Bounds().Dx(); i++ {
|
||||
img = blank.Blank(img, color.White, Up)
|
||||
img = blank.Blank(img, color.White, imageutils.Up)
|
||||
}
|
||||
return img
|
||||
}
|
||||
@@ -15,12 +25,12 @@ func ProcessImageStdio(f func(image.Image) image.Image) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
img = f(img)
|
||||
err := img.Encode(os.Stdout, img)
|
||||
img = f(img)
|
||||
err = png.Encode(os.Stdout, img)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user