functions are available as image object methods :
img = bpy.data.images['untitled']
improved a function that returns the displayed image in the uv editor, whatever the uv panel is displayed or not in the current screen. it acts a bit like a bpy.context.active_xxx items.
img = image_tools.active()
# returns the image object or None if nothing in the UV panel,
# or no UV panel in any screen, or if several active panels with different images in each.
flip X/Y, rotate -90,180,90, et mirror X/Y