I want to replace an embedded image with a link.
I can find the embedded image.
I can generate a new rId:
relationships = self.slide._part.rels
reltype = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'
newrId = relationships._add_relationship(reltype, newfilename, True)
let's say it generates 'rId3'
It seems there are two ways to the next bit:
A) edit the xml of a pptx.shapes.picture object to change: to
or
B) delete the old image and insert a 'linked image'
I know how to change the size and position to adjust for different aspect ratios.
I'm at a loss about how to do the detail of either A) or B). Could someone provide some code snippets or guidance please?
I want to replace an embedded image with a link. I can find the embedded image. I can generate a new rId: relationships = self.slide._part.rels reltype = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image' newrId = relationships._add_relationship(reltype, newfilename, True) let's say it generates 'rId3'
It seems there are two ways to the next bit: A) edit the xml of a pptx.shapes.picture object to change: to
or
B) delete the old image and insert a 'linked image'
I know how to change the size and position to adjust for different aspect ratios.
I'm at a loss about how to do the detail of either A) or B). Could someone provide some code snippets or guidance please?
Best wishes Terry