fix: specify width and height when importing raster images
This commit is contained in:
parent
d84447aaad
commit
842cd2ec94
1 changed files with 2 additions and 2 deletions
|
|
@ -74,8 +74,8 @@ pub fn from_raster_pixels(
|
|||
Handle {
|
||||
symbolic: false,
|
||||
data: match pixels.into() {
|
||||
Cow::Owned(pixels) => Data::Image(image::Handle::from_bytes(pixels)),
|
||||
Cow::Borrowed(pixels) => Data::Image(image::Handle::from_bytes(pixels)),
|
||||
Cow::Owned(pixels) => Data::Image(image::Handle::from_rgba(width, height, pixels)),
|
||||
Cow::Borrowed(pixels) => Data::Image(image::Handle::from_rgba(width, height, pixels)),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue