(self)
return new_pixel_array
Flip the lines from left to right into a new copy of this pixel array
Flip the lines from left to right into a new copy of this pixel array
Flip the lines from left to right into a new copy of this pixel array
def copy_flipped_left_right(self):
        """
        Flip the lines from left to right into a new copy of this pixel array
        """
        new_pixel_array = get_pixel_array(array.array('B', [0]) *  self.size, 
                                          self.width, self.height, self.pixelsize)
        for y in range(self.height):
            for dst_x in range(self.width):
                src_x = self.width - dst_x - 1
                new_pixel_array.set(dst_x, y, self.get(src_x, y))
        return new_pixel_array
def copy_flipped_left_right ( self ) : new_pixel_array = get_pixel_array ( array . array ( 'B' , [ 0 ] ) * self . size , self . width , self . height , self . pixelsize ) for y in range ( self . height ) : for dst_x in range ( self . width ) : src_x = self . width - dst_x - 1 new_pixel_array . set ( dst_x , y , self . get ( src_x , y ) ) return new_pixel_array