@@ -22,7 +22,7 @@ impl Handle {
2222 }
2323
2424 /// Creates an image [`Handle`] containing the image pixels directly. This
25- /// function expects the input data to be provided as a `Vec<u8>` of BGRA
25+ /// function expects the input data to be provided as a `Vec<u8>` of RGBA
2626 /// pixels.
2727 ///
2828 /// This is useful if you have already decoded your image.
@@ -31,7 +31,7 @@ impl Handle {
3131 height : u32 ,
3232 pixels : impl Into < Cow < ' static , [ u8 ] > > ,
3333 ) -> Handle {
34- Self :: from_data ( Data :: Pixels {
34+ Self :: from_data ( Data :: Rgba {
3535 width,
3636 height,
3737 pixels : pixels. into ( ) ,
@@ -93,8 +93,8 @@ pub enum Data {
9393 /// In-memory data
9494 Bytes ( Cow < ' static , [ u8 ] > ) ,
9595
96- /// Decoded image pixels in BGRA format.
97- Pixels {
96+ /// Decoded image pixels in RGBA format.
97+ Rgba {
9898 /// The width of the image.
9999 width : u32 ,
100100 /// The height of the image.
@@ -109,7 +109,7 @@ impl std::fmt::Debug for Data {
109109 match self {
110110 Data :: Path ( path) => write ! ( f, "Path({:?})" , path) ,
111111 Data :: Bytes ( _) => write ! ( f, "Bytes(...)" ) ,
112- Data :: Pixels { width, height, .. } => {
112+ Data :: Rgba { width, height, .. } => {
113113 write ! ( f, "Pixels({} * {})" , width, height)
114114 }
115115 }
0 commit comments