Composting, part 2: practice
暂无分享,去创建一个
For pt. 1 see ibid., 1994. The author discusses the practice of image composting and in particular the Porter-Duff "over" operator. In part 1 we derived the operator for compositing a foreground pixel F "over" a background pixel B as: B(1-F/spl alpha/)+F, where each pixel is a vector with four components: red, green, blue, and alpha (the coverage or opacity amount), and standard vector algebra applies. I've found it most useful to provide "over" as an inplace operator; you have an image stored in a frame buffer and want to lay another image on top of it. In other words, the result of "F over B" replaces B. Pixel representation, conversions, pixel arithmetic, 16-bit over 8-bit, 8-bit over 8-bit, and other 8-bit possibilities are discussed.<<ETX>>