예제 #1
0
    ImageBufAlgo.rotate90(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "rotate90.tif")

    # rotate180
    b = ImageBuf()
    ImageBufAlgo.rotate180(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "rotate180.tif")

    # rotate270
    b = ImageBuf()
    ImageBufAlgo.rotate270(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "rotate270.tif")

    # flip
    b = ImageBuf()
    ImageBufAlgo.flip(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "flip.tif")

    # flop
    b = ImageBuf()
    ImageBufAlgo.flop(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "flop.tif")

    # flipflop
    b = ImageBuf()
    ImageBufAlgo.flipflop(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "flipflop.tif")

    # reorient
    b = ImageBuf()
    image_small = ImageBuf()
예제 #2
0
    ImageBufAlgo.rotate90(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "rotate90.tif")

    # rotate180
    b = ImageBuf()
    ImageBufAlgo.rotate180(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "rotate180.tif")

    # rotate270
    b = ImageBuf()
    ImageBufAlgo.rotate270(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "rotate270.tif")

    # flip
    b = ImageBuf()
    ImageBufAlgo.flip(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "flip.tif")

    # flop
    b = ImageBuf()
    ImageBufAlgo.flop(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "flop.tif")

    # flipflop
    b = ImageBuf()
    ImageBufAlgo.flipflop(b, ImageBuf("../oiiotool/image.tif"))
    write(b, "flipflop.tif")

    # reorient
    b = ImageBuf()
    image_small = ImageBuf()
예제 #3
0
    write(b, "pasted.tif")

    # rotate90
    b = ImageBufAlgo.rotate90(ImageBuf("../oiiotool/src/image.tif"))
    write(b, "rotate90.tif")

    # rotate180
    b = ImageBufAlgo.rotate180(ImageBuf("../oiiotool/src/image.tif"))
    write(b, "rotate180.tif")

    # rotate270
    b = ImageBufAlgo.rotate270(ImageBuf("../oiiotool/src/image.tif"))
    write(b, "rotate270.tif")

    # flip
    b = ImageBufAlgo.flip(ImageBuf("../oiiotool/src/image.tif"))
    write(b, "flip.tif")

    # flop
    b = ImageBufAlgo.flop(ImageBuf("../oiiotool/src/image.tif"))
    write(b, "flop.tif")

    # reorient
    image_small = ImageBuf()
    ImageBufAlgo.resample(image_small,
                          ImageBuf("../oiiotool/src/image.tif"),
                          roi=oiio.ROI(0, 160, 0, 120))
    image_small = ImageBufAlgo.rotate90(image_small)
    image_small.specmod().attribute("Orientation", 8)
    b = ImageBufAlgo.reorient(image_small)
    write(b, "reorient1.tif")
예제 #4
0
    b = ImageBufAlgo.rotate90(
        ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/image.tif"))
    write(b, "rotate90.tif")

    # rotate180
    b = ImageBufAlgo.rotate180(
        ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/image.tif"))
    write(b, "rotate180.tif")

    # rotate270
    b = ImageBufAlgo.rotate270(
        ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/image.tif"))
    write(b, "rotate270.tif")

    # flip
    b = ImageBufAlgo.flip(
        ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/image.tif"))
    write(b, "flip.tif")

    # flop
    b = ImageBufAlgo.flop(
        ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/image.tif"))
    write(b, "flop.tif")

    # reorient
    image_small = ImageBuf()
    ImageBufAlgo.resample(image_small,
                          ImageBuf(OIIO_TESTSUITE_ROOT +
                                   "/oiiotool/src/image.tif"),
                          roi=oiio.ROI(0, 160, 0, 120))
    image_small = ImageBufAlgo.rotate90(image_small)
    image_small.specmod().attribute("Orientation", 8)
    write (b, "pasted.tif")

    # rotate90
    b = ImageBufAlgo.rotate90 (ImageBuf("../oiiotool/src/image.tif"))
    write (b, "rotate90.tif")

    # rotate180
    b = ImageBufAlgo.rotate180 (ImageBuf("../oiiotool/src/image.tif"))
    write (b, "rotate180.tif")

    # rotate270
    b = ImageBufAlgo.rotate270 (ImageBuf("../oiiotool/src/image.tif"))
    write (b, "rotate270.tif")

    # flip
    b = ImageBufAlgo.flip (ImageBuf("../oiiotool/src/image.tif"))
    write (b, "flip.tif")

    # flop
    b = ImageBufAlgo.flop (ImageBuf("../oiiotool/src/image.tif"))
    write (b, "flop.tif")

    # reorient
    image_small = ImageBuf()
    ImageBufAlgo.resample (image_small, ImageBuf("../oiiotool/src/image.tif"),  roi=oiio.ROI(0,160,0,120))
    image_small = ImageBufAlgo.rotate90 (image_small)
    image_small.specmod().attribute ("Orientation", 8)
    b = ImageBufAlgo.reorient (image_small)
    write (b, "reorient1.tif")
    image_small = ImageBuf()