title: python-pptx: replacing one picture image with another
body: <p>I've just stumbled across this, it looks extremely useful.  I found some examples for manipulating slides and the like, my particular use case involves basically replacing a bunch of images within a given presentation with different image files, but I want to retain most of the metadata such as position, size, etc.</p>
  <p>I suppose the question is a little more generic in nature, more like &quot;what's the logical flow of this within the python-pptx framework?&quot;.  Simply replacing the file pointer with the new one misses the mark for sure, but it's not obvious to me whether there are attributes for pictures that could be easily stored and re-applied, or what other approaches might make the most sense to have the code be easier to work with down the road...</p>
  <p>any suggestions appreciated  ;-)</p>
  <p>Update:  Attempted the following assignment of <code>_blob</code> but it appears to not be working, or maybe I'm missing something easy?</p>
  <pre><code>#!/usr/bin/env python3
  
  import pptx
  import hashlib
  
  prs = pptx.Presentation('hack.pptx')
  newImgFilename = &quot;gray.jpg&quot;
  img2 = pptx.parts.image.Image.from_file(newImgFilename)
  
  print(hashlib.sha224(prs.slides[0].shapes[2].image._blob).hexdigest())
  print(hashlib.sha224(img2._blob).hexdigest())
  ### these two should be different
  
  
  prs.slides[0].shapes[2].image._blob = img2._blob
  print(hashlib.sha224(prs.slides[0].shapes[2].image._blob).hexdigest())
  ### now this should be the value from img2, but it's not... 
  
  
  </code></pre>