使用gamma校正提升jpg亮度
This commit is contained in:
45
pkg/producer/report.go
Normal file
45
pkg/producer/report.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package imageproc
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Report represents the root XML element
|
||||
type Report struct {
|
||||
XMLName xml.Name `xml:"report"`
|
||||
Satellite string `xml:"satellite,attr"`
|
||||
Sensor string `xml:"sensor,attr"`
|
||||
ProductLevel string `xml:"productLevel,attr"`
|
||||
Scenes []ReportScene `xml:"scene"`
|
||||
}
|
||||
|
||||
// Scene represents each scene in the report
|
||||
type ReportScene struct {
|
||||
Name string `xml:"name,attr"`
|
||||
TiffData string `xml:"tiffData"`
|
||||
TfwData string `xml:"tfwData"`
|
||||
RpbData string `xml:"rpbData"`
|
||||
BrowserData string `xml:"browserData"`
|
||||
BrowserRpbData string `xml:"browserRpbData"`
|
||||
ThumbData string `xml:"thumbData"`
|
||||
ShpData string `xml:"shpData"`
|
||||
ShxData string `xml:"shxData"`
|
||||
DbfData string `xml:"dbfData"`
|
||||
MetaData string `xml:"metaData"`
|
||||
QualityData string `xml:"qualityData"`
|
||||
}
|
||||
|
||||
func WriteReport(report *Report, filename string) error {
|
||||
output, err := xml.MarshalIndent(report, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = os.WriteFile(filename, output, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user