像PhotoShop中提供的那些颜色加深、线性加深、柔光等很多叠加方式,有哪位高人知道某一种叠加方式的具体算法是什么样的?

解决方案 »

  1.   

    如果是附图叠加加深的算法。这个就是很容易了。
    void CWinTestView::OnConstAdd() 
    {
    // TODO: Add your command handler code here
    CWinTestDoc* pDoc = GetDocument(); 
    ASSERT_VALID(pDoc);     for(int i=0; i<height; i++)
    {
    for(int j=0; j<width; j++)
    {
    int tempVal = pDoc->m_InImg[i][j]+60;
    tempVal = tempVal > 255 ? 255: tempVal;
    tempVal = tempVal <   0 ?   0: tempVal;
    pDoc->m_OutImg[i][j] = (unsigned char)tempVal;
    }
    } Invalidate(FALSE); //화면 갱신 
    }我设计中有一个简单的算法给您看看。没有做太多的修改。直接贴上来的。
      

  2.   

    不知道blueink兄有没有找到这方面资料    小弟感激不敬留下 和 QQ  271474740
      

  3.   

     模拟Photoshop中图层混合模式http://blog.csdn.net/laviewpbt/archive/2006/05/26/756464.aspx