rename
This commit is contained in:
parent
e56ad9e403
commit
cf81556100
2 changed files with 3 additions and 3 deletions
|
@ -418,8 +418,8 @@ proc applyOpacity*(target: Image | Mask, opacity: float32) {.raises: [].} =
|
|||
|
||||
proc invert*(image: Image) {.raises: [].} =
|
||||
## Inverts all of the colors and alpha.
|
||||
when allowSimd and compiles(invertSimd):
|
||||
invertSimd(
|
||||
when allowSimd and compiles(invertImageSimd):
|
||||
invertImageSimd(
|
||||
cast[ptr UncheckedArray[ColorRGBX]](image.data[0].addr),
|
||||
image.data.len
|
||||
)
|
||||
|
|
|
@ -231,7 +231,7 @@ when defined(amd64):
|
|||
for i in i ..< len:
|
||||
dst[i] = src[i].a
|
||||
|
||||
proc invertSimd*(data: ptr UncheckedArray[ColorRGBX], len: int) =
|
||||
proc invertImageSimd*(data: ptr UncheckedArray[ColorRGBX], len: int) =
|
||||
var i: int
|
||||
let vec255 = mm_set1_epi8(cast[int8](255))
|
||||
for _ in 0 ..< len div 16:
|
||||
|
|
Loading…
Reference in a new issue