Remove IP of pod
This commit is contained in:
parent
d915863039
commit
670f4609e1
17
render.go
17
render.go
@ -8,17 +8,12 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"math"
|
"math"
|
||||||
"math/cmplx"
|
"math/cmplx"
|
||||||
"net"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"golang.org/x/image/font"
|
|
||||||
"golang.org/x/image/font/basicfont"
|
|
||||||
"golang.org/x/image/math/fixed"
|
|
||||||
|
|
||||||
"deadbeef.codes/steven/mandelmapper/palette"
|
"deadbeef.codes/steven/mandelmapper/palette"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -121,10 +116,11 @@ func renderTile(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
ip := GetOutboundIP()
|
/*
|
||||||
addLabel(img, 20, 30, fmt.Sprintf("rendered by \n%s", ip.String()))
|
ip := GetOutboundIP()
|
||||||
//addLabel(img, 20, 30, fmt.Sprintf("%s/%s/%s.png", components[1], components[2], components[3]))
|
addLabel(img, 20, 30, fmt.Sprintf("rendered by \n%s", ip.String()))
|
||||||
|
//addLabel(img, 20, 30, fmt.Sprintf("%s/%s/%s.png", components[1], components[2], components[3]))
|
||||||
|
*/
|
||||||
w.Header().Set("Content-Type", "image/png")
|
w.Header().Set("Content-Type", "image/png")
|
||||||
png.Encode(w, img)
|
png.Encode(w, img)
|
||||||
}
|
}
|
||||||
@ -203,7 +199,7 @@ func linearInterpolation(c1, c2, mu uint32) uint32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Adds a text label to an image
|
//Adds a text label to an image
|
||||||
|
/*
|
||||||
func addLabel(img *image.RGBA, x, y int, label string) {
|
func addLabel(img *image.RGBA, x, y int, label string) {
|
||||||
col := color.RGBA{255, 255, 255, 255}
|
col := color.RGBA{255, 255, 255, 255}
|
||||||
point := fixed.Point26_6{fixed.Int26_6(x * 64), fixed.Int26_6(y * 64)}
|
point := fixed.Point26_6{fixed.Int26_6(x * 64), fixed.Int26_6(y * 64)}
|
||||||
@ -228,3 +224,4 @@ func GetOutboundIP() net.IP {
|
|||||||
|
|
||||||
return localAddr.IP
|
return localAddr.IP
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user