mirror of
https://github.com/KrisKennaway/ii-pix.git
synced 2025-02-07 08:30:46 +00:00
Fix a bug with palette depths < 8
This commit is contained in:
parent
0f1ec6f6f2
commit
1ed565ff8d
@ -66,7 +66,7 @@ cdef inline unsigned char shift_pixel_window(
|
||||
Returns: n-bit value representing shifted pixel window
|
||||
"""
|
||||
cdef unsigned char window_mask = 0xff >> (8 - window_width)
|
||||
return ((last_pixels >> shift_right_by) | (next_pixels << (8 - shift_right_by))) & window_mask
|
||||
return ((last_pixels >> shift_right_by) | (next_pixels << (window_width - shift_right_by))) & window_mask
|
||||
|
||||
|
||||
# Look ahead a number of pixels and compute choice for next pixel with lowest total squared error after dithering.
|
||||
|
Loading…
x
Reference in New Issue
Block a user