#![cfg_attr(feature = "as-bytes", doc = "```rust")]
#![cfg_attr(not(feature = "as-bytes"), doc = "```ignore")]
#![doc(html_logo_url = "https://kornel.ski/rgb-logo.png")]
#![warn(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![no_std]
#[cfg(test)]
#[macro_use] extern crate std;
#[cfg(feature = "bytemuck")]
#[doc(alias = "ComponentSlice")]
#[doc(alias = "as_bytes")]
#[doc(alias = "Pod")]
pub use ::bytemuck;
pub(crate) mod formats {
pub mod abgr;
pub mod argb;
pub mod bgr;
pub mod bgra;
pub mod gray;
pub mod gray_a;
pub mod gray_alpha;
pub mod grb;
pub mod rgb;
pub mod rgba;
}
pub mod prelude {
pub use crate::legacy::internal::pixel::ComponentMap;
pub use crate::legacy::internal::pixel::ColorComponentMap;
}
pub use formats::abgr::Abgr;
pub use formats::argb::Argb;
pub use formats::bgr::Bgr;
pub use formats::bgra::Bgra;
#[cfg(not(feature = "unstable-experimental"))]
pub use formats::gray_alpha::GrayAlpha_v08 as GrayAlpha;
#[cfg(feature = "unstable-experimental")]
#[deprecated(note = "Renamed to GrayA")]
pub use formats::gray_a::GrayA as GrayAlpha;
#[cfg(not(feature = "unstable-experimental"))]
pub use formats::gray::Gray_v08 as Gray;
#[cfg(feature = "unstable-experimental")]
pub use formats::gray::Gray_v09 as Gray;
pub use formats::grb::Grb;
pub use formats::rgb::Rgb;
pub use formats::rgba::Rgba;
mod inherent_impls;
pub(crate) mod legacy {
pub(crate) mod internal {
pub mod convert;
pub mod ops;
pub mod pixel;
pub mod rgb;
pub mod rgba;
}
pub mod alt;
}
pub use legacy::alt;
#[cfg(all(feature = "bytemuck", not(feature = "as-bytes")))]
mod bytemuck_impl;
#[cfg(feature = "as-bytes")]
mod as_bytes;
#[cfg(feature = "as-bytes")]
pub use ::bytemuck::Pod;
#[cfg(feature = "as-bytes")]
pub use ::bytemuck::Zeroable;
pub use crate::legacy::internal::convert::*;
pub use crate::legacy::internal::pixel::*;
#[doc(hidden)]
pub use formats::rgb::Rgb as RGB;
#[doc(hidden)]
pub use formats::rgba::Rgba as RGBA;
#[doc(hidden)]
pub use formats::gray_a::GrayA;
pub type RGB8 = RGB<u8>;
pub type RGB16 = RGB<u16>;
pub type RGBA8 = RGBA<u8>;
pub type RGBA16 = RGBA<u16>;