extensions
This commit is contained in:
parent
df0756941c
commit
137a832c3a
1 changed files with 3 additions and 3 deletions
|
@ -54,9 +54,9 @@ proc writeFile*(image: Image, filePath: string, fileFormat: FileFormat) =
|
||||||
proc writeFile*(image: Image, filePath: string) =
|
proc writeFile*(image: Image, filePath: string) =
|
||||||
## Writes an image to a file.
|
## Writes an image to a file.
|
||||||
let fileFormat = case splitFile(filePath).ext:
|
let fileFormat = case splitFile(filePath).ext:
|
||||||
of "png": ffPng
|
of ".png": ffPng
|
||||||
of "bmp": ffBmp
|
of ".bmp": ffBmp
|
||||||
of "jpg": ffJpg
|
of ".jpg": ffJpg
|
||||||
else:
|
else:
|
||||||
raise newException(PixieError, "Unrecognized file extension")
|
raise newException(PixieError, "Unrecognized file extension")
|
||||||
image.writeFile(filePath, fileformat)
|
image.writeFile(filePath, fileformat)
|
||||||
|
|
Loading…
Reference in a new issue