title: Photoshop Script - Swap a piece of an image
body: <p>I am quite new to Photoshop scripts, and I want to do the following:</p>
  
  <p>Transform images in batch, for each image, swap a piece like this*,</p>
  
  <pre><code> _____________________
  |                     |
  |                     |
  |                     |
  |______         ______|
  |      |       |      |
  |  9   |       |   E  |
  |______|       |______|
  |                     |
  |                     |
  |                     |
  |                     |
  |                     |
  |_____________________|
  </code></pre>
  
  <p>become this:</p>
  
  <pre><code> _____________________
  |                     |
  |                     |
  |                     |
  |______         ______|
  |      |       |      |
  |  3   |       |   e  |
  |______|       |______|
  |                     |
  |                     |
  |                     |
  |                     |
  |                     |
  |_____________________|
  </code></pre>
  
  <p>I just want to know how can I do it, which functions and so on. About the position, I can't say which pixels exactly, so, Just give me an example and I calculate the number I must use</p>
  
  <ul>
  <li><em>Considering that</em> <code>3</code> <em>is similar to the horizontal flip of</em> <code>E</code> <em>and same thing with</em> <code>e</code> <em>to</em> <code>9</code></li>
  </ul>