Skip to content

Commit

Permalink
bugfix: TGA imagewrite was flipping middle two rows
Browse files Browse the repository at this point in the history
off by one error due to lua/terra mixup
  • Loading branch information
PyryM committed Aug 31, 2021
1 parent f6ab466 commit 4ad0b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/scripts/io/imagewrite.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function m.flip_rgba_vertical(width, height, data)
local ipos = 0
local mid = math.floor(height / 2)
local rowsize = width*4
for r = 0,mid do
for r = 0, mid-1 do
local r_mirrored = (height - 1) - r
local p0 = r*width*4
local p1 = r_mirrored*width*4
Expand Down

0 comments on commit 4ad0b09

Please sign in to comment.