Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding images directly from reference #263

Open
ft-lie opened this issue Dec 2, 2020 · 1 comment
Open

Adding images directly from reference #263

ft-lie opened this issue Dec 2, 2020 · 1 comment

Comments

@ft-lie
Copy link

ft-lie commented Dec 2, 2020

When generating excel files with images that are already generated in the script, adding them to a temp file seems unnecessary.

I have added $file as an option to add the image directly . I'll send a Pull request shortly.

(Mainly my first pull request, so pls be gentle if I screwed it all up).

my $png = make_png(); #returning image, not filename
$worksheet1->insert_image( 'A1', \$png);

@jmcnamara
Copy link
Owner

Thanks I'll add support for images from a buffer at some point. The interface and behaviour will probably be like the Python version of Excel::Writer::XLSX:

worksheet.insert_image('B5', 'python.png', {'image_data': image_data})

See: https://xlsxwriter.readthedocs.io/worksheet.html#worksheet-insert-image.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants