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’

Note

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

path
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