openpyxl.drawing.image module

class openpyxl.drawing.image.Image(img, coordinates=((0, 0), (1, 1)), size=(None, None), nochangeaspect=True, nochangearrowheads=True)[source]

Bases: object

Raw Image class

anchor(cell, anchortype='absolute')[source]
anchors the image to the given cell
optional parameter anchortype supports ‘absolute’ or ‘oneCell’


Deprecated: Anchors can be passed in when an image is added to a worksheet

openpyxl.drawing.image.bounding_box(bw, bh, w, h)[source]

Returns a tuple (new_width, new_height) which has the property that it fits within box_width and box_height and has (close to) the same aspect ratio as the original size