to save up a progress
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"git.nkpl.cc/twocookedfaggots/imageutils/pkg/mirror"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cmp := func(v reflect.Value) {
|
||||
switch v := reflect.f {
|
||||
case
|
||||
}
|
||||
}
|
||||
instance := &mirror.Mirror{}
|
||||
value := reflect.ValueOf(instance).Elem()
|
||||
for i := 0; i < value.NumField(); i++ {
|
||||
value.Type().Field(i)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
addr := ":8080"
|
||||
http.HandleFunc("/",
|
||||
func(w http.ResponseWriter, req *http.Request) {
|
||||
log.Println(req.URL.Query())
|
||||
})
|
||||
log.Println("listening on", addr)
|
||||
log.Fatal(http.ListenAndServe(addr, nil))
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
image modifyer consists of:
|
||||
input image
|
||||
options
|
||||
output (modifyed image)
|
||||
usually Encoder
|
||||
@@ -0,0 +1,22 @@
|
||||
package mirror
|
||||
|
||||
import (
|
||||
"image"
|
||||
"image/color"
|
||||
)
|
||||
|
||||
type Mirror struct {
|
||||
image.Image
|
||||
}
|
||||
|
||||
func (m Mirror) ColorModel() color.Model {
|
||||
return m.Image.ColorModel()
|
||||
}
|
||||
|
||||
func (m Mirror) Bounds() image.Rectangle {
|
||||
return m.Image.Bounds()
|
||||
}
|
||||
|
||||
func (m Mirror) At(x, y int) color.Color {
|
||||
return m.Image.At(m.Bounds().Dx()-x, y)
|
||||
}
|
||||
Reference in New Issue
Block a user