mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Change export functions to use image.Image
This commit is contained in:
parent
182373d3cc
commit
a0168df91f
@ -1,13 +1,19 @@
|
|||||||
|
// Copyright (c) 2023 David Vogel
|
||||||
|
//
|
||||||
|
// This software is released under the MIT License.
|
||||||
|
// https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"image"
|
||||||
"image/jpeg"
|
"image/jpeg"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func exportJPEG(stitchedImage *StitchedImage, outputPath string) error {
|
func exportJPEG(stitchedImage image.Image, outputPath string) error {
|
||||||
log.Printf("Creating output file %q.", outputPath)
|
log.Printf("Creating output file %q.", outputPath)
|
||||||
f, err := os.Create(outputPath)
|
f, err := os.Create(outputPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
|
// Copyright (c) 2023 David Vogel
|
||||||
|
//
|
||||||
|
// This software is released under the MIT License.
|
||||||
|
// https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"image"
|
||||||
"image/png"
|
"image/png"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func exportPNG(stitchedImage *StitchedImage, outputPath string) error {
|
func exportPNG(stitchedImage image.Image, outputPath string) error {
|
||||||
log.Printf("Creating output file %q.", outputPath)
|
log.Printf("Creating output file %q.", outputPath)
|
||||||
f, err := os.Create(outputPath)
|
f, err := os.Create(outputPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user