insert an image in arcmap layout view via Python

537
3
01-19-2012 06:13 PM
JinfengZhao
New Contributor
Hello,

Can anyone tell me how to insert an image in arcmap layout view using Python, please? The image needs to be located at the center of bottom part. Many thanks.

Regards,
Jinfeng
Tags (2)
0 Kudos
3 Replies
HenryColgate
Occasional Contributor
I don't think you can 'insert' an image into a map layout as this would involve creating a new page layout element.  Python does not allow for the creation of Page Layout Elements as of  version 10.0.

What you could do is something like manually insert an image element in an MXD template and change it each time.  This does not need to be anythin but a place holder image that would never be seen on the map.  This could be located outside of the 'Page' area so it would not be visible on a print out.  Then you could change this element to the desired picture and size then move it on to the Page instead of trying to create an element.

If it is required that you create the element you may want to look at ArcObjects in .NET or Java which does provide this functionality.
0 Kudos
JinfengZhao
New Contributor
Hi Henry,

Thank you so much for your reply. I think I'll try the first option, manually insert a place holder image.

But now I have a new question, when I inserted a image in Arcmap layout view, the resolution of the image became very poor no matter how clear the original image was. Is there a solution for this problem, please? Many thanks again.

Regards,
Jinfeng
0 Kudos
HenryColgate
Occasional Contributor
Not sure to be honest as I have not encountered this problem myself.  You may get a better and or faster answer if you repost in the desktop forum rather than the python section but I will give it a go.

My suggestion is to convert the data to another format and try again.  For example if it is a JPG image convert it to GIF, BMP etc or vice versa depending on the original format.
0 Kudos