Closed 33nya closed 5 months ago
Thanks for the offer of help. From memory there were a lot of edge cases and 20+ test cases, so it is probably best if I tackle this myself. I'll work on it in the next few weeks and I'll let you know when there is anything testable.
I've pushed an initial version of this to the image_url
branch if you want to do some early access testing. It passes all the XlsxWriter tests but it needs some heavy refactoring and the Image API will probably change from &mut self
to mut self
so the methods can be chained. It also needs more tests for the embed_image()
variant.
That notwithstanding it should be okay to test if you want. Currently it works like this:
let mut image = Image::new("github_logo.png")?;
image.set_url("https://github.com")?;
worksheet.insert_image(8, 4, &image)?;
I've refactored and rebased the code and merged it back to main. The API is now:
let image = Image::new("github_logo.png")?
.set_url("https://github.com")?;
worksheet.insert_image(8, 4, &image)?;
I'l push it out in a release in the next 1-2 days.
This feature is now upstream in v0.68.0.
I have noticed that the URLs in images feature outlined in the roadmap hasn't been implemented yet. I am interested in contributing to this feature and was wondering if there is an opportunity for me to do so.
I have some ideas on how it could be implemented, with reference to the Python version library:
However, I am uncertain if I am proceeding in the right direction, or if there are any additional aspects that should be taken into consideration. Could you give me some advice on it?
Thank you for your time and consideration.