mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-22 21:17:33 +00:00
Save top left coordinates when exporting DZI
This commit is contained in:
parent
93a1283188
commit
45df692b96
@ -78,6 +78,10 @@ func (d DZI) ExportDZIDescriptor(outputPath string) error {
|
||||
Width string
|
||||
Height string
|
||||
}
|
||||
TopLeft struct {
|
||||
X string
|
||||
Y string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,6 +91,8 @@ func (d DZI) ExportDZIDescriptor(outputPath string) error {
|
||||
dziDescriptor.Image.TileSize = strconv.Itoa(d.tileSize)
|
||||
dziDescriptor.Image.Size.Width = strconv.Itoa(d.stitchedImage.bounds.Dx())
|
||||
dziDescriptor.Image.Size.Height = strconv.Itoa(d.stitchedImage.bounds.Dy())
|
||||
dziDescriptor.Image.TopLeft.X = strconv.Itoa(d.stitchedImage.bounds.Min.X)
|
||||
dziDescriptor.Image.TopLeft.Y = strconv.Itoa(d.stitchedImage.bounds.Min.Y)
|
||||
|
||||
jsonEnc := json.NewEncoder(f)
|
||||
return jsonEnc.Encode(dziDescriptor)
|
||||
|
Loading…
Reference in New Issue
Block a user