fix: Move utils into own folder

This commit is contained in:
Myzel394 2024-12-07 13:59:44 +01:00
parent a85865d532
commit fbc1acbeee
No known key found for this signature in database
GPG Key ID: ED20A1D1D423AF3F
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
package main
package imageutils
import (
"image"

View File

@ -6,13 +6,14 @@ import (
"image/png"
_ "image/png"
"os"
"myzel394.app/image-stuff/imageutils"
)
func main() {
// Read image
reader, _ := os.Open("./assets/surfer.png")
reader, _ := os.Open("./assets/water2.png")
rawImage, _, _ := image.Decode(reader)
readImage := ImageAnalyzer{Image: rawImage}
readImage := imageutils.ImageAnalyzer{Image: rawImage}
bounds := readImage.Bounds()
width := bounds.Max.X