Updated:2026-06-01
# Troubleshooting Guide for Mirroring and Reddish Screen Issues of LetMagic Beauty SDK: A Client Integration Case In actual integration of beauty SDKs, most problems do not stem from the core beauty algorithms. Instead, they occur in engineering-related links including image capture, preview, texture rendering, orientation processing, filter configuration and license verification. During a recent technical communication with a client integrating the LetMagic Beauty SDK, two typical issues were reported consecutively: 1. Horizontal mirroring and flipping on OpenGL preview screens 2. Overall reddish tint in captured photos and preview footage Although both fall into the category of display anomalies, they require totally different troubleshooting approaches. The mirroring issue is mainly related to the rendering pipeline, while the reddish screen is generally caused by improper beauty parameters and license configuration. This article sorts out practical troubleshooting notes based on this real integration case. ## I. Problem 1: Horizontal Mirroring on Preview Screens The client initially asked which parameter to adjust to enable or disable mirroring. Further communication confirmed that the issue referred to full horizontal flip of the entire preview view, rather than mirrored sticker assets. The problem took place during OpenGL preview rendering. This is a common issue when integrating beauty SDKs into live streaming, video chat, camera and social applications, especially for front-facing camera scenarios. Users expect a mirror-like viewing experience: - The screen responds synchronously when users move left or right - The preview conforms to regular selfie habits - Front-camera footage looks more natural during video calls Technically speaking, mirroring cannot be fixed by simply modifying a UI property. It may involve multiple modules: - Vertex coordinates - Texture coordinates - OpenGL rendering orientation - Camera capture direction - SDK preview encapsulation layer - Low-level C++ rendering logic ## II. Solutions for Preview Mirroring When asked which code class needed modification, our technical team offered two feasible solutions: adjusting vertex coordinates or texture coordinates. If your team maintains the independent OpenGL rendering pipeline, you may adopt either approach. ### Solution 1: Adjust Vertex Coordinates Vertex coordinates define the final position and orientation of displayed content on screen. Flipping values on the X-axis will realize horizontal mirroring. **Applicable scenarios**: - Your team encapsulates the OpenGL rendering logic independently - Custom GLSurfaceView or TextureView is used for preview - Unified orientation control is required for multiple textures *(Illustration 1: Schematic Diagram of OpenGL Horizontal Mirroring)* Left: Normal preview | Right: Horizontally mirrored preview | Note: X-axis coordinate inversion ### Solution 2: Adjust Texture Coordinates Texture coordinates determine which part of the original image will be rendered. Swapping U-axis texture coordinates can also achieve horizontal flip, which means changing the sampling order from left-to-right to right-to-left. **Applicable scenarios**: - The original video frames need to remain unchanged - Only the preview display requires mirroring - No impact on subsequent encoding, photo capture and streaming This is the recommended method for most video applications, as it only modifies the preview without altering original data. ## III. Mirror Configuration for LetMagic Beauty SDK Based on the screenshots provided by the client, we suggested prioritizing the native API: `hapiCapturePreView.setMirror` **Calling example**: `hapiCapturePreView.setMirror(mirrorHorizontal = true)` This dedicated interface directly controls horizontal mirroring of the preview. If you use the official preview component of LetMagic Beauty SDK, always try this API first before modifying OpenGL parameters or underlying C++ code. ### Recommended Troubleshooting Steps 1. **Verify component usage** If your project adopts the official `hapiCapturePreView`, call `hapiCapturePreView.setMirror(true)` with correct parameters. 2. **Confirm the scope of mirror effect** Check whether mirroring applies to preview, photo output, video recording or live stream separately. A common situation is mirrored preview with normal captured photos, or reversed frames seen by remote users during streaming. Analyze the full workflow step by step: Camera Capture → Beauty SDK Processing → OpenGL Preview → Photo / Video / Streaming / Encoding Do not judge the effect merely by on-screen display; always verify the final output. 3. **Check custom rendering logic if the API fails** If the mirror setting does not take effect, check the following items: - Confirm the preview object is correctly referenced - Check if upper-layer OpenGL rendering overwrites settings - Verify custom texture coordinate configuration - Inspect orientation processing in the C++ layer - Check differentiated rendering branches for front and rear cameras **Summary**: Use official SDK APIs first. Turn to the OpenGL rendering pipeline only when APIs do not work. ## IV. Problem 2: Overall Reddish Tint on Captured Photos The second issue reported was abnormal red tones across the entire picture. Many developers assume this is an algorithm defect, while the actual causes cover multiple links: - Improper filter parameters - Excessive ruddy skin effect - Incorrect beauty configurations - Camera white balance deviation - Abnormal orientation detection - Mismatched package names or license certificates - Color space differences across devices - Separate processing pipelines for preview and photo capture We first advised the client to inspect filters and ruddy skin parameters, as these are the most probable causes. For reddish screen issues, always check beauty configurations prior to underlying rendering logic. ## V. Key Parameters to Inspect for Reddish Screen ### 1. Filter Settings Most filters adjust image color temperature. Styles designed for sweet, fair and portrait enhancement will boost red, orange and skin tones. Excess filter intensity or warm ambient light will lead to an overall reddish look. **Troubleshooting steps**: 1. Disable all filters and check if colors return to normal 2. Lower filter intensity gradually and observe color changes 3. Switch to neutral-style filters for verification *(Illustration 2: Comparison of Different Filter Intensities)* Left: Filter disabled | Middle: 50% intensity | Right: 100% intensity Key observation: Changes on skin tones, white background and red areas ### 2. Ruddy Skin Effect Ruddy and pink skin effects are designed to present a healthier complexion. Overly high values will cause: - Excessively red facial skin - Oversaturated lips and cheeks - Warm tint across the whole frame - Red hue on white backgrounds **Debug suggestion**: Test progressively with values: 0 → 20 → 40 → 60. Avoid setting the value to maximum at the beginning. For social apps, live streaming and dating platforms, keep ruddy effects subtle. Natural visual experience helps improve user retention and conversion. ### 3. License and Certificate Verification If the SDK authorization is bound with application package name and signature certificate, mismatched information will trigger various anomalies: - Functional failures - Invalid parameter settings - Abnormal module loading - Inconsistent preview effects - Divergent performance across environments Pay special attention to these scenarios: - Normal performance on Debug builds but anomalies on Release builds - Stable local testing but errors after official packaging - Malfunctions after package name modification - Issues after Android signature replacement - Inconsistent authorization across channel packages **Checklist for authorization**: - App package name matches licensed information - Signature certificate is consistent with authorization - License file is placed in the correct directory - Different signatures for Debug and Release versions - Unified authorization configuration for all channel packages *(Illustration 3: SDK License Verification Workflow)* ### 4. Orientation Detection Abnormal orientation detection may interfere with face and skin area recognition, resulting in misapplied beauty effects and color distortion. Common risks include: - Inaccurate face orientation recognition - Differentiated orientation processing for front and rear cameras - Inconsistent orientation between input frames and preview - Unsynchronized coordinates after frame rotation If disabling filters and ruddy effects cannot resolve the problem, check the full orientation workflow: Camera input orientation → Preview orientation → SDK processing orientation → Face detection orientation → Photo output orientation ## VI. Standard Troubleshooting Workflow for Projects ### For horizontal mirroring issues 1. Distinguish whether the problem occurs on preview or final output 2. Test the official `setMirror` API 3. Verify separate configurations for front and rear cameras 4. Inspect OpenGL vertex coordinates 5. Inspect OpenGL texture coordinates 6. Check if underlying C++ rendering overwrites upper settings ### For reddish screen issues 1. Disable all filters 2. Turn off ruddy skin effects 3. Restore all beauty parameters to default 4. Verify package name, signature and license validity 5. Check orientation detection logic 6. Test on different devices and under various lighting conditions 7. Escalate to SDK technical support for further analysis ## VII. Best Practices for SDK Integration If your product involves live streaming, video chat, dating apps, short videos, online interviews or virtual avatar services, follow the guidelines below during beauty SDK integration. 1. **Verify all output links, not just local preview** Check effects respectively for local preview, saved photos, recorded videos and remote streaming. Most mirroring defects are only found on final output. 2. **Adjust beauty parameters moderately** Start with low-to-medium intensity for skin smoothing, whitening, ruddy effect, face slimming and eye enlargement. Overdone retouching looks unnatural and undermines user trust. **Recommended parameter range for social products**: - Skin smoothing: Medium - Whitening: Low to medium - Ruddy effect: Low - Filter: Low to medium - Face slimming: Slight - Eye enlargement: Slight The ideal effect is to present a better version of users while retaining authenticity. 3. **Confirm authorization information in advance** Prepare all relevant details before integration: official package name, test package name, Debug signature, Release signature, channel signatures, license version and SDK version. This effectively avoids inconsistencies between local testing and online release. 4. **Provide complete information when reporting issues** Attach the following materials to accelerate problem locating: - Screenshots or screen recordings of defects - SDK version, device model and system version - Front/rear camera in use - Current values of filters, ruddy effect and mirror settings - Changes to package name and signature - Reproducibility of the issue - Performance difference between Debug and Release builds ## VIII. Conclusion Beauty SDK integration covers the entire video processing chain: Capture → Orientation Processing → Beauty Retouching → Filtering → OpenGL Rendering → Preview → Photo / Streaming / Recording For mirroring anomalies, focus on the `setMirror` API, vertex coordinates and texture coordinates. For reddish screen issues, prioritize filters, ruddy parameters, license certificates and orientation detection. A mature beauty SDK delivers not only excellent algorithms, but also stable performance across complex real-world scenarios. This is the core value of LetMagic Beauty SDK: we provide professional beauty capabilities and help clients integrate features stably, naturally and controllably into their own products.