summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/sheet.go b/sheet.go
index 56a0ba9..aa653f8 100644
--- a/sheet.go
+++ b/sheet.go
@@ -257,13 +257,12 @@ func (f *File) GetSheetMap() map[int]string {
// SetSheetBackground provides function to set background picture by given sheet
// index.
func (f *File) SetSheetBackground(sheet, picture string) error {
- var supportTypes = map[string]string{".gif": ".gif", ".jpg": ".jpeg", ".jpeg": ".jpeg", ".png": ".png"}
var err error
// Check picture exists first.
if _, err = os.Stat(picture); os.IsNotExist(err) {
return err
}
- ext, ok := supportTypes[path.Ext(picture)]
+ ext, ok := supportImageTypes[path.Ext(picture)]
if !ok {
return errors.New("Unsupported image extension")
}