हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
वाइड गैमट कैप्चर
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Android 14 या इसके बाद के वर्शन वाले डिवाइसों के लिए, Android डिसप्ले P3 वाइड गैमट कैप्चर की सुविधा देता है. डिवाइस, ImageReader
क्लास की मदद से, 10-बिट एचडीआर का इस्तेमाल किए बिना, वाइड गैमट वाली कलर इमेज को JPEG फ़ॉर्मैट में कैप्चर कर सकते हैं. इस सुविधा की मदद से, डिवाइसों को SessionConfiguration
में setColorSpace
पैरामीटर का इस्तेमाल करके, Camera2 फ़्रेमवर्क से वाइड गैमट कलर स्पेस में कैमरे से फ़ोटो लेने का अनुरोध करने की सुविधा मिलती है.
ज़रूरी शर्तें
वाइड गैमट कैप्चर की सुविधा इस्तेमाल करने के लिए, डिवाइस में वाइड गैमट कलर की सुविधाओं वाले कैमरे का ऐक्सेस होना चाहिए.
लागू करना
Display P3 वाइड गैमट कैप्चर के अनुरोधों को पूरा करने के लिए, यह तरीका अपनाएं:
Stream.aidl
में colorSpace
फ़ील्ड पढ़ें और उसे आउटपुट स्ट्रीम पर लागू करें.
android.request.availableColorSpaceProfilesMap
मेटाडेटा की एंट्री लागू करें.
android.request.availableCapabilities
में COLOR_SPACE_PROFILES
की सुविधा की शिकायत करें.
P3 वाइड गैमट कैप्चर की सुविधा के साथ काम करने वाले कैमरा एचएएल को लागू करने के बारे में जानकारी पाने के लिए, /hardware/google/camera/devices/EmulatedCamera/hwl/
configs/emu_camera_back.json
में ये देखें:
Camera HAL में वाइड गैमट कैप्चर के बारे में ज़्यादा जानकारी के लिए, metadata_definitions.xml
में ये वैल्यू देखें:
API
Android 14 या इसके बाद के वर्शन वाले ऐसे डिवाइसों के लिए जिनमें वाइड गैमट कैप्चर की सुविधा काम करती है, कैमरा क्लाइंट इन सार्वजनिक एपीआई का इस्तेमाल कर सकते हैं:
ColorSpace
पैरामीटर की अनुमानित वैल्यू, ColorSpace.Named
क्लास से ली जाती हैं. Android 14 में, SRGB
, DISPLAY_P3
, और BT2020_HLG
का इस्तेमाल किया जा सकता है.
पुष्टि करें
Display P3 वाइड गैमट कैप्चर की सुविधा को लागू करने की पुष्टि करने के लिए, ये जांच करें.
CTS
android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#test8BitColorSpaceOutputCharacteristics
android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#test10BitColorSpaceOutputCharacteristics
android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#testColorSpaceProfileMap
android.hardware.camera2.cts.ImageReaderTest#testDisplayP3Jpeg
android.hardware.camera2.cts.ImageReaderTest#testDisplayP3JpegRepeating
android.hardware.camera2.cts.ImageReaderTest#testDisplayP3Heic
android.hardware.camera2.cts.ImageReaderTest#testDisplayP3HeicRepeating
आईटीएस
इन चीज़ों की पुष्टि करने के लिए, कैमरा इमेज टेस्ट सुइट (आईटीएस) के टेस्ट चलाएं:
- सही रंग-तमक कोऑर्डिनेट वाली ICC प्रोफ़ाइल मौजूद होना
- इमेज में sRGB गैमट से बाहर का पिक्सल डेटा है
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["# Wide gamut capture\n\nFor devices running Android 14 or higher, Android\nprovides support for Display P3 wide gamut capture. Devices can capture wide\ngamut color images in JPEG format with the `ImageReader` class without\nusing [10-bit HDR](/docs/core/camera/10-bit-camera-output). This feature lets\ndevices\nrequest camera capture in a wide gamut color space to the Camera2 framework\nthrough the [`setColorSpace`](https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setColorSpace(android.graphics.ColorSpace.Named)) parameter in `SessionConfiguration`.\n\nRequirements\n------------\n\nTo support wide gamut capture, the device must have access to a camera with wide\ngamut color capabilities.\n\nImplementation\n--------------\n\nTo support Display P3 wide gamut capture requests, do the following:\n\n- Read the `colorSpace` field in [`Stream.aidl`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/camera/device/aidl/android/hardware/camera/device/Stream.aidl) and apply it to the output stream.\n- Implement the `android.request.availableColorSpaceProfilesMap` metadata entry.\n- Report the `COLOR_SPACE_PROFILES` capability in `android.request.availableCapabilities`.\n\nFor a reference Camera HAL implementation supporting P3 wide gamut capture,\nsee the following in `/hardware/google/camera/devices/EmulatedCamera/hwl/\nconfigs/emu_camera_back.json`:\n\n- [`android.request.availableCapabilities`](https://android.googlesource.com/platform/hardware/google/camera/+/refs/heads/android16-release/devices/EmulatedCamera/hwl/configs/emu_camera_back.json#183)\n- [`android.request.availableColorSpaceProfilesMap`](https://android.googlesource.com/platform/hardware/google/camera/+/refs/heads/android16-release/devices/EmulatedCamera/hwl/configs/emu_camera_back.json#211)\n\nFor further details on wide gamut capture in the Camera HAL, see the following\nvalues in `metadata_definitions.xml`:\n\n- [`availableColorSpaceProfiles`](https://android.googlesource.com/platform/system/media/+/refs/heads/android16-release/camera/docs/metadata_definitions.xml#7163)\n- [`availableColorSpaceProfilesMap`](https://android.googlesource.com/platform/system/media/+/refs/heads/android16-release/camera/docs/metadata_definitions.xml#7184)\n- [`COLOR_SPACE_PROFILES`](https://android.googlesource.com/platform/system/media/+/refs/heads/android16-release/camera/docs/metadata_definitions.xml#6610)\n\n### APIs\n\nFor devices running Android 14 or higher with support\nfor wide gamut capture, camera clients can use the following public APIs:\n\n- [`ColorSpaceProfiles`](https://developer.android.com/reference/android/hardware/camera2/params/ColorSpaceProfiles)\n- [`setColorSpace`](https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setColorSpace(android.graphics.ColorSpace.Named))\n\nThe expected values for the `ColorSpace` parameter are derived from the\n[`ColorSpace.Named`](https://developer.android.com/reference/kotlin/android/graphics/ColorSpace.Named)\nclass. In Android 14, `SRGB`, `DISPLAY_P3`,\nand `BT2020_HLG` are supported.\n\nValidation\n----------\n\nTo validate your implementation of Display P3 wide gamut capture support, run\nthe following tests.\n\n### CTS\n\n- `android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#test8BitColorSpaceOutputCharacteristics`\n- `android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#test10BitColorSpaceOutputCharacteristics`\n- `android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#testColorSpaceProfileMap`\n- `android.hardware.camera2.cts.ImageReaderTest#testDisplayP3Jpeg`\n- `android.hardware.camera2.cts.ImageReaderTest#testDisplayP3JpegRepeating`\n- `android.hardware.camera2.cts.ImageReaderTest#testDisplayP3Heic`\n- `android.hardware.camera2.cts.ImageReaderTest#testDisplayP3HeicRepeating`\n\n### ITS\n\nRun the\n[Camera Image Test Suite (ITS)](/docs/compatibility/cts/camera-its)\ntests to validate the following:\n\n- Presence of an ICC profile with correct chromaticity coordinates\n- Image contains pixel data outside the sRGB gamut"]]