AnsweredAssumed Answered

ExporttoJPEG - can't change resolution, always resets to default

Question asked by terrafirma_theo on Sep 4, 2018
Latest reply on Sep 7, 2018 by terrafirma_theo

ArcGIS Pro (latest)


Using the ExportToJPEG (or even ExportToPNG) arcpy function, I can't seem to export an image with my desired resolution. It always defaults to 96 dpi even when I specify 500. What am I doing wrong? Is this a bug?

print ("project loaded")
l = p.listLayouts("MyLayout")[0]
print ("layouts listed")
if not l.mapSeries is None:
ms = l.mapSeries
if ms.enabled:
   for pageNum in range(1, ms.pageCount + 1):
     ms.currentPageNumber = pageNum
     print("Exporting page {0} of {1}".format(str(ms.currentPageNumber), str(ms.pageCount)))
     l.exportToJPEG(r"C:\\Users\\Theo\\Dropbox\\site_plans\\Current_GR_site_plans\\GR2-GroundMovement-SP-_{0}".format(str(ms.currentPageNumber) + ".jpg", 500))


You can see at the end I specify 500 as the resolution. Even when I write- resolution = 500, it's the same. My images aren't coming out in my desired quality.


If I export a single page using the share ribbon, setting the dpi to 500, it works. But I'm automating this, so that's not a viable option for me.


Guides used:

MapFrame—ArcPy | ArcGIS Desktop 

Layout—ArcPy | ArcGIS Desktop 


similar issue to:

ExportToJpeg Resolution Problem 

but i don't understand the answers given.