This is the first time I am using Python on my own, and I have searched for this answer for a few hours with no luck. I am wanting to take a .JPG image and put it in a data frame. The image has to be in color, and needs to change with data driven pages. Help would be greatly appreciated. Thanks
I would suggest for you to template out your map document with a pseudo image and ust replace the source using python instead of adding and removing the layer. I take that your image is an element, not actually apart of a data frame. If so, you may swap out the reference path to that image by using the
property, see code example below:
Otherwise, you could technically store this image in a seperate data frame and resource it by the layer replaceDataSource method.
I don't think you need Python for this, unless there are other complicating factors not mentioned in the question.
Assuming that your JPG files are georeferenced (i.e. have *.jgw world files), and that you have a polygon feature class with one rectangular polygon that corresponds to each JPG file, then you should be able to use that polygon feature class as an index in Data Driven Pages.
Make sure the map you are enabling DDP on has all the JPG files in its Table of Contents and turned on.