Replies: 2 comments 3 replies
-
Any thoughts on this anyone? the error message is:
here's an updated code segment:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the response. I see what you are referring to. So I tried the example at https://github.com/emilk/egui/blob/master/eframe/examples/image.rs but ran into the same issues as the user who commented on bug 1110 - #1110. My update fn requires CtxRef and not Context, maybe there's an issue there. I am using egui = "0.16.1". |
Beta Was this translation helpful? Give feedback.
-
Hey,
I've been trying this for a bit and I've had no luck at all.
`
}
fn image_background() -> ((usize, usize), Vec) {
let image_data_bkg = include_bytes!("/Users/matthew/tmp/bucket/jj.png");
let image_bkg = image::load_from_memory(image_data_bkg).expect("Failed to load image");
let image_buffer_bkg = image_bkg.to_rgba8();
let size_bkg = (5200 as usize, 2500 as usize);
let pixels_bkg = image_buffer_bkg.into_vec();
let pixels_bkg: Vec<_> = pixels_bkg
.chunks_exact(4)
.map(|p| egui::Color32::from_rgba_unmultiplied(p[0], p[1], p[2], p[3]))
.collect();
}
with this code here, the error I get is on "tex_allocator".
error[E0599]: no method named
tex_allocatorfound for reference
&eframe::epi::Framein the current scope --> src/main.rs:218:39 | 218 | let tex_allocator = frame.tex_allocator().unwrap(); | ^^^^^^^^^^^^^ method not found in
&eframe::epi::Frame``
I noticed in someone's example that frame used a lifetime [ frame: &epi::Frame<'_' ] but the compiler complains about that as well. I could use some help here.
Beta Was this translation helpful? Give feedback.
All reactions