pixieUseStb

This commit is contained in:
Ryan Oldenburg 2021-01-21 23:34:34 -06:00
parent 773036a3ba
commit ddabf803a3
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
import pixie/images, pixie/common import pixie/images, pixie/common
when defined(useStb): when defined(pixieUseStb):
import pixie/fileformats/stb_image/stb_image import pixie/fileformats/stb_image/stb_image
const const
@ -8,8 +8,8 @@ const
proc decodeJpg*(data: seq[uint8]): Image = proc decodeJpg*(data: seq[uint8]): Image =
## Decodes the JPEG into an Image. ## Decodes the JPEG into an Image.
when not defined(useStb): when not defined(pixieUseStb):
raise newException(PixieError, "Decoding JPG requires -d:useStb") raise newException(PixieError, "Decoding JPG requires -d:pixieUseStb")
else: else:
var var
width: int width: int

View file

@ -1,4 +1,4 @@
when defined(useStb): when defined(pixieUseStb):
import pixie/fileformats/jpg import pixie/fileformats/jpg
let let