image_small = ImageBuf() ImageBufAlgo.resample(image_small, ImageBuf("../oiiotool/image.tif"), roi=oiio.ROI(0, 160, 0, 120)) ImageBufAlgo.rotate90(image_small, image_small) image_small.specmod().attribute("Orientation", 8) ImageBufAlgo.reorient(b, image_small) write(b, "reorient1.tif") image_small = ImageBuf() # transpose b = ImageBuf() ImageBufAlgo.transpose(b, ImageBuf("../oiiotool/image.tif")) write(b, "transpose.tif") # circular_shift b = ImageBuf() ImageBufAlgo.circular_shift(b, ImageBuf("../oiiotool/image.tif"), 100, 50) write(b, "cshift.tif") # clamp b = ImageBuf() ImageBufAlgo.resize(b, grid, roi=oiio.ROI(0, 500, 0, 500)) ImageBufAlgo.clamp(b, b, (0.2, 0.2, 0.2, 0.2), (100, 100, 0.5, 1)) write(b, "grid-clamped.tif", oiio.UINT8) # add b = ImageBuf() ImageBufAlgo.add(b, gray128, 0.25) write(b, "cadd1.exr") b = ImageBuf() ImageBufAlgo.add(b, gray128, (0, 0.25, -0.25)) write(b, "cadd2.exr")
ImageBuf("../oiiotool/image.tif"), roi=oiio.ROI(0, 160, 0, 120)) ImageBufAlgo.rotate90(image_small, image_small) image_small.specmod().attribute("Orientation", 8) ImageBufAlgo.reorient(b, image_small) write(b, "reorient1.tif") image_small = ImageBuf() # transpose b = ImageBuf() ImageBufAlgo.transpose(b, ImageBuf("../oiiotool/image.tif")) write(b, "transpose.tif") # circular_shift b = ImageBuf() ImageBufAlgo.circular_shift(b, ImageBuf("../oiiotool/image.tif"), 100, 50) write(b, "cshift.tif") # clamp b = ImageBuf() ImageBufAlgo.resize(b, grid, roi=oiio.ROI(0, 500, 0, 500)) ImageBufAlgo.clamp(b, b, (0.2, 0.2, 0.2, 0.2), (100, 100, 0.5, 1)) write(b, "grid-clamped.tif", oiio.UINT8) # add b = ImageBuf() ImageBufAlgo.add(b, gray128, 0.25) write(b, "cadd1.exr") b = ImageBuf() ImageBufAlgo.add(b, gray128, (0, 0.25, -0.25)) write(b, "cadd2.exr")
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() # transpose b = ImageBufAlgo.transpose(ImageBuf("../oiiotool/src/image.tif")) write(b, "transpose.tif") # circular_shift b = ImageBufAlgo.circular_shift(ImageBuf("../oiiotool/src/image.tif"), 100, 50) write(b, "cshift.tif") # clamp b = ImageBufAlgo.resize(grid, roi=oiio.ROI(0, 500, 0, 500)) b = ImageBufAlgo.clamp(b, (0.2, 0.2, 0.2, 0.2), (100, 100, 0.5, 1)) write(b, "grid-clamped.tif", oiio.UINT8) # add b = ImageBufAlgo.add(gray128, 0.25) write(b, "cadd1.exr") b = ImageBufAlgo.add(gray128, (0, 0.25, -0.25)) write(b, "cadd2.exr") b = ImageBufAlgo.add( make_constimage(64, 64, 3, oiio.HALF, (.1, .2, .3)), make_constimage(64, 64, 3, oiio.HALF, (.1, .1, .1), 20, 20))
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) b = ImageBufAlgo.reorient(image_small) write(b, "reorient1.tif") image_small = ImageBuf() # transpose b = ImageBufAlgo.transpose( ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/image.tif")) write(b, "transpose.tif") # circular_shift b = ImageBufAlgo.circular_shift( ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/image.tif"), 100, 50) write(b, "cshift.tif") # clamp b = ImageBufAlgo.resize(grid, roi=oiio.ROI(0, 500, 0, 500)) b = ImageBufAlgo.clamp(b, (0.2, 0.2, 0.2, 0.2), (100, 100, 0.5, 1)) write(b, "grid-clamped.tif", oiio.UINT8) # add b = ImageBufAlgo.add(gray128, 0.25) write(b, "cadd1.exr") b = ImageBufAlgo.add(gray128, (0, 0.25, -0.25)) write(b, "cadd2.exr") b = ImageBufAlgo.add( make_constimage(64, 64, 3, oiio.HALF, (.1, .2, .3)), make_constimage(64, 64, 3, oiio.HALF, (.1, .1, .1), 20, 20))
# 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() # transpose b = ImageBufAlgo.transpose (ImageBuf("../oiiotool/src/image.tif")) write (b, "transpose.tif") # circular_shift b = ImageBufAlgo.circular_shift (ImageBuf("../oiiotool/src/image.tif"), 100, 50) write (b, "cshift.tif") # clamp b = ImageBufAlgo.resize (grid, roi=oiio.ROI(0,500,0,500)) b = ImageBufAlgo.clamp (b, (0.2,0.2,0.2,0.2), (100,100,0.5,1)) write (b, "grid-clamped.tif", oiio.UINT8) # add b = ImageBufAlgo.add (gray128, 0.25) write (b, "cadd1.exr") b = ImageBufAlgo.add (gray128, (0, 0.25, -0.25)) write (b, "cadd2.exr") b = ImageBufAlgo.add (make_constimage(64,64,3,oiio.HALF,(.1,.2,.3)), make_constimage(64,64,3,oiio.HALF,(.1,.1,.1),20,20)) write (b, "add.exr")