summaryrefslogtreecommitdiffstats
path: root/native/src
diff options
context:
space:
mode:
Diffstat (limited to 'native/src')
-rw-r--r--native/src/widget/image.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs
index 1b3964d7..0d73fdb0 100644
--- a/native/src/widget/image.rs
+++ b/native/src/widget/image.rs
@@ -126,8 +126,11 @@ impl Handle {
/// Creates an image [`Handle`] containing the image data directly.
///
+ /// This is useful if you already have your image loaded in-memory, maybe
+ /// because you downloaded or generated it procedurally.
+ ///
/// [`Handle`]: struct.Handle.html
- pub fn from_bytes(bytes: Vec<u8>) -> Handle {
+ pub fn from_memory(bytes: Vec<u8>) -> Handle {
Self::from_data(Data::Bytes(bytes))
}