bokuweb / docx-rs

:memo: A .docx file writer with Rust/WebAssembly.
https://bokuweb.github.io/docx-rs/
MIT License
341 stars 59 forks source link

2 image problems #752

Open jiabotao opened 2 weeks ago

jiabotao commented 2 weeks ago

1: when i want resolve images in run ,the 'pic.image' is empty RunChild::Drawing(draw_box) => { let drawing_data = draw_box.data.unwrap(); match drawing_data { DrawingData::Pic(pic) => { println!("fount image"); let pic_image = pic.image; println!("image data size:{}", picimage.len()) } DrawingData::TextBox() => {} } } 2: in impl Pic {},I suggest give a function to reset image:Vec[u8],and hold on other properties mayby like: pub fn reset_image(mut self, image:Vec[u8]) -> Pic { self.image = image; self }