Convert To c#



  • Hello! How can I write this in C#?
    I need it, but don't have any ideas how to write, because I can't read c++ code

    const BYTE*			pSrc = (BYTE*)pFrame->ImageBuffer;
    		    const BYTE*			pSrcEnd = pSrc + (m_Width * m_Height);
    		    BYTE*				pDest = m_Buffer;
    		    const ULONG			remainder = ULONG_PADDING(m_Width);
    
    		    while (pSrc < pSrcEnd)
    		    {
    			    memcpy(pDest, pSrc, m_Width);
    			    pSrc  += m_Width;
    			    pDest += m_Width + remainder;
    		    }
    
                break;
    


  • I think this code copies the contents of an image (to a new image?).
    You could use the Image class (Image.Clone()) for this.


Anmelden zum Antworten