How to iterate an image texture and save the iteration with python What I have so far is this, and of course doesn't work yet.

import bpy

class TestSaver(bpy.types.Operator):
    """Save Image Increment"""
    bl_idname = "image.save_increment"
    bl_label = "Save Image Increment"
    bl_options = { 'REGISTER', 'UNDO' }

    def execute(self, context):
        scene = context.scene
        original_type = bpy.context.area.type
        bpy.context.area.type = 'IMAGE_EDITOR'
        #bpy.ops.image.save_as(copy=True)
        bpy.ops.image.save_as(save_as_render=False, copy=True,
                             filepath="test_save2.png", 
                             relative_path=True, 
                             show_multiview=False, use_multiview=False)
        bpy.context.area.type = 'FILE_BROWSER'
        bpy.ops.file.filenum(increment=2)
        bpy.context.area.type = original_type

        return {'FINISHED'}
I recommend you compute your filepath using a function like this:

from os.path import isfile

def next_file_name(pattern):
    i=1

    if (pattern%1) == (pattern %2):
        raise Exception("bad file name pattern")

    while isfile(pattern%i):
        i=i+1
    return pattern%i

print ( next_file_name("/var/tmp/blender/voronoi-wave/%04d.png") )


( thanks, https://stackoverflow.com/questions/82831/check-whether-a-file-exists-using-python )