Cargo Features

[dependencies]
rgb = { version = "0.8.37", default-features = false, features = ["as-bytes", "argb", "grb", "serde"] }
default = as-bytes

The as-bytes feature is set by default whenever rgb is added without default-features = false somewhere in the dependency tree.

as-bytes default = bytemuck

safe as_bytes() casts require a marker trait for non-padded, non-pointery types.

Affects pixel::ComponentBytes

argb

Affects alt::ABGR, alt::ARGB, alt::ABGR8, alt::ARGB8, alt::ABGR16, alt::ARGB16, convert::FromSlice.as_argb, convert::FromSlice.as_argb_mut, convert::FromSlice.as_abgr, convert::FromSlice.as_abgr_mut

grb

Affects alt::GRB, alt::GRB8

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework

bytemuck as-bytes