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()andPFC_Apply(): Return a composite integer that encodes status for multiple featuresPFC_SetProtectionPath(): Returns license validation statusPFC_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:
| Bits | Macro | Feature |
|---|---|---|
| 0–7 | NRRETCODE(x) | Noise Removal status |
| 8–15 | CORERETCODE(x) | Core correction status |
| 16–23 | FBRETCODE(x) | Face Beautification status |
| 24–31 | RERETCODE(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:
| Code | Constant | Meaning | Solution |
|---|---|---|---|
0 | APPLY_SUCCESS | Correction successful | No action needed |
-1 | APPLY_ERROR_PROFILE_MISSING | pProfile pointer is NULL | Ensure PFC_Calc() was called first and returned a valid profile |
-2 | APPLY_ERROR_ENGINE_MISSING | pEngine pointer is NULL | Create an engine with PFC_CreateEngine() before calling |
-3 | APPLY_CANCELLED | Operation was cancelled | Check your progress callback if using one |
-4 | APPLY_NOSOURCE | pImage pointer is NULL | Provide a valid PFCIMAGE structure |
-5 | APPLY_BADFORMAT | Pixel format not supported | Use a supported PFCPIXELFORMAT value |
-6 | APPLY_INVALIDLICENSE | Invalid license or validation failed | Check license setup with PFC_SetProtectionPath() |
-7 | APPLY_WASM_INVALID_DOMAIN | Wrong domain for WASM certificate | Verify WASM certificate matches deployment domain |
-8 | APPLY_WASM_INVALID_APIKEY | Wrong API key for WASM certificate | Check WASM API key provided by EyeQ |
-9 | APPLY_WASM_INVALID_CERTIFICATE | WASM certificate invalid | Obtain a valid certificate from EyeQ |
-10 | APPLY_WASM_EXPIRED_CERTIFICATE | WASM certificate has expired | Renew certificate with EyeQ |
-11 | APPLY_WASM_CERTIFICATE_WRONG_VERSION | Wrong certificate format version | Update to current certificate format |
-12 | APPLY_LOOKS_MISSING | tried to apply a LUT but the LUTs file was not found | Verify 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. |
-13 | APPLY_ERROR_AI_CORRECTION_MISSING | Tried to apply AI-based correction but is not available | Verify 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):
| Code | Constant | Meaning | Solution |
|---|---|---|---|
0 | PFC_NR_SUCCESS | Noise removal successful | No action needed |
1 | PFC_NR_NOTENABLED | Feature not enabled | Enable noise removal in PFCPARAM if desired |
2 | PFC_NR_FULLRES_REQUIRED | Source image missing | Provide full resolution image |
3 | PFC_NR_CANCELLED | Process cancelled | Check progress callback |
4 | PFC_NR_ERRBITMAP | Error reading image data | Verify image buffer is valid |
5 | PFC_NR_ERRSETTINGS | Invalid parameter | Check noise removal parameters |
6 | PFC_NR_MISC_ERROR | General error | Review all inputs and retry |
7 | PFC_NR_NOTFOUND | Noise not detected | Image 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):
| Code | Constant | Meaning | Solution |
|---|---|---|---|
0 | PFC_CORE_SUCCESS | Core correction successful | No action needed |
1 | PFC_CORE_NOTENABLED | Feature not enabled | Enable core corrections in PFCPARAM |
2 | PFC_CORE_CANCELLED | Process cancelled | Check progress callback |
3 | PFC_CORE_NOSOURCEIMAGE | Source image missing | Provide valid PFCIMAGE |
4 | PFC_CORE_INSUFFICIENTMEMORY | Out of memory | Reduce image size or free memory |
5 | PFC_CORE_MONOLITHIMAGE | Image skipped (legacy clipart detection) | Image classified as non-photographic |
6 | PFC_CORE_BELOWMINSIZE | Image too small (< 32 pixels) | Use larger images |
7 | PFC_CORE_CLIPARTIMAGE | Image 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):
| Code | Constant | Meaning | Solution |
|---|---|---|---|
0 | PFC_FB_SUCCESS | Face beautification successful | No action needed |
1 | PFC_FB_NOTENABLED | Feature not enabled | Enable face beautification in PFCPARAM |
2 | PFC_FB_WARNING | Face not detected | Normal for images without faces |
3 | PFC_FB_FULLRES_REQUIRED | Source image missing | Provide full resolution image |
4 | PFC_FB_CANCELLED | Process cancelled | Check progress callback |
5 | PFC_FB_FUNCTION_ERROR | Unable to locate function in SFB library | Verify SFB library installation |
6 | PFC_FB_CREATE_ENGINE_FAILED | Unable to create SFB Engine | Check SFB library dependencies |
7 | PFC_FB_ANALYSIS_FAILED | Face analysis did not complete | May be memory or library issue |
8 | PFC_FB_NO_CORRECTION | No correction occurred | Faces detected but no corrections applied |
9 | PFC_FB_NOT_EXECUTED | Not executed | Feature was skipped |
10 | PFC_FB_NOT_AVAILABLE | Feature not available | Face 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):
| Code | Constant | Meaning | Solution |
|---|---|---|---|
0 | PFC_RE_SUCCESS | Red eye removal successful | No action needed |
1 | PFC_RE_NOTENABLED | Feature not enabled | Enable red eye removal in PFCPARAM |
2 | PFC_RE_FULLRES_REQUIRED | Source image missing | Provide full resolution image |
3 | PFC_RE_NOT_FOUND | Red eye not detected | Normal for images without red eye |
4 | PFC_RE_GEN_ERROR | General error | Review inputs and retry |
5 | PFC_RE_INVALID_PARAMETER | Invalid parameter | Check red eye parameters |
6 | PFC_RE_NO_MEMORY | Insufficient memory | Free memory and retry |
7 | PFC_RE_CANCELLED | Process cancelled | Check progress callback |
8 | PFC_RE_NOT_SUPPORTED | Not supported | Feature may not be available on platform |
License status codes
These codes are returned by PFC_SetProtectionPath() and indicate the result of license validation:
| Code | Meaning | Action |
|---|---|---|
0 | OK | License validated successfully |
101 | Undetermined error | Check license folder setup |
102 | Active license | License is valid and active |
103 | Active trial | Trial license is active |
104 | License expired | Contact EyeQ to renew license |
105 | System time tampered | Restore correct system time |
106 | Product not authorized | Contact EyeQ about authorization |
107 | Product not found | Verify license files are present |
108 | Invalid license | Check license.key file |
109 | License returned | License was previously returned |
110 | Product inactive | Contact EyeQ to activate |
111 | Invalid trial period | Trial configuration error |
112 | Too many activations | Contact EyeQ to reset activations |
113 | Trial expired | Purchase full license |
114 | License number inactive | Contact EyeQ support |
115 | Exceed allowed activations | Node limit reached; contact EyeQ |
116 | Subscription expired | Renew subscription |
117 | Invalid system date | Correct system date |
118 | Product in invalid state | Contact EyeQ support |
119 | No available licenses | All seats in use; wait or purchase more |
120 | Duplicate device ID | Contact EyeQ support |
121 | High missing heartbeat | Network connectivity issues |
Preset loading status codes
These codes are returned by PFC_ReadPresets() and PFC_ReadPresetsFromStream() when loading correction parameters from preset files:
| Code | Meaning | Solution |
|---|---|---|
0 | OK | Preset loaded successfully |
-1 | Attribute errors | Check preset file for malformed attributes |
-2 | Unable to open file | Verify file path exists and is readable |
-3 | File read error | Check file permissions and integrity |
-4 | Parse error | Preset file has invalid XML structure |
-5 | Cannot convert text | Encoding issue; re-export preset |
-6 | No text node | Preset file missing required content |
-7 | Element depth exceeded | Preset structure too deeply nested |
-8 | Invalid preset file | File 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:
- Convert to hexadecimal:
524288=0x00080000 - 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)
- Bits 0–7 (NR):
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:
| Value | Hex | NR | Core | FB | RE | Typical meaning |
|---|---|---|---|---|---|---|
0 | 0x00000000 | 0 | 0 | 0 | 0 | Complete success |
2 | 0x00000002 | 2 | 0 | 0 | 0 | NR needs full-res image |
256 | 0x00000100 | 0 | 1 | 0 | 0 | Core not enabled |
512 | 0x00000200 | 0 | 2 | 0 | 0 | Core cancelled |
131072 | 0x00020000 | 0 | 0 | 2 | 0 | No faces detected |
524288 | 0x00080000 | 0 | 0 | 8 | 0 | FB: no correction applied |
50331648 | 0x03000000 | 0 | 0 | 0 | 3 | Red 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.