b = ImageBuf() ImageBufAlgo.channels(b, ImageBuf("../oiiotool/src/rgbaz.exr"), ("Z", )) write(b, "ch-z.exr") b = ImageBuf() ImageBufAlgo.channel_append(b, ImageBuf("ch-rgba.exr"), ImageBuf("ch-z.exr")) write(b, "chappend-rgbaz.exr") # flatten b = ImageBuf() ImageBufAlgo.flatten(b, ImageBuf("../oiiotool-deep/src/deepalpha.exr")) write(b, "flat.exr") # crop b = ImageBuf() ImageBufAlgo.crop(b, grid, oiio.ROI(50, 150, 200, 600)) write(b, "crop.tif") # cut b = ImageBuf() ImageBufAlgo.cut(b, grid, oiio.ROI(50, 150, 200, 600)) write(b, "cut.tif") # paste b = ImageBuf() b.copy(checker) ImageBufAlgo.paste(b, 150, 75, 0, 0, grid) write(b, "pasted.tif") # rotate90 b = ImageBuf()
write(b, "ch-rgba.exr") b = ImageBuf() ImageBufAlgo.channels(b, ImageBuf("../oiiotool/src/rgbaz.exr"), ("Z",)) write(b, "ch-z.exr") b = ImageBuf() ImageBufAlgo.channel_append(b, ImageBuf("ch-rgba.exr"), ImageBuf("ch-z.exr")) write(b, "chappend-rgbaz.exr") # flatten b = ImageBuf() ImageBufAlgo.flatten(b, ImageBuf("../oiiotool/src/deepalpha.exr")) write(b, "flat.exr") # crop b = ImageBuf() ImageBufAlgo.crop(b, grid, oiio.ROI(50, 150, 200, 600)) write(b, "crop.tif") # cut b = ImageBuf() ImageBufAlgo.cut(b, grid, oiio.ROI(50, 150, 200, 600)) write(b, "cut.tif") # paste b = ImageBuf() b.copy(checker) ImageBufAlgo.paste(b, 150, 75, 0, 0, grid) write(b, "pasted.tif") # rotate90 b = ImageBuf()
write(b, "noise-blue3.tif", oiio.UINT8) # noise-gaussian b = ImageBufAlgo.noise("gaussian", 0.5, 0.1, roi=ROI(0, 64, 0, 64, 0, 1, 0, 3)) write(b, "noise-gauss.tif", oiio.UINT8) # noise-salt b = ImageBufAlgo.noise("salt", 1, 0.01, roi=ROI(0, 64, 0, 64, 0, 1, 0, 3)) write(b, "noise-salt.tif", oiio.UINT8) # bluenoise_image b = ImageBufAlgo.bluenoise_image() b = ImageBufAlgo.crop(b, ROI(0, 64, 0, 64, 0, 1, 0, 3)) write(b, "bluenoise_image3.tif", oiio.UINT8) # channels, channel_append b = ImageBufAlgo.channels(grid, (0.25, 2, "G")) write(b, "chanshuffle.tif") b = ImageBufAlgo.channels( ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/rgbaz.exr"), ("R", "G", "B", "A")) write(b, "ch-rgba.exr") b = ImageBufAlgo.channels( ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/rgbaz.exr"), ("Z", )) write(b, "ch-z.exr") b = ImageBufAlgo.channel_append(ImageBuf("ch-rgba.exr"), ImageBuf("ch-z.exr")) write(b, "chappend-rgbaz.exr")