skew angel correction using java [closed]

asked 2020-01-02 00:10:01 -0500

david cairns gravatar image

I read the tutorial about skew angel correction in this site. but i need to convert those code in java.

so please help me how to convert code in java.

edit retag flag offensive reopen merge delete

Closed for the following reason spam or advertising by sturkmen
close date 2020-11-07 12:55:45.126690

Comments

1

what if you just start, and ask for help where you run into problems ?

show us, what you've tried so far, please !

berak gravatar imageberak ( 2020-01-02 04:09:58 -0500 )edit

I have tried this :-

BOOL CScannedDocTestDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
    m_Image.Destroy();
    HRESULT hr = m_Image.Load(lpszPathName);

    if(SUCCEEDED(hr))
    {
        int nPitch = m_Image.GetPitch();
        int nWidth = m_Image.GetWidth();
        int nHeight = m_Image.GetHeight();

        int nBytesPerPixel = m_Image.GetBPP() / 8;
        if(nBytesPerPixel)
        { 
            byte* pGrayScaleBits = NULL;
            // Get a gray scaled bitmap and bitmap bits from the original image
            m_hBmpGrayScale = ImageFunctions::GetGrayScaleImage((HBITMAP)m_Image, 
            nWidth, nHeight, nBytesPerPixel, nPitch, &pGrayScaleBits);
            if(pGrayScaleBits != NULL)
            {
                // Find out if the image is a regular image or text image
david cairns gravatar imagedavid cairns ( 2020-01-03 00:10:56 -0500 )edit