From eb7e3250d3da495f46480360c99540a8f643d2e6 Mon Sep 17 00:00:00 2001 From: Soham Chowdhury Date: Sun, 1 Mar 2020 06:44:06 +0530 Subject: [PATCH] Note BGRA requirement in Handle::from_pixels docs --- native/src/widget/image.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs index a1743744..fbe38bfc 100644 --- a/native/src/widget/image.rs +++ b/native/src/widget/image.rs @@ -125,7 +125,9 @@ impl Handle { Self::from_data(Data::Path(path.into())) } - /// Creates an image [`Handle`] containing the image pixels directly. + /// Creates an image [`Handle`] containing the image pixels directly. This + /// function expects the input data to be provided as a `Vec` of BGRA + /// pixels. /// /// This is useful if you have already decoded your image. ///