@@ -21,12 +21,12 @@ impl Handle {
2121 }
2222
2323 /// Creates an image [`Handle`] containing the image pixels directly. This
24- /// function expects the input data to be provided as a `Vec<u8>` of BGRA
24+ /// function expects the input data to be provided as a `Vec<u8>` of RGBA
2525 /// pixels.
2626 ///
2727 /// This is useful if you have already decoded your image.
2828 pub fn from_pixels ( width : u32 , height : u32 , pixels : Vec < u8 > ) -> Handle {
29- Self :: from_data ( Data :: Pixels {
29+ Self :: from_data ( Data :: Rgba {
3030 width,
3131 height,
3232 pixels,
@@ -88,8 +88,8 @@ pub enum Data {
8888 /// In-memory data
8989 Bytes ( Vec < u8 > ) ,
9090
91- /// Decoded image pixels in BGRA format.
92- Pixels {
91+ /// Decoded image pixels in RGBA format.
92+ Rgba {
9393 /// The width of the image.
9494 width : u32 ,
9595 /// The height of the image.
@@ -104,7 +104,7 @@ impl std::fmt::Debug for Data {
104104 match self {
105105 Data :: Path ( path) => write ! ( f, "Path({:?})" , path) ,
106106 Data :: Bytes ( _) => write ! ( f, "Bytes(...)" ) ,
107- Data :: Pixels { width, height, .. } => {
107+ Data :: Rgba { width, height, .. } => {
108108 write ! ( f, "Pixels({} * {})" , width, height)
109109 }
110110 }
0 commit comments