<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to prevent the image changing its dimension in the layout? in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/how-to-prevent-the-image-changing-its-dimension-in/m-p/151387#M1679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;BR /&gt;Some time ago, I inserted a transparent image in the layout to use as a background for the caption. After inserting it in the layout I adjusted it to the desired size (rectangular).&lt;BR /&gt;I recently moved the image to another folder and renamed it. Of course I forgot the detail of the path in the layouts!&lt;BR /&gt;To repair the broken path I used the code (below, available at https://desktop.arcgis.com). However, when I open the project, the image is in another size (square).&lt;BR /&gt;Is there any way to avoid this and preserve the size?&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;H2&gt;Code sample&lt;/H2&gt;&lt;DIV&gt;&lt;H5&gt;PictureElement example 1&lt;/H5&gt;&lt;P&gt;The following script will find an image by name and set its data source to a new location.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;mxd&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;mapping&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;r"C:\Project\Project.mxd"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;elm&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;mapping&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ListLayoutElements&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;mxd&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;"PICTURE_ELEMENT"&lt;/SPAN&gt;&lt;SPAN&gt;):&lt;/SPAN&gt;    &lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;elm&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt; &lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;"Photo"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;        &lt;SPAN&gt;elm&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sourceImage&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;r"C:\Project\Data\NewPhoto.bmp"&lt;/SPAN&gt;&lt;SPAN&gt;mxd&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;save&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;SPAN&gt;del&lt;/SPAN&gt; &lt;SPAN&gt;mxd&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2020 16:48:11 GMT</pubDate>
    <dc:creator>AntonioMoniz</dc:creator>
    <dc:date>2020-02-19T16:48:11Z</dc:date>
    <item>
      <title>How to prevent the image changing its dimension in the layout?</title>
      <link>https://community.esri.com/t5/mapping-questions/how-to-prevent-the-image-changing-its-dimension-in/m-p/151387#M1679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;BR /&gt;Some time ago, I inserted a transparent image in the layout to use as a background for the caption. After inserting it in the layout I adjusted it to the desired size (rectangular).&lt;BR /&gt;I recently moved the image to another folder and renamed it. Of course I forgot the detail of the path in the layouts!&lt;BR /&gt;To repair the broken path I used the code (below, available at https://desktop.arcgis.com). However, when I open the project, the image is in another size (square).&lt;BR /&gt;Is there any way to avoid this and preserve the size?&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;H2&gt;Code sample&lt;/H2&gt;&lt;DIV&gt;&lt;H5&gt;PictureElement example 1&lt;/H5&gt;&lt;P&gt;The following script will find an image by name and set its data source to a new location.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;mxd&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;mapping&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;r"C:\Project\Project.mxd"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;elm&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;mapping&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ListLayoutElements&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;mxd&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;"PICTURE_ELEMENT"&lt;/SPAN&gt;&lt;SPAN&gt;):&lt;/SPAN&gt;    &lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;elm&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt; &lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;"Photo"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;        &lt;SPAN&gt;elm&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sourceImage&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;r"C:\Project\Data\NewPhoto.bmp"&lt;/SPAN&gt;&lt;SPAN&gt;mxd&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;save&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;SPAN&gt;del&lt;/SPAN&gt; &lt;SPAN&gt;mxd&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 16:48:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/how-to-prevent-the-image-changing-its-dimension-in/m-p/151387#M1679</guid>
      <dc:creator>AntonioMoniz</dc:creator>
      <dc:date>2020-02-19T16:48:11Z</dc:date>
    </item>
  </channel>
</rss>

