<?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 Re: ExportToJpeg Resolution Problem in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/1171271#M64508</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.mapping.ExportToJPEG(&lt;/SPAN&gt;&lt;SPAN&gt;mapDoc&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;OutputFileJPG&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"PAGE_LAYOUT"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;df_export_height&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;1200&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;df_export_width&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;2250&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;resolution&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;300&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 May 2022 20:00:26 GMT</pubDate>
    <dc:creator>JeffHanson2</dc:creator>
    <dc:date>2022-05-05T20:00:26Z</dc:date>
    <item>
      <title>ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490236#M38361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im still pretty new to Python, pretty much an infant. I put together a script for bulk exporting DDP to .jpg with world file, and it works fine, except for one problem. the resolution only exports at the default, 96 dpi. W&lt;SPAN&gt;hen I put an interger in the resolution, it doesnt change from 96 dpi.&lt;/SPAN&gt;I would like it to be a little higher. Everything I have seen in others scripts, it seems to work fine and it matches the syntax of ExportToJpeg? I have checked over many options from different answers, including making it a constant, different spacing, etc., etc. My question is what am I missing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...import arcpy&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument("CURRENT") &lt;BR /&gt;df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/P&gt;&lt;P&gt;for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;mxd.dataDrivenPages.currentPageID = pageNum&lt;BR /&gt;arcpy.mapping.ExportToJPEG(mxd, r"C:\&lt;STRONG&gt;Insert\File\Path\Here&lt;/STRONG&gt;\{}.jpg".format(pageNum), df, df_export_width=1600, df_export_height=1200, resolution=300, world_file=True)&lt;BR /&gt;del mxd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Sep 2017 18:07:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490236#M38361</guid>
      <dc:creator>StevenOliver</dc:creator>
      <dc:date>2017-09-08T18:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490237#M38362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the command without giving a width and height.&amp;nbsp; I think if you use just "resolution=300"&amp;nbsp;then the height and width will be calculated for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Sep 2017 21:17:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490237#M38362</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2017-09-08T21:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490238#M38363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately I had already tried that. That was actually what I was thinking was wrong. The 1600 x1200 parameters for height and width do not matter. I just did that for the sake of some legibility when zooming on the jpeg. I am trying to work within a set&amp;nbsp;end file size of all exported jpegs in mind. I thought that a higher resolution would help me achieve that. &amp;nbsp;Eventually these images will get stitched into one for an offline map, and I can make the 1600x1200 work for my purpose (maybe), I would just like help understanding why it is not, so I can grow my python "skills" (I say that loosely) and understanding even more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Sep 2017 19:44:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490238#M38363</guid>
      <dc:creator>StevenOliver</dc:creator>
      <dc:date>2017-09-09T19:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490239#M38364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On my&lt;STRONG&gt;&lt;A _jive_internal="true" href="https://community.esri.com/blogs/dan_patterson/2016/05/09/the-links"&gt; py... links blog&lt;/A&gt;,&lt;/STRONG&gt; I maintain a link to issues addressed... sometimes there is a quiet announcement of things that get 'fixed' along the way... so unless you are working with 10.5.1, you might want to have a troll to see if something was noted and address in the past.&amp;nbsp; Here is the &lt;STRONG&gt;&lt;A href="http://downloads.esri.com/support/downloads/other_/1051-IssuesAddressedList_07052017.pdf"&gt;one for 10.5.1&lt;/A&gt; &lt;/STRONG&gt;Step back in time for other versions from the link&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Sep 2017 20:14:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490239#M38364</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-09-09T20:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490240#M38365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A link to your blog post was one of the first I came across on my search for answers actually. I bookmarked it for future use, because I am sure it will come in handy...... many more times than once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting that blog, it really does help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Sep 2017 21:54:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490240#M38365</guid>
      <dc:creator>StevenOliver</dc:creator>
      <dc:date>2017-09-09T21:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490241#M38366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your code, you are setting:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you are referencing it in the export code.&amp;nbsp; This is accessing the&amp;nbsp;frame in "Data View"&amp;nbsp; which uses your screen's resolution.&amp;nbsp;&amp;nbsp;&amp;nbsp;Without a data frame reference, the export code will default to "PAGE_LAYOUT" (or "Layout View") which will allow you to set the resolution.&amp;nbsp; I tested the following code in ArcMap 10.5 at resolutions of 150 and 300.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; pageNum &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataDrivenPages&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;pageCount &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataDrivenPages&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;currentPageID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; pageNum
&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ExportToJPEG&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Path\To\Page"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pageNum&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".jpg"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; resolution&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; mxd
‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/exporttojpeg.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;ExportToJPEG&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/map/page-layouts/exporting-data-driven-pages.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Exporting Data Driven Pages&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:34:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490241#M38366</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T21:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490242#M38367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That actually makes perfect sense. Thanks! I had thought about a code similar to the one you wrote, not exactly, but decided to go with the one I originally posted. I don't know why really, I guess I thought it would be simpler and cause less headache. We see how that turned out. Anyway, I will try it tomorrow morning and see how it works out. It looks like just the ticket. I sure do appreciate the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 02:59:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/490242#M38367</guid>
      <dc:creator>StevenOliver</dc:creator>
      <dc:date>2017-09-11T02:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/1171268#M64507</link>
      <description>&lt;P&gt;I had the same issue but just fixed it by changing df/dataframe to "PAGE_LAYOUT" in the ExportToJPEG function.&amp;nbsp; &amp;nbsp;Works like a charm.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 19:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/1171268#M64507</guid>
      <dc:creator>JeffHanson2</dc:creator>
      <dc:date>2022-05-05T19:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToJpeg Resolution Problem</title>
      <link>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/1171271#M64508</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.mapping.ExportToJPEG(&lt;/SPAN&gt;&lt;SPAN&gt;mapDoc&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;OutputFileJPG&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"PAGE_LAYOUT"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;df_export_height&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;1200&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;df_export_width&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;2250&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;resolution&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;300&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 May 2022 20:00:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttojpeg-resolution-problem/m-p/1171271#M64508</guid>
      <dc:creator>JeffHanson2</dc:creator>
      <dc:date>2022-05-05T20:00:26Z</dc:date>
    </item>
  </channel>
</rss>

