mirror of https://github.com/adamdruppe/arsd.git
fix from ketmar
This commit is contained in:
parent
89718d996e
commit
eabf6032a2
2
png.d
2
png.d
|
@ -1913,7 +1913,7 @@ immutable(ubyte)[] unfilter(ubyte filterType, in ubyte[] data, in ubyte[] previo
|
|||
foreach(i; 0 .. arr.length) {
|
||||
auto prev = i < bpp ? 0 : arr[i - bpp];
|
||||
arr[i] += cast(ubyte)
|
||||
/*std.math.floor*/( cast(int) (prev + previousLine[i]) / 2);
|
||||
/*std.math.floor*/( cast(int) (prev + (previousLine.length ? previousLine[i] : 0)) / 2);
|
||||
}
|
||||
|
||||
return assumeUnique(arr);
|
||||
|
|
Loading…
Reference in New Issue