2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
Android 스크린샷의 HDR
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
HDR (High Dynamic Range) 동영상이 도입된 이후 스트리밍 서비스는 전체 화면 환경에 중점을 두고 HDR 동영상 스트리밍을 시작했습니다. 최근 소셜 미디어 앱에서 HDR 동영상 및 울트라 HDR 지원을 출시하여 다양한 앱에서 HDR 채택에 대한 관심이 증가하고 있음을 보여줍니다.
Android의 HDR 지원
다음은 지난 몇 년간 Android에서 HDR 기술을 지원한 주요 기록입니다.
Android 7
- HDR 동영상 디코딩 및 디스플레이에 대한 초기 지원
- HDR 기능의 지속적인 개선
Android 13
- HDR 동영상 캡처, 인코딩, 디스플레이를 위한 엔드 투 엔드 지원
- SDR과 HDR 간에 표시 가능한 다양한 휘도 범위를 정의하는 SDR 및 HDR 혼합 구성을 도입했습니다.
Android 14
HDR을 사용한 스크린샷 지원도 지난 몇 년 동안 발전했으며 여러 번 변경되었습니다.
HDR 스크린샷 기능 개선
이 섹션에서는 최근 Android 업데이트에서 HDR 스크린샷 기능의 진행 상황을 추적합니다.
Android 9
Android의 그래픽 컴포저인 SurfaceFlinger에 HDR 동영상 지원이 도입되었습니다. HDR 동영상 및 스크린샷의 GPU 렌더링은 복잡한 다항식 색조 매퍼로 지원됩니다. 이 색조 매핑 곡선은 디스플레이 색조 매퍼와 항상 일치하지 않으므로 스크린샷은 화면 콘텐츠와 다릅니다.
Android 13
톤 매핑 플러그인이 SurfaceFlinger의 GPU 렌더링 블록에 추가되어 OEM이 디스플레이의 톤 매핑 곡선에 맞는 GPU 셰이더를 제공할 수 있습니다. 스크린샷은 화면에 표시되는 내용과 거의 일치하지만 다음과 같은 차이점이 있습니다.
- 스크린샷은 SDR 형식으로 유지됩니다. 따라서 HDR 장면과 함께 보면 스크린샷 내 HDR 영역이 더 어둡게 보입니다.
- SDR 휘도가 관리되지 않아 스크린샷 내 SDR 콘텐츠가 HDR 콘텐츠처럼 밝게 표시됩니다.
즉, 스크린샷으로 캡처된 HDR 동영상은 SDR 동영상으로 변환됩니다.
Android 14
울트라 HDR은 스크린샷을 찍는 데 상당한 어려움을 야기합니다. 동영상과 달리 이미지는 일반적으로 UI 프레임버퍼 내에서 렌더링되며, 이는 두 가지 주요 의미를 갖습니다.
- 이미지에 주변 UI와 다른 이미지 처리(예: 색조 매핑)를 적용할 수 없습니다.
- 앱은 UI를 렌더링할 때 소스 기반 색조 매핑을 담당합니다.
이 문제를 완화하기 위해 다음과 같은 세 가지 스크린샷 구현이 가능합니다.
- 울트라 HDR 이미지의 HDR 세부정보를 보존하여 스크린샷에서 앱 UI가 어두워집니다.
- 앱 UI 세부정보를 보존하여 울트라 HDR 이미지가 잘립니다.
- HDR 하이라이트를 자르면서 앱 UI를 밝게 하여 타협합니다.
Android 14는 앱 UI를 밝게 하고 HDR 하이라이트를 자르는 세 번째 접근 방식을 구현합니다.
Android 15-QPR1
SurfaceFlinger에는 스크린샷을 위한 로컬 톤 매핑 알고리즘이 포함되어 있습니다. 이 프로세스에는 다음이 포함됩니다.
- 입력 이미지를 더 작은 이미지로 분할합니다.
- 각 이미지의 최대 밝기를 계산하고 각 섹션 내에서 낮은 밝기 값을 삭제합니다.
- 흐리게 처리 및 리샘플링을 통해 계산된 밝기를 보간합니다.
- 보간된 밝기 값을 기반으로 매개변수가 지정된 Reinhard 색조 매퍼를 입력 이미지에 적용합니다.
이 알고리즘은 다음 예와 같이 Android 14와 Android 15-QPR1 간에 스크린샷이 크게 개선되었음을 보여줍니다.
예 1은 울트라 HDR이 포함된 Chrome 페이지 위에 겹쳐진 HDR 동영상의 스크린샷입니다. UI 색상은 새 구현에서 대부분 보존되며 이미지가 더 이상 잘리지 않습니다.
Android 14 |
Android 15-QPR1 |
|
|
그림 1. 예 1의 Android 14와 Android 15-QPR1 비교
예 2는 설정 위에 겹쳐진 HDR 동영상의 스크린샷과 후속 스크린샷입니다. Android 14에서는 스크린샷 색상이 점점 더 어두워집니다. Android 15-QPR1에서는 톤 매퍼가 UI 색상을 올바르게 복제하고 보존합니다.
Android 14 |
Android 15-QPR1 |
|
|
그림 2. 예 2의 Android 14와 Android 15-QPR1 비교
Android 16
울트라 HDR과 마찬가지로 HDR 스크린샷은 스크린샷 파일에 게인 맵을 저장하여 렌더링 중에 HDR 표현을 복구합니다. 그러나 울트라 HDR과 달리 스크린샷은 PNG 스크린샷을 처리하는 시스템과의 하위 호환성을 위해 PNG 형식으로 유지됩니다.
스크린샷 생성 세부정보는 다음과 같습니다.
- HDR 콘텐츠가 기기에 표시되면 FP16 픽셀을 사용하여 스크린샷이 생성됩니다.
- Android 15-QPR1에 설명된 로컬 색조 매퍼는 8비트 기본 SDR 렌더링을 생성합니다.
- 8비트 게인맵은 SDR 기본 렌더링과 HDR 렌더링을 결합하여 생성됩니다.
- SDR 기본 렌더링과 게인맵은 단일 PNG 파일로 인코딩됩니다.
PNG 인코딩 세부정보는 다음과 같습니다.
- 게인맵은 게인맵의 ISO 21496-1 메타데이터가 포함된 gmAP 청크가 포함된 PNG 이미지로 인코딩됩니다.
- SDR 기본 렌더링은 ISO 21496-1 메타데이터 버전이 포함된 gmAP 청크가 포함된 PNG 이미지로 인코딩됩니다. 이 PNG 이미지에는 인코딩된 gainmap PNG 전체가 포함된 gdAT 청크도 포함되어 있습니다.
다음 그림은 PNG 청크의 레이아웃을 보여줍니다.
그림 3. PNG 청크의 레이아웃
Android 16에서는 PNG 코덱이 이러한 PNG의 인코딩과 디코딩을 모두 지원합니다. 앱은 Ultra HDR과 동일한 방식으로 게인맵이 포함된 PNG를 표시할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(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-27(UTC)"],[],[],null,["# HDR in Android screenshots\n\nSince the introduction of high dynamic range (HDR) video, streaming services\nhave started streaming HDR video, focusing on full-screen\nexperiences. Recently, social media apps\nhave launched support for HDR video and Ultra HDR,\nindicating growing interest in HDR adoption across various apps.\n\nAndroid support for HDR\n-----------------------\n\nThe following are the milestones of Android's support for HDR technology over\nseveral years:\n\n### Android 7\n\n- Initial support for HDR video decoding and display.\n- Continued advancements in HDR capabilities.\n\n### Android 13\n\n- End-to-end support for HDR video capture, encoding, and display.\n- Introduction of [Mixed SDR and HDR composition](/docs/core/display/mixed-sdr-hdr), defining different displayable luminance ranges between SDR and HDR.\n\n### Android 14\n\n- Support for HDR images with [Ultra HDR](https://developer.android.com/media/grow/ultra-hdr).\n\nScreenshot support with HDR has also evolved and undergone a number of changes\nover the years.\n\nAdvancements in HDR screenshot capabilities\n-------------------------------------------\n\nThis section tracks the progression of HDR screenshot capability in recent\nAndroid updates.\n\n### Android 9\n\nSurfaceFlinger, Android's graphics compositor, introduces HDR video support. GPU\nrendering of HDR video and screenshots is supported with a complex polynomial\ntone mapper. This tone-mapping curve isn't always equivalent to the display\ntone-mapper, so screenshots differ from the on-screen content.\n\n### Android 13\n\nA [tone mapping](/docs/core/display/tone-mapping) plugin is added to the\nSurfaceFlinger's GPU rendering block, enabling the OEM to provide a GPU shader\nto match their display's tone-mapping curve. Screenshots almost match what is on\nscreen, but with the following differences:\n\n- Screenshots remain in SDR format. Consequently, when viewed alongside an HDR scene, the HDR regions within the screenshot appear dimmer.\n- SDR luminance isn't managed, resulting in SDR content within the screenshot appearing as bright as HDR content.\n\nIn other words, any HDR video captured in the screenshot is converted to SDR\nvideo.\n\n### Android 14\n\nUltra HDR poses a significant challenge to screenshotting. Unlike videos, images\nare typically rendered within the UI framebuffer, which has two main\nimplications:\n\n- Images can't have image processing, including tonemapping, that differs from the surrounding UI.\n- Apps are responsible for source-based tone mapping when rendering their UI.\n\nTo alleviate this challenge, there are three potential screenshotting\nimplementations:\n\n- Preserve the HDR details of an Ultra HDR image, resulting in a darkened app UI in the screenshot.\n- Preserve the app UI details, causing Ultra HDR image clipping.\n- Compromise by brightening the app UI while clipping HDR highlights.\n\nAndroid 14 implements the third approach of brightening the app UI and clipping\nHDR highlights.\n\n### Android 15-QPR1\n\nSurfaceFlinger includes a local tone-mapping algorithm for screenshots. This\nprocess involves:\n\n- Dividing the input image into smaller images.\n- Computing the maximum luminance in each image, and discarding low luminance values within each section.\n- Interpolating the computed luminances through blurring and resampling.\n- Applying a parameterized Reinhard tonemapper to the input image, based on the interpolated luminance values.\n\nThis algorithm shows significant screenshot improvements between Android 14 and\nAndroid 15-QPR1, as shown in the following examples:\n\n- Example 1 is a screenshot of an HDR video overlaid on top of a Chrome\n page containing Ultra HDR. The UI colors are mostly preserved in the new\n implementation, and the image is no longer clipped.\n\n | Android 14 | Android 15-QPR1 |\n |------------|-----------------|\n | | |\n\n **Figure 1.** Comparison of Android 14 and Android 15-QPR1 for Example 1.\n- Example 2 is a screenshot of an HDR video overlaid on top of **Settings**\n with subsequent screenshots. In Android 14, the screenshot colors are\n successively darker. In Android 15-QPR1, the tonemapper correctly replicates and\n preserves the UI colors.\n\n | Android 14 | Android 15-QPR1 |\n |------------|-----------------|\n | | |\n\n **Figure 2.** Comparison of Android 14 and Android 15-QPR1 for Example 2.\n\n### Android 16\n\nSimilar to [Ultra HDR](https://developer.android.com/media/platform/hdr-image-format),\nHDR screenshots store a gainmap in the screenshot file to recover the HDR\nrepresentation during rendering. However, unlike Ultra HDR, the screenshot\nremains in a PNG format for backward compatibility with systems that ingest\nPNG screenshots.\n\nThe screenshot generation details are as follows:\n\n- When HDR content is displayed on the device, a screenshot is generated using FP16 pixels.\n- The local tone-mapper described in [Android 15-QPR1](/docs/core/graphics/hdr-screenshots#android15qpr-hdr-shot) generates an 8-bit base SDR rendition.\n- An 8-bit gainmap is produced by combining the SDR base rendition with the HDR rendition.\n- The SDR base rendition and the gainmap are encoded into a single PNG file.\n\nThe PNG encoding details are as follows:\n\n- The gainmap is encoded as a PNG image, which includes a gmAP chunk, containing the [ISO 21496-1](https://www.iso.org/standard/86775.html) metadata for the gainmap.\n- The SDR base rendition is encoded as a PNG image, which includes a gmAP chunk, containing the version of the [ISO 21496-1](https://www.iso.org/standard/86775.html) metadata. This PNG image also includes a gdAT chunk, containing the entirety of the encoded gainmap PNG.\n\nThe following figure shows the layout of the PNG chunks:\n\n**Figure 3.** Layout of the PNG chunks.\n\nWith Android 16, the PNG codec supports both encoding\nand decoding of these PNGs. Apps can display a PNG with a gainmap in the same\nmanner as [Ultra HDR](https://developer.android.com/media/grow/ultra-hdr/display)."]]