How to increase image resolution in openpyxl?

54 Views Asked by At

I have some high-resolution images, but when adding them to excel using openpyxl, their resolutions becomes low.
My example code is here.

wb = openpyxl.Workbook()
ws = wb.active

img = openpyxl.drawing.image.Image('high_resolution_image.png')
img.anchor = AbsoluteAnchor(pos=position, ext=size)
ws.add_image(img)

What is the problem and how to solve it?

0

There are 0 best solutions below