Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 1.75 KB

File metadata and controls

63 lines (44 loc) · 1.75 KB
layout title description keywords permalink
default-layout
CNormalizedImageResult Class
This page shows CNormalizedImageResult class definition of Dynamsoft Document Normalizer SDK C++ Edition.
GetImageData, CNormalizedImageResult, api reference
/programming/cplusplus/api-reference/normalized-image-result.html

CNormalizedImageResult Class

Stores the normalized image result.

class dynamsoft::ddn::CNormalizedImageResult
Method Description
GetImageData Gets the image data of the NormalizedImageResult.
SaveToFile Save the normalized image result to a file.

GetImageData

Gets the image data of the NormalizedImageResult.

const CImageData* GetImageData() 

Return Value

The image data.

SaveToFile

Save the image data to a file.

int dynamsoft::ddn::CDocumentNormalizer::SaveToFile(const char* filePath)

Parameters

[in] filePath The path of the output image file with the extension specifying the image format. It supports BMP, PNG, JPEG and PDF file types. If the target file exists, the image will be appended to the last page of the PDF file while the BMP, PNG and JPEG file will be replaced.

Return Value

Returns error code (returns 0 if the function operates successfully).

You can call DC_GetErrorString to get detailed error message.

Code Snippet

CDocumentNormalizer ddn;
CNormalizedImageResult* normalizedResult = NULL;
ddn.Normalize("YOUR-SOURCE-FILE-PATH", "", NULL, &normalizedResult);
if (normalizedResult != NULL)
{   
    normalizedResult->SaveToFile("YOUR-TARGET-FILE-PATH");
    CDocumentNormalizer::FreeNormalizedImageResult(&normalizedResult);
}