- Reverted changes to
ComponentBytes
.bytemuck
is still recommended instead. - Disabling
as-bytes
feature fixes soundness issues withRGBA<T, AddsPadding>
types.
-
breaking: added
Copy
trait bound onfn new
functions. -
Enabled all unusual pixel types by default (they have minimal impact on compile times).
-
Added
new_bgra
/new_argb
functions to pixel types with non-RGB component order. -
Changed
ComponentBytes
to defer tobytemuck
. You can usebytemuck::cast_slice()
, etc. directly.
- Renamed
.alpha(new_val)
method to.with_alpha(new_val)
. - Added Rust-idiomatic name aliases
Rgb
/Rgba
for theRGB
/RGBA
structs.
-
Added
.checked_add
/sub
methods. -
Added a
Deref
trick that makesGrayAlpha
tuple type have.v
(value) and.a
(alpha) fields. You should migrate to the new field names wherever possible. Unfortunately,Gray
can't have that in a backward-compatible way, since it already derefs to the only field it has. -
The
Pod
trait is implemented forRGBA<T, A>
types whereT != A
, but this is unsound if the fields have a different size or alignment that causes padding. In the future onlyRGBA<T, T>
will support casting from/to raw bytes.