EyeQ Docs

Error Code Index

Complete index of error codes and their meanings

This page provides a comprehensive reference for all status codes returned by the Perfectly Clear SDK. Use this guide to interpret return values and determine the appropriate action.

How return codes work

The SDK uses different return code systems depending on the function:

  • PFC_AutoCorrect() and PFC_Apply(): Return a composite integer that encodes status for multiple features
  • PFC_SetProtectionPath(): Returns license validation status
  • PFC_ReadPresets(): Returns preset loading status

Interpreting composite return codes

When PFC_AutoCorrect() or PFC_Apply() returns a value greater than zero, it's a warning code that contains status information for four correction features encoded in different byte positions:

BitsMacroFeature
0–7NRRETCODE(x)Noise Removal status
8–15CORERETCODE(x)Core correction status
16–23FBRETCODE(x)Face Beautification status
24–31RERETCODE(x)Red Eye Removal status

The following example demonstrates how to decode a composite return code:

PFCAPPLYSTATUS status = PFC_Apply(&im, pEngine, pProfile, param, NULL, 100, NULL);

if (status > APPLY_SUCCESS) {
    // Extract individual feature statuses
    int nrStatus = NRRETCODE(status);
    int coreStatus = CORERETCODE(status);
    int fbStatus = FBRETCODE(status);
    int reStatus = RERETCODE(status);
    
    printf("Noise Removal status: %d\n", nrStatus);
    printf("Core correction status: %d\n", coreStatus);
    printf("Face Beautification status: %d\n", fbStatus);
    printf("Red Eye Removal status: %d\n", reStatus);
}

Apply function status codes

These codes are returned by PFC_AutoCorrect() and PFC_Apply() as the primary return value when the operation fails or completes with warnings.

Success and errors (PFCAPPLYSTATUS)

The PFCAPPLYSTATUS enumeration defines all possible return values from the apply functions. Negative values indicate errors that prevented processing, while zero indicates success:

CodeConstantMeaningSolution
0APPLY_SUCCESSCorrection successfulNo action needed
-1APPLY_ERROR_PROFILE_MISSINGpProfile pointer is NULLEnsure PFC_Calc() was called first and returned a valid profile
-2APPLY_ERROR_ENGINE_MISSINGpEngine pointer is NULLCreate an engine with PFC_CreateEngine() before calling
-3APPLY_CANCELLEDOperation was cancelledCheck your progress callback if using one
-4APPLY_NOSOURCEpImage pointer is NULLProvide a valid PFCIMAGE structure
-5APPLY_BADFORMATPixel format not supportedUse a supported PFCPIXELFORMAT value
-6APPLY_INVALIDLICENSEInvalid license or validation failedCheck license setup with PFC_SetProtectionPath()
-7APPLY_WASM_INVALID_DOMAINWrong domain for WASM certificateVerify WASM certificate matches deployment domain
-8APPLY_WASM_INVALID_APIKEYWrong API key for WASM certificateCheck WASM API key provided by EyeQ
-9APPLY_WASM_INVALID_CERTIFICATEWASM certificate invalidObtain a valid certificate from EyeQ
-10APPLY_WASM_EXPIRED_CERTIFICATEWASM certificate has expiredRenew certificate with EyeQ
-11APPLY_WASM_CERTIFICATE_WRONG_VERSIONWrong certificate format versionUpdate to current certificate format
-12APPLY_LOOKS_MISSINGtried to apply a LUT but the LUTs file was not foundVerify the .LOOKS file is present and the path is correct. Verify the LUT GUID you are trying to apply is preset within the .LOOKS file.
-13APPLY_ERROR_AI_CORRECTION_MISSINGTried to apply AI-based correction but is not availableVerify that the PFCAIEngine properly loaded the necessary AI models.

Feature-specific status codes

When the return code is greater than zero, extract individual feature statuses using the decoding macros. Each feature has its own status enumeration.

Noise removal status (PFCNR_STATUS)

The noise removal status indicates whether noise reduction was successfully applied. Extract this value using NRRETCODE(status):

CodeConstantMeaningSolution
0PFC_NR_SUCCESSNoise removal successfulNo action needed
1PFC_NR_NOTENABLEDFeature not enabledEnable noise removal in PFCPARAM if desired
2PFC_NR_FULLRES_REQUIREDSource image missingProvide full resolution image
3PFC_NR_CANCELLEDProcess cancelledCheck progress callback
4PFC_NR_ERRBITMAPError reading image dataVerify image buffer is valid
5PFC_NR_ERRSETTINGSInvalid parameterCheck noise removal parameters
6PFC_NR_MISC_ERRORGeneral errorReview all inputs and retry
7PFC_NR_NOTFOUNDNoise not detectedImage may not need noise removal

Core correction status (PFCCORE_STATUS)

The core correction status reflects the outcome of exposure, color, and contrast adjustments. Extract this value using CORERETCODE(status):

CodeConstantMeaningSolution
0PFC_CORE_SUCCESSCore correction successfulNo action needed
1PFC_CORE_NOTENABLEDFeature not enabledEnable core corrections in PFCPARAM
2PFC_CORE_CANCELLEDProcess cancelledCheck progress callback
3PFC_CORE_NOSOURCEIMAGESource image missingProvide valid PFCIMAGE
4PFC_CORE_INSUFFICIENTMEMORYOut of memoryReduce image size or free memory
5PFC_CORE_MONOLITHIMAGEImage skipped (legacy clipart detection)Image classified as non-photographic
6PFC_CORE_BELOWMINSIZEImage too small (< 32 pixels)Use larger images
7PFC_CORE_CLIPARTIMAGEImage skipped (AI clipart detection)Image classified as clipart/graphic

Face beautification status (PFCFB_STATUS)

The face beautification status indicates whether facial enhancements were applied. Extract this value using FBRETCODE(status):

CodeConstantMeaningSolution
0PFC_FB_SUCCESSFace beautification successfulNo action needed
1PFC_FB_NOTENABLEDFeature not enabledEnable face beautification in PFCPARAM
2PFC_FB_WARNINGFace not detectedNormal for images without faces
3PFC_FB_FULLRES_REQUIREDSource image missingProvide full resolution image
4PFC_FB_CANCELLEDProcess cancelledCheck progress callback
5PFC_FB_FUNCTION_ERRORUnable to locate function in SFB libraryVerify SFB library installation
6PFC_FB_CREATE_ENGINE_FAILEDUnable to create SFB EngineCheck SFB library dependencies
7PFC_FB_ANALYSIS_FAILEDFace analysis did not completeMay be memory or library issue
8PFC_FB_NO_CORRECTIONNo correction occurredFaces detected but no corrections applied
9PFC_FB_NOT_EXECUTEDNot executedFeature was skipped
10PFC_FB_NOT_AVAILABLEFeature not availableFace beautification module not included in SDK

Red eye removal status (PFCRE_STATUS)

The red eye removal status indicates whether red eye correction was applied. Extract this value using RERETCODE(status):

CodeConstantMeaningSolution
0PFC_RE_SUCCESSRed eye removal successfulNo action needed
1PFC_RE_NOTENABLEDFeature not enabledEnable red eye removal in PFCPARAM
2PFC_RE_FULLRES_REQUIREDSource image missingProvide full resolution image
3PFC_RE_NOT_FOUNDRed eye not detectedNormal for images without red eye
4PFC_RE_GEN_ERRORGeneral errorReview inputs and retry
5PFC_RE_INVALID_PARAMETERInvalid parameterCheck red eye parameters
6PFC_RE_NO_MEMORYInsufficient memoryFree memory and retry
7PFC_RE_CANCELLEDProcess cancelledCheck progress callback
8PFC_RE_NOT_SUPPORTEDNot supportedFeature may not be available on platform

License status codes

These codes are returned by PFC_SetProtectionPath() and indicate the result of license validation:

CodeMeaningAction
0OKLicense validated successfully
101Undetermined errorCheck license folder setup
102Active licenseLicense is valid and active
103Active trialTrial license is active
104License expiredContact EyeQ to renew license
105System time tamperedRestore correct system time
106Product not authorizedContact EyeQ about authorization
107Product not foundVerify license files are present
108Invalid licenseCheck license.key file
109License returnedLicense was previously returned
110Product inactiveContact EyeQ to activate
111Invalid trial periodTrial configuration error
112Too many activationsContact EyeQ to reset activations
113Trial expiredPurchase full license
114License number inactiveContact EyeQ support
115Exceed allowed activationsNode limit reached; contact EyeQ
116Subscription expiredRenew subscription
117Invalid system dateCorrect system date
118Product in invalid stateContact EyeQ support
119No available licensesAll seats in use; wait or purchase more
120Duplicate device IDContact EyeQ support
121High missing heartbeatNetwork connectivity issues

Preset loading status codes

These codes are returned by PFC_ReadPresets() and PFC_ReadPresetsFromStream() when loading correction parameters from preset files:

CodeMeaningSolution
0OKPreset loaded successfully
-1Attribute errorsCheck preset file for malformed attributes
-2Unable to open fileVerify file path exists and is readable
-3File read errorCheck file permissions and integrity
-4Parse errorPreset file has invalid XML structure
-5Cannot convert textEncoding issue; re-export preset
-6No text nodePreset file missing required content
-7Element depth exceededPreset structure too deeply nested
-8Invalid preset fileFile is not a valid Perfectly Clear preset

Status value decoder

Use this section to decode composite return values into their component feature statuses.

For a return code like 524288:

  1. Convert to hexadecimal: 524288 = 0x00080000
  2. Extract bytes:
    • Bits 0–7 (NR): 0x00 = 0 (success)
    • Bits 8–15 (Core): 0x00 = 0 (success)
    • Bits 16–23 (FB): 0x08 = 8 (PFC_FB_NO_CORRECTION)
    • Bits 24–31 (RE): 0x00 = 0 (success)

This indicates Face Beautification detected faces but applied no corrections (perhaps beautification parameters were all set to zero).

Quick decode formula

These C/C++ macro definitions from PerfectlyClearPro.h extract individual status values from a composite return code:

#define NRRETCODE(x)   (x & 0x000000FF)
#define CORERETCODE(x) ((x >> 8) & 0x000000FF)
#define FBRETCODE(x)   ((x >> 16) & 0x000000FF)
#define RERETCODE(x)   ((x >> 24) & 0x000000FF)

Common composite return values

This table lists frequently encountered composite return values and their meanings:

ValueHexNRCoreFBRETypical meaning
00x000000000000Complete success
20x000000022000NR needs full-res image
2560x000001000100Core not enabled
5120x000002000200Core cancelled
1310720x000200000020No faces detected
5242880x000800000080FB: no correction applied
503316480x030000000003Red eye not found

PFC-SDK Version 10.7.2.1269 built from 4fa849d8101945eea725a08dd0dae5101f090fa0 on 11-10-2025.

Copyright © 2026 EyeQ Imaging Inc. All rights reserved.

On this page