Beispiel #1
0
 public BlenderGammaBGR(GammaLut g)
 {
     m_gamma = g;
 }
Beispiel #2
0
 public void Gamma(GammaLut g)
 {
     m_gamma = g;
 }
Beispiel #3
0
 public BlenderGammaBGR()
 {
     m_gamma = new GammaLut();
 }
Beispiel #4
0
 public FormatRGB(RasterBuffer rb, IBlender blender, GammaLut gammaTable)
 {
     m_rbuf = rb;
     Blender = blender;
 }
Beispiel #5
0
        //--------------------------------------------------------------------
        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);

        }
Beispiel #6
0
        /*
        //--------------------------------------------------------------------
        //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));
        }
Beispiel #7
0
 //--------------------------------------------------------------------
 public FormatRGBA(RasterBuffer rb, IBlender blender, GammaLut gammaTable)
     : this(rb, blender)
 {
     throw new System.NotImplementedException("Not using the gamma table yet.");
 }