elif colorspace.depth < 8:
# Reorder the offsets to pack multiple rows into
# a byte (meaning they share a column).
elif colorspace.depth < 8:
# Reorder the offsets to pack multiple rows into
# a byte (meaning they share a column).
+ (row % pixels_per_byte)
)
shift = (offset % pixels_per_byte) * colorspace.depth
if colorspace.reverse_pixels_in_byte:
# Reverse the shift by subtracting it from the leftmost shift
shift = (pixels_per_byte - 1) * colorspace.depth - shift
+ (row % pixels_per_byte)
)
shift = (offset % pixels_per_byte) * colorspace.depth
if colorspace.reverse_pixels_in_byte:
# Reverse the shift by subtracting it from the leftmost shift
shift = (pixels_per_byte - 1) * colorspace.depth - shift