Solved! Go to Solution.
arcpy.mapping.ExportToPNG(mxd, 'foo.png', df, 2122, 1553, 300, world_file=True)
arcpy.mapping.ExportToPNG(mxd, 'foo.png', df, 2122, 1553, 300, world_file=True)
We have a bug where any arcpy.mapping Export function that writes a world file or geotiff tags results in distorted images when brought back into ArcMap. This applies to data frame export scenarios only. This is most likely the issue you are hitting. For your records, the tracking number is NIM070025. We have already fixed it and the plan (subject to change) is to include it the next service pack/release.
The workaround is as follows: In the arcpy.mapping.ExportToPNG function, specify a resolution parameter and match the df_output_height and df_output_width parameters with the height and width auto calculated in the ArcMap data view user interface at File > Export Map dialog (Save as type: PNG) for the given resolution. For example:arcpy.mapping.ExportToPNG(mxd, 'foo.png', df, 2122, 1553, 300, world_file=True)
In the code sample above, your heights and widths may be different based on screen resolution, so make sure you check in the user interface for acceptable values.
Tip: in the dialog, you can change the resolution and get acceptable widths and heights that will work in the ExportToPNG function.