# div b = ImageBuf() ImageBufAlgo.div (b, gray64, make_constimage (64, 64, 3, oiio.HALF, (2.0,1,0.5))) write (b, "div.exr", oiio.HALF) b = ImageBuf() ImageBufAlgo.div (b, gray64, 2.0) write (b, "divc1.exr", oiio.HALF) b = ImageBuf() ImageBufAlgo.div (b, gray64, (2.0,1,0.5)) write (b, "divc2.exr", oiio.HALF) # invert a = ImageBuf ("../oiiotool/tahoe-small.tif") b = ImageBuf() ImageBufAlgo.invert (b, a) write (b, "invert.tif", oiio.UINT8) # pow b = ImageBuf() ImageBufAlgo.pow (b, gray128, 2) write (b, "cpow1.exr") b = ImageBuf() ImageBufAlgo.pow (b, gray128, (2,2,1)) write (b, "cpow2.exr") # channel_sum b = ImageBuf() ImageBufAlgo.channel_sum (b, ImageBuf("../oiiotool/tahoe-small.tif"), (.2126,.7152,.0722)) write (b, "chsum.tif", oiio.UINT8)
# div b = ImageBuf() ImageBufAlgo.div(b, gray64, make_constimage(64, 64, 3, oiio.HALF, (2.0, 1, 0.5))) write(b, "div.exr", oiio.HALF) b = ImageBuf() ImageBufAlgo.div(b, gray64, 2.0) write(b, "divc1.exr", oiio.HALF) b = ImageBuf() ImageBufAlgo.div(b, gray64, (2.0, 1, 0.5)) write(b, "divc2.exr", oiio.HALF) # invert a = ImageBuf("../oiiotool/src/tahoe-small.tif") b = ImageBuf() ImageBufAlgo.invert(b, a) write(b, "invert.tif", oiio.UINT8) # pow b = ImageBuf() ImageBufAlgo.pow(b, gray128, 2) write(b, "cpow1.exr") b = ImageBuf() ImageBufAlgo.pow(b, gray128, (2, 2, 1)) write(b, "cpow2.exr") # channel_sum b = ImageBuf() ImageBufAlgo.channel_sum(b, ImageBuf("../oiiotool/src/tahoe-small.tif"), (.2126, .7152, .0722)) write(b, "chsum.tif", oiio.UINT8)
make_constimage(64, 64, 3, oiio.HALF, (.5, .5, .5)), (1.5, 1, 0.5), make_constimage(64, 64, 3, oiio.HALF, (0.1, 0.1, 0.1))) write(b, "mad3.exr", oiio.HALF) # div b = ImageBufAlgo.div(gray64, make_constimage(64, 64, 3, oiio.HALF, (2.0, 1, 0.5))) write(b, "div.exr", oiio.HALF) b = ImageBufAlgo.div(gray64, 2.0) write(b, "divc1.exr", oiio.HALF) b = ImageBufAlgo.div(gray64, (2.0, 1, 0.5)) write(b, "divc2.exr", oiio.HALF) # invert a = ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/tahoe-small.tif") b = ImageBufAlgo.invert(a) write(b, "invert.tif", oiio.UINT8) # pow b = ImageBufAlgo.pow(gray128, 2) write(b, "cpow1.exr") b = ImageBufAlgo.pow(gray128, (2, 2, 1)) write(b, "cpow2.exr") # channel_sum b = ImageBufAlgo.channel_sum( ImageBuf(OIIO_TESTSUITE_ROOT + "/oiiotool/src/tahoe-small.tif"), (.2126, .7152, .0722)) write(b, "chsum.tif", oiio.UINT8) # color_map
b = ImageBufAlgo.mad (make_constimage(64,64,3,oiio.HALF,(.5,.5,.5)), (1.5,1,0.5), make_constimage(64,64,3,oiio.HALF,(0.1,0.1,0.1))) write (b, "mad3.exr", oiio.HALF) # div b = ImageBufAlgo.div (gray64, make_constimage (64, 64, 3, oiio.HALF, (2.0,1,0.5))) write (b, "div.exr", oiio.HALF) b = ImageBufAlgo.div (gray64, 2.0) write (b, "divc1.exr", oiio.HALF) b = ImageBufAlgo.div (gray64, (2.0,1,0.5)) write (b, "divc2.exr", oiio.HALF) # invert a = ImageBuf ("../oiiotool/src/tahoe-small.tif") b = ImageBufAlgo.invert (a) write (b, "invert.tif", oiio.UINT8) # pow b = ImageBufAlgo.pow (gray128, 2) write (b, "cpow1.exr") b = ImageBufAlgo.pow (gray128, (2,2,1)) write (b, "cpow2.exr") # channel_sum b = ImageBufAlgo.channel_sum (ImageBuf("../oiiotool/src/tahoe-small.tif"), (.2126,.7152,.0722)) write (b, "chsum.tif", oiio.UINT8) # color_map b = ImageBufAlgo.color_map (tahoetiny, -1, "inferno")