# fill (including use of ROI) b = ImageBuf(ImageSpec(256, 256, 3, oiio.UINT8)) ImageBufAlgo.fill(b, (1, 0.5, 0.5)) ImageBufAlgo.fill(b, (0, 1, 0), oiio.ROI(100, 180, 100, 180)) write(b, "filled.tif") # checker b = ImageBuf(ImageSpec(256, 256, 3, oiio.UINT8)) ImageBufAlgo.checker(b, 64, 64, 64, (1, .5, .5), (.5, 1, .5), 10, 5) write(b, "checker.tif") # noise-uniform b = ImageBuf(ImageSpec(64, 64, 3, oiio.UINT8)) ImageBufAlgo.zero(b) ImageBufAlgo.noise(b, "uniform", 0.25, 0.75) write(b, "noise-uniform3.tif") # noise-gaussian b = ImageBuf(ImageSpec(64, 64, 3, oiio.UINT8)) ImageBufAlgo.zero(b) ImageBufAlgo.noise(b, "gaussian", 0.5, 0.1) write(b, "noise-gauss.tif") # noise-gaussian b = ImageBuf(ImageSpec(64, 64, 3, oiio.UINT8)) ImageBufAlgo.zero(b) ImageBufAlgo.noise(b, "salt", 1, 0.01) write(b, "noise-salt.tif") # channels, channel_append
# fill (including use of ROI) b = ImageBuf (ImageSpec(256,256,3,oiio.UINT8)); ImageBufAlgo.fill (b, (1,0.5,0.5)) ImageBufAlgo.fill (b, (0,1,0), oiio.ROI(100,180,100,180)) write (b, "filled.tif") # checker b = ImageBuf (ImageSpec(256,256,3,oiio.UINT8)) ImageBufAlgo.checker (b, 64, 64, 64, (1,.5,.5), (.5,1,.5), 10, 5) write (b, "checker.tif") # noise-uniform b = ImageBuf (ImageSpec(64,64,3,oiio.UINT8)) ImageBufAlgo.zero (b) ImageBufAlgo.noise (b, "uniform", 0.25, 0.75) write (b, "noise-uniform3.tif") # noise-gaussian b = ImageBuf (ImageSpec(64,64,3,oiio.UINT8)) ImageBufAlgo.zero (b) ImageBufAlgo.noise (b, "gaussian", 0.5, 0.1); write (b, "noise-gauss.tif") # noise-gaussian b = ImageBuf (ImageSpec(64,64,3,oiio.UINT8)) ImageBufAlgo.zero (b) ImageBufAlgo.noise (b, "salt", 1, 0.01); write (b, "noise-salt.tif") # channels, channel_append
write(b, "black.tif", oiio.UINT8) # fill (including use of ROI) b = ImageBuf(ImageSpec(256, 256, 3, oiio.UINT8)) ImageBufAlgo.fill(b, (1, 0.5, 0.5)) ImageBufAlgo.fill(b, (0, 1, 0), oiio.ROI(100, 180, 100, 180)) write(b, "filled.tif", oiio.UINT8) # checker b = ImageBuf(ImageSpec(256, 256, 3, oiio.UINT8)) ImageBufAlgo.checker(b, 64, 64, 64, (1, .5, .5), (.5, 1, .5), 10, 5) write(b, "checker.tif", oiio.UINT8) # noise-uniform b = ImageBufAlgo.noise("white", 0.25, 0.75, roi=ROI(0, 64, 0, 64, 0, 1, 0, 3)) write(b, "noise-uniform3.tif", oiio.UINT8) # noise-blue b = ImageBufAlgo.noise("blue", 0.25, 0.75, roi=ROI(0, 64, 0, 64, 0, 1, 0, 3)) 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, "black.tif", oiio.UINT8) # fill (including use of ROI) b = ImageBuf(ImageSpec(256, 256, 3, oiio.UINT8)) ImageBufAlgo.fill(b, (1, 0.5, 0.5)) ImageBufAlgo.fill(b, (0, 1, 0), oiio.ROI(100, 180, 100, 180)) write(b, "filled.tif", oiio.UINT8) # checker b = ImageBuf(ImageSpec(256, 256, 3, oiio.UINT8)) ImageBufAlgo.checker(b, 64, 64, 64, (1, .5, .5), (.5, 1, .5), 10, 5) write(b, "checker.tif", oiio.UINT8) # noise-uniform b = ImageBufAlgo.noise("uniform", 0.25, 0.75, roi=ROI(0, 64, 0, 64, 0, 1, 0, 3)) write(b, "noise-uniform3.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-gaussian b = ImageBufAlgo.noise("salt", 1, 0.01, roi=ROI(0, 64, 0, 64, 0, 1, 0, 3)) write(b, "noise-salt.tif", oiio.UINT8) # channels, channel_append
b = ImageBufAlgo.zero (roi=oiio.ROI(0,320,0,240,0,1,0,3)) write (b, "black.tif", oiio.UINT8) # fill (including use of ROI) b = ImageBuf (ImageSpec(256,256,3,oiio.UINT8)); ImageBufAlgo.fill (b, (1,0.5,0.5)) ImageBufAlgo.fill (b, (0,1,0), oiio.ROI(100,180,100,180)) write (b, "filled.tif", oiio.UINT8) # checker b = ImageBuf (ImageSpec(256,256,3,oiio.UINT8)) ImageBufAlgo.checker (b, 64, 64, 64, (1,.5,.5), (.5,1,.5), 10, 5) write (b, "checker.tif", oiio.UINT8) # noise-uniform b = ImageBufAlgo.noise ("uniform", 0.25, 0.75, roi=ROI(0,64,0,64,0,1,0,3)) write (b, "noise-uniform3.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-gaussian b = ImageBufAlgo.noise ("salt", 1, 0.01, roi=ROI(0,64,0,64,0,1,0,3)); write (b, "noise-salt.tif", oiio.UINT8) # channels, channel_append b = ImageBufAlgo.channels (grid, (0.25,2,"G")) write (b, "chanshuffle.tif") b = ImageBufAlgo.channels (ImageBuf("../oiiotool/src/rgbaz.exr"), ("R","G","B","A"))