resample-dithering wip

This commit is contained in:
minjaesong
2022-04-06 18:04:41 +09:00
parent 4c19e19b8a
commit ffad375f23
3 changed files with 80 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ println(`dim: ${imgw}x${imgh}`)
println(`converting to displayable format...`)
// convert colour
graphics.imageToDisplayableFormat(imageData, -1048577, imgw*imgh, 4)
graphics.imageToDisplayableFormat(imageData, -1048577, imgw, imgh, 4, true)
sys.free(imageData)
sys.free(infile)

File diff suppressed because one or more lines are too long

View File

@@ -1752,6 +1752,10 @@ void main() {
-286331137,
0
)
val DEFAULT_PALETTE_NUMBERS = DEFAULT_PALETTE.map { // [[r,g,b,a], [r,g,b,a], [r,g,b,a], ...]
intArrayOf(it.ushr(24).and(255), it.ushr(16).and(255), it.ushr(9).and(255), it.and(255))
}
}
}