Exemple #1
0
def sepia(slide_space):
    """
    Apply a sepia effect to the photo.
    :param slide_space: container with the pisak slide instance inside
    """
    slide = slide_space.get_children()[0]
    if slide.image_buffer is None:
        slide.image_buffer = image.ImageBuffer()
    slide.image_buffer.sepia()
Exemple #2
0
def zoom(slide_space):
    """
    Zoom the photo.
    :param slide_space: container with the pisak slide instance inside
    """
    slide = slide_space.get_children()[0]
    if slide.image_buffer is None:
        slide.image_buffer = image.ImageBuffer()
    slide.image_buffer.zoom()
Exemple #3
0
def rotate(slide_space):
    """
    Rotate the photo for 90 degrees.
    :param slide_space: container with the pisak slide instance inside
    """
    slide = slide_space.get_children()[0]
    if slide.image_buffer is None:
        slide.image_buffer = image.ImageBuffer()
    slide.image_buffer.rotate()
Exemple #4
0
def save(slide_space):
    """
    Save the photo.

    :param slide_space: container with the pisak slide instance inside.
    """
    slide = slide_space.get_children()[0]
    if slide.image_buffer is None:
        slide.image_buffer = image.ImageBuffer()
    slide.save_buffer()
Exemple #5
0
def invert(slide_space):
    """
    Apply a color invert effect to the photo.

    :param slide_space: container with the pisak slide instance inside.
    """
    slide = slide_space.get_children()[0]
    if slide.image_buffer is None:
        slide.image_buffer = image.ImageBuffer()
    slide.image_buffer.invert()
Exemple #6
0
def original(slide_space):
    """
    Remove all the applied effects an operations and go back
    to the original photo.
    :param slide_space: container with the pisak slide instance inside
    """
    slide = slide_space.get_children()[0]
    if slide.image_buffer is None:
        slide.image_buffer = image.ImageBuffer()
    slide.image_buffer.original()