(path string)
| 417 | } |
| 418 | |
| 419 | func LoadImage(path string) (image.Image, error) { |
| 420 | file, err := os.Open(path) |
| 421 | if err != nil { |
| 422 | return nil, err |
| 423 | } |
| 424 | defer file.Close() |
| 425 | |
| 426 | m, _, err := image.Decode(file) |
| 427 | return m, err |
| 428 | } |
| 429 | |
| 430 | func ReplaceExt(path, ext string) string { |
| 431 | return path[:len(path)-len(filepath.Ext(path))] + ext |
no outgoing calls
no test coverage detected