public BlenderGammaBGR(GammaLut g) { m_gamma = g; }
public void Gamma(GammaLut g) { m_gamma = g; }
public BlenderGammaBGR() { m_gamma = new GammaLut(); }
public FormatRGB(RasterBuffer rb, IBlender blender, GammaLut gammaTable) { m_rbuf = rb; Blender = blender; }
//-------------------------------------------------------------------- public RGBA_Bytes ApplyGammaDir(GammaLut gamma) { //R_Byte = gamma.Dir((byte)R_Byte); //G_Byte = gamma.Dir((byte)G_Byte); //B_Byte = gamma.Dir((byte)B_Byte); return new RGBA_Bytes( gamma.Dir((byte)R_Byte), gamma.Dir((byte)G_Byte), gamma.Dir((byte)B_Byte), A_Byte); }
/* //-------------------------------------------------------------------- //template<class Function> public void for_each_pixel(Function f) { uint y; for(y = 0; y < height(); ++y) { row_data r = m_rbuf->row(y); if(r.ptr) { uint len = r.x2 - r.x1 + 1; value_type* p = (value_type*)m_rbuf->row_ptr(r.x1, y, len) + (r.x1 << 2); do { f(p); p += 4; } while(--len); } } } //-------------------------------------------------------------------- public void premultiply() { for_each_pixel(multiplier_rgba<color_type, order_type>::premultiply); } //-------------------------------------------------------------------- public void demultiply() { for_each_pixel(multiplier_rgba<color_type, order_type>::demultiply); } //-------------------------------------------------------------------- //template<class GammaLut> public void apply_gamma_dir(GammaLut g) { for_each_pixel(apply_gamma_dir_rgba<color_type, order_type, GammaLut>(g)); } //-------------------------------------------------------------------- //template<class GammaLut> */ public void ApplyGammaInv(GammaLut g) { throw new System.NotImplementedException(); //for_each_pixel(apply_gamma_inv_rgba<color_type, order_type, GammaLut>(g)); }
//-------------------------------------------------------------------- public FormatRGBA(RasterBuffer rb, IBlender blender, GammaLut gammaTable) : this(rb, blender) { throw new System.NotImplementedException("Not using the gamma table yet."); }