Skip to content

Commit

Permalink
Merge pull request #201 from timotheecour/pr_fix_pixie_D20210519T113112
Browse files Browse the repository at this point in the history
fix pixie for nim-lang/Nim#18050
  • Loading branch information
treeform authored May 23, 2021
2 parents 277c14f + 1ec7cef commit fc557e3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pixie/images.nim
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,10 @@ proc blur*(

for xx in max(x - radius, image.width) .. x + radius:
values += outOfBounds * kernel[xx - x + radius]

blurX.setRgbaUnsafe(y, x, values.rgbx())
blurX.setRgbaUnsafe(y, x, rgbx(values))
# this would also work (see: `limitations of method call syntax`)
# `mixin rgbx`
# blurX.setRgbaUnsafe(y, x, values.rgbx)

# Blur in the Y direction.
for y in 0 ..< image.height:
Expand All @@ -412,7 +414,7 @@ proc blur*(
for yy in max(y - radius, image.height) .. y + radius:
values += outOfBounds * kernel[yy - y + radius]

image.setRgbaUnsafe(x, y, values.rgbx())
image.setRgbaUnsafe(x, y, rgbx(values))

proc newMask*(image: Image): Mask =
## Returns a new mask using the alpha values of the parameter image.
Expand Down

0 comments on commit fc557e3

Please sign in to comment.