(image)
return image.mapim(index)
Transform image coordinates to rectangular.

    The image is transformed so that it is unwrapped from a point in the
    centre. Circles or segments of circles become vertical straight lines,
    radial lines become horizontal lines.
Transform image coordinates to rectangular.
Transform image coordinates to rectangular .
def to_rectangular(image):
    """Transform image coordinates to rectangular.

    The image is transformed so that it is unwrapped from a point in the
    centre. Circles or segments of circles become vertical straight lines,
    radial lines become horizontal lines.
    """
    # xy image, vertical scaled to 360 degrees
    xy = pyvips.Image.xyz(image.width, image.height)
    xy *= [1, 360.0 / image.height]

    index = xy.rect()

    # scale to image rect
    scale = min(image.width, image.height) / float(image.width)
    index *= scale / 2.0
    index += [image.width / 2.0, image.height / 2.0]

    return image.mapim(index)
def to_rectangular ( image ) : # xy image, vertical scaled to 360 degrees xy = pyvips . Image . xyz ( image . width , image . height ) xy *= [ 1 , 360.0 / image . height ] index = xy . rect ( ) # scale to image rect scale = min ( image . width , image . height ) / float ( image . width ) index *= scale / 2.0 index += [ image . width / 2.0 , image . height / 2.0 ] return image . mapim ( index )