mirror of
https://github.com/Myzel394/simple-seam-carving-in-go.git
synced 2025-06-18 15:35:30 +02:00
fix: Move utils into own folder
This commit is contained in:
parent
a85865d532
commit
fbc1acbeee
@ -1,4 +1,4 @@
|
|||||||
package main
|
package imageutils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"image"
|
"image"
|
5
main.go
5
main.go
@ -6,13 +6,14 @@ import (
|
|||||||
"image/png"
|
"image/png"
|
||||||
_ "image/png"
|
_ "image/png"
|
||||||
"os"
|
"os"
|
||||||
|
"myzel394.app/image-stuff/imageutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Read image
|
// Read image
|
||||||
reader, _ := os.Open("./assets/surfer.png")
|
reader, _ := os.Open("./assets/water2.png")
|
||||||
rawImage, _, _ := image.Decode(reader)
|
rawImage, _, _ := image.Decode(reader)
|
||||||
readImage := ImageAnalyzer{Image: rawImage}
|
readImage := imageutils.ImageAnalyzer{Image: rawImage}
|
||||||
|
|
||||||
bounds := readImage.Bounds()
|
bounds := readImage.Bounds()
|
||||||
width := bounds.Max.X
|
width := bounds.Max.X
|
||||||
|
Loading…
x
Reference in New Issue
Block a user