Skip to main content

Module bytes

Module bytes 

Source

Functions§

abgr_to_bgr
Alias for argb_to_rgb — ABGR→BGR drops the same leading byte.
abgr_to_bgr_strided
Alias for argb_to_rgb_strided — ABGR→BGR drops the same leading byte.
abgr_to_bgra
Alias for argb_to_rgba — ABGR→BGRA uses the same rotate.
abgr_to_bgra_inplace
Alias for argb_to_rgba_inplace — ABGR→BGRA uses the same rotate.
abgr_to_bgra_inplace_strided
Alias for argb_to_rgba_inplace_strided — ABGR→BGRA uses the same rotate.
abgr_to_bgra_strided
Alias for argb_to_rgba_strided.
abgr_to_rgb
Alias for argb_to_bgr — ABGR→RGB drops + reverses same as ARGB→BGR.
abgr_to_rgb_strided
Alias for argb_to_bgr_strided — ABGR→RGB drops + reverses.
abgr_to_rgba
Alias for argb_to_bgra — ABGR↔RGBA is the same reverse.
abgr_to_rgba_inplace
Alias for argb_to_bgra_inplace — ABGR↔RGBA is the same reverse.
abgr_to_rgba_inplace_strided
Alias for argb_to_bgra_inplace_strided — ABGR↔RGBA is the same reverse.
abgr_to_rgba_strided
Alias for argb_to_bgra_strided — ABGR↔RGBA is the same reverse.
argb_to_bgr
ARGB (4 bytes/px) → BGR (3 bytes/px). Drops alpha, reverses channel order.
argb_to_bgr_strided
ARGB → BGR between strided buffers. Drops alpha, reverses channel order.
argb_to_bgra
Copy 4bpp pixels, reversing each pixel’s bytes: [A,R,G,B]→[B,G,R,A] (ARGB→BGRA).
argb_to_bgra_inplace
Reverse each pixel’s 4 bytes: [A,R,G,B]→[B,G,R,A] (ARGB→BGRA).
argb_to_bgra_inplace_strided
Reverse each pixel’s 4 bytes in a strided buffer (ARGB↔BGRA).
argb_to_bgra_strided
Copy 4bpp pixels between strided buffers, reversing bytes (ARGB→BGRA).
argb_to_rgb
ARGB (4 bytes/px) → RGB (3 bytes/px). Drops the leading alpha byte.
argb_to_rgb_strided
ARGB → RGB between strided buffers. Drops the leading alpha.
argb_to_rgba
Copy 4bpp pixels, rotating each left by 1 byte: [A,R,G,B]→[R,G,B,A] (ARGB→RGBA).
argb_to_rgba_inplace
Rotate each pixel’s bytes left by 1: [A,R,G,B]→[R,G,B,A] (ARGB→RGBA).
argb_to_rgba_inplace_strided
Rotate each pixel’s bytes left by 1 in a strided buffer (ARGB→RGBA).
argb_to_rgba_strided
Copy 4bpp pixels between strided buffers, rotating left by 1 (ARGB→RGBA).
bgr_to_abgr
BGR→ABGR = same byte shuffle as RGB→ARGB.
bgr_to_abgr_strided
BGR→ABGR = same byte shuffle as RGB→ARGB.
bgr_to_argb
BGR→ARGB = same byte shuffle as RGB→ABGR.
bgr_to_argb_strided
BGR→ARGB = same byte shuffle as RGB→ABGR.
bgr_to_bgra
BGR→BGRA = same byte shuffle as RGB→RGBA.
bgr_to_bgra_strided
BGR→BGRA = same byte shuffle as RGB→RGBA.
bgr_to_rgb
Alias for rgb_to_bgr.
bgr_to_rgb_inplace
Alias for rgb_to_bgr_inplace.
bgr_to_rgb_inplace_strided
Alias for rgb_to_bgr_inplace_strided.
bgr_to_rgb_strided
Alias for rgb_to_bgr_strided.
bgr_to_rgba
BGR→RGBA = same byte shuffle as RGB→BGRA.
bgr_to_rgba_strided
BGR→RGBA = same byte shuffle as RGB→BGRA.
bgra_to_abgr
Alias for rgba_to_argb — BGRA→ABGR uses the same rotate.
bgra_to_abgr_inplace
Alias for rgba_to_argb_inplace — BGRA→ABGR uses the same rotate.
bgra_to_abgr_inplace_strided
Alias for rgba_to_argb_inplace_strided — BGRA→ABGR uses the same rotate.
bgra_to_abgr_strided
Alias for rgba_to_argb_strided.
bgra_to_argb
Alias for argb_to_bgra — reverse is symmetric.
bgra_to_argb_inplace
Alias for argb_to_bgra_inplace — reverse is symmetric.
bgra_to_argb_inplace_strided
Alias for argb_to_bgra_inplace_strided — reverse is symmetric.
bgra_to_argb_strided
Alias for argb_to_bgra_strided — reverse is symmetric.
bgra_to_bgr
BGRA→BGR = same as RGBA→RGB (drop alpha, keep order).
bgra_to_bgr_strided
BGRA→BGR = same as RGBA→RGB (drop alpha, keep order).
bgra_to_rgb
4bpp → 3bpp, dropping alpha and reversing bytes 0↔2 (BGRA→RGB, RGBA→BGR).
bgra_to_rgb_strided
BGRA (4 bytes/px) → RGB (3 bytes/px) between strided buffers, dropping alpha + swapping.
bgra_to_rgba
Alias for rgba_to_bgra — same swap operation.
bgra_to_rgba_inplace
Alias for rgba_to_bgra_inplace — same swap operation.
bgra_to_rgba_inplace_strided
Alias for rgba_to_bgra_inplace_strided — same swap operation.
bgra_to_rgba_strided
Alias for rgba_to_bgra_strided — same swap operation.
fill_alpha_abgr
Alias for fill_alpha_argb — ABGR has alpha in the same position.
fill_alpha_abgr_strided
Alias for fill_alpha_argb_strided.
fill_alpha_argb
Set the alpha channel (byte 0) to 255 for every 4bpp pixel.
fill_alpha_argb_strided
Set alpha (byte 0) to 255 for every 4bpp pixel in a strided buffer (XRGB→ARGB).
fill_alpha_bgra
Alias for fill_alpha_rgba.
fill_alpha_bgra_strided
Alias for fill_alpha_rgba_strided.
fill_alpha_rgba
Set the alpha channel (byte 3) to 255 for every 4bpp pixel.
fill_alpha_rgba_strided
Set alpha (byte 3) to 255 for every 4bpp pixel in a strided buffer.
fill_alpha_xbgr
Alias for fill_alpha_argb — XBGR has alpha in the same position.
fill_alpha_xbgr_strided
Alias for fill_alpha_argb_strided.
fill_alpha_xrgb
Alias for fill_alpha_argb.
fill_alpha_xrgb_strided
Alias for fill_alpha_argb_strided.
gray_alpha_to_abgr
Alias for gray_alpha_to_argb — R=G=B so output is identical to ABGR.
gray_alpha_to_abgr_strided
Alias for gray_alpha_to_argb_strided — R=G=B so identical to ABGR.
gray_alpha_to_argb
GrayAlpha (2 bytes/px) → ARGB (4 bytes/px). R=G=B=gray, alpha first.
gray_alpha_to_argb_strided
GrayAlpha → ARGB between strided buffers. Alpha first, R=G=B=gray.
gray_alpha_to_bgra
Alias for gray_alpha_to_rgba — R=G=B so output is identical.
gray_alpha_to_bgra_strided
Alias for gray_alpha_to_rgba_strided — R=G=B so output is identical.
gray_alpha_to_rgba
GrayAlpha (2 bytes/px) → RGBA/BGRA (4 bytes/px). R=G=B=gray.
gray_alpha_to_rgba_strided
GrayAlpha (2 bytes/px) → RGBA (4 bytes/px) between strided buffers. R=G=B=gray.
gray_to_abgr
Alias for gray_to_argb — R=G=B so output is identical to ABGR.
gray_to_abgr_strided
Alias for gray_to_argb_strided — R=G=B so identical to ABGR.
gray_to_argb
Gray (1 byte/px) → ARGB (4 bytes/px). A=255, R=G=B=gray.
gray_to_argb_strided
Gray → ARGB between strided buffers. A=255, R=G=B=gray.
gray_to_bgra
Alias for gray_to_rgba — R=G=B so output is identical.
gray_to_bgra_strided
Alias for gray_to_rgba_strided — R=G=B so output is identical.
gray_to_rgba
Gray (1 byte/px) → RGBA/BGRA (4 bytes/px). R=G=B=gray, alpha=255.
gray_to_rgba_strided
Gray (1 byte/px) → RGBA (4 bytes/px) between strided buffers. R=G=B=gray, alpha=255.
rgb_to_abgr
RGB (3 bytes/px) → ABGR (4 bytes/px). Reverses channel order, alpha=255 prepended.
rgb_to_abgr_strided
RGB → ABGR between strided buffers. Alpha=255, channels reversed.
rgb_to_argb
RGB (3 bytes/px) → ARGB (4 bytes/px). Alpha=255, prepended.
rgb_to_argb_strided
RGB → ARGB between strided buffers. Alpha=255, prepended.
rgb_to_bgr
Copy 3bpp pixels, swapping R↔B (RGB→BGR or BGR→RGB).
rgb_to_bgr_inplace
Swap R↔B in-place for 3bpp pixels (RGB↔BGR).
rgb_to_bgr_inplace_strided
Swap R↔B in-place for a strided 3bpp image (RGB↔BGR).
rgb_to_bgr_strided
Copy 3bpp pixels between strided buffers, swapping R↔B (RGB→BGR or vice versa).
rgb_to_bgra
RGB (3 bytes/px) → BGRA (4 bytes/px). Reverses channel order, alpha=255.
rgb_to_bgra_strided
RGB (3 bytes/px) → BGRA (4 bytes/px) between strided buffers. Alpha=255.
rgb_to_rgba
RGB (3 bytes/px) → RGBA (4 bytes/px). Keeps channel order, alpha=255.
rgb_to_rgba_strided
RGB (3 bytes/px) → RGBA (4 bytes/px) between strided buffers. Alpha=255.
rgba_to_abgr
Alias for argb_to_bgra — RGBA↔ABGR is the same reverse.
rgba_to_abgr_inplace
Alias for argb_to_bgra_inplace — RGBA↔ABGR is the same reverse.
rgba_to_abgr_inplace_strided
Alias for argb_to_bgra_inplace_strided — RGBA↔ABGR is the same reverse.
rgba_to_abgr_strided
Alias for argb_to_bgra_strided — RGBA↔ABGR is the same reverse.
rgba_to_argb
Copy 4bpp pixels, rotating each right by 1 byte: [R,G,B,A]→[A,R,G,B] (RGBA→ARGB).
rgba_to_argb_inplace
Rotate each pixel’s bytes right by 1: [R,G,B,A]→[A,R,G,B] (RGBA→ARGB).
rgba_to_argb_inplace_strided
Rotate each pixel’s bytes right by 1 in a strided buffer (RGBA→ARGB).
rgba_to_argb_strided
Copy 4bpp pixels between strided buffers, rotating right by 1 (RGBA→ARGB).
rgba_to_bgr
RGBA→BGR = same as BGRA→RGB (drop alpha + swap).
rgba_to_bgr_strided
RGBA→BGR = same as BGRA→RGB (drop alpha + swap).
rgba_to_bgra
Copy 4bpp pixels, swapping B↔R (RGBA→BGRA or BGRA→RGBA).
rgba_to_bgra_inplace
Swap B↔R channels in-place for 4bpp pixels (RGBA↔BGRA).
rgba_to_bgra_inplace_strided
Swap B↔R in-place for a strided 4bpp image (RGBA↔BGRA).
rgba_to_bgra_strided
Copy 4bpp pixels between strided buffers, swapping B↔R (RGBA→BGRA or vice versa).
rgba_to_rgb
4bpp → 3bpp by dropping byte 3 (alpha). Keeps byte order.
rgba_to_rgb_strided
RGBA (4 bytes/px) → RGB (3 bytes/px) between strided buffers, dropping alpha.