|
@@ -4,7 +4,7 @@ import (
|
|
|
"encoding/binary"
|
|
"encoding/binary"
|
|
|
"fmt"
|
|
"fmt"
|
|
|
"image"
|
|
"image"
|
|
|
- "golang.org/x/image/tiff"
|
|
|
|
|
|
|
+ "github.com/corsmith/image/tiff"
|
|
|
"log"
|
|
"log"
|
|
|
"net"
|
|
"net"
|
|
|
"os"
|
|
"os"
|
|
@@ -118,7 +118,7 @@ readPackets:
|
|
|
return scanBytes, nil
|
|
return scanBytes, nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func SaveImage(data []byte, width int, height int, name string, color string, debug bool) {
|
|
|
|
|
|
|
+func SaveImage(data []byte, width int, height int, name string, color string, debug bool, resolution int) {
|
|
|
|
|
|
|
|
log.Println("Saving image...")
|
|
log.Println("Saving image...")
|
|
|
|
|
|
|
@@ -151,6 +151,7 @@ func SaveImage(data []byte, width int, height int, name string, color string, de
|
|
|
var options tiff.Options = tiff.Options{
|
|
var options tiff.Options = tiff.Options{
|
|
|
Compression: tiff.Deflate,
|
|
Compression: tiff.Deflate,
|
|
|
Predictor: true,
|
|
Predictor: true,
|
|
|
|
|
+ Resolution: uint32(resolution),
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
err = tiff.Encode(file, img, &options)
|
|
err = tiff.Encode(file, img, &options)
|