

def new_pic_inline(self, image_descriptor, width, height):
    '\n        Return a newly-created `w:inline` element containing the image\n        specified by *image_descriptor* and scaled based on the values of\n        *width* and *height*.\n        '
    (rId, image) = self.get_or_add_image(image_descriptor)
    (cx, cy) = image.scaled_dimensions(width, height)
    (shape_id, filename) = (self.next_id, image.filename)
    return CT_Inline.new_pic_inline(shape_id, rId, filename, cx, cy)

dataset/ETHPy150Open python-openxml/python-docx/docx/parts/document.py DocumentPart.new_pic_inline/original