Stay organized with collections
Save and categorize content based on your preferences.
Entry
class Entry
Summary
Public constructors |
Create a Lut entry.
|
Public constructors
Entry
Entry(
buffer: FloatArray,
dimension: Int,
samplingKey: Int)
Create a Lut entry.
1D Lut(s) are treated as gain curves.
3D Lut(s) are used for direct color manipulations.
For 3D Lut(s), the values should be normalized to the range 0.0
to 1.0
, inclusive. And 1.0
is the maximum panel luminance. And If N is the size of each dimension, the data is arranged in RGB order:
R(0, 0, 0), R(0, 0, 1), ..., R(0, 0, N - 1),
R(0, 1, 0), ..., R(0, 1, N - 1), ..., R(0, N - 1, N - 1),
R(1, 0, 0), ..., R(1, 0, N - 1), ..., R(1, N - 1, N - 1), ..., R(N - 1, N - 1, N - 1),
G(0, 0, 0), ..., G(N - 1, N - 1, N - 1),
B(0, 0, 0), ..., B(N - 1, N - 1, N - 1)
When a GPU shader samples 3D Lut data, it's accessed in a flat, one-dimensional arrangement. Assuming that we have a 3D array
ORIGINAL[N][N][N]
, then
FLAT[z + N * (y + N * x)] = ORIGINAL[x][y][z]
Public methods
getBuffer
open fun getBuffer(): FloatArray
Return |
FloatArray |
the lut raw data of the lut This value cannot be null . |
getDimension
open fun getDimension(): Int
Return |
Int |
the dimension of the lut entry |
getSamplingKey
open fun getSamplingKey(): Int
Return |
Int |
the sampling key used by the lut |
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# DisplayLuts.Entry\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nEntry\n=====\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/hardware/DisplayLuts.Entry \"View this page in Java\") \n\n```\nclass Entry\n```\n\n|---|-----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.hardware.DisplayLuts.Entry](#) |\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Entry](#Entry(kotlin.FloatArray,%20kotlin.Int,%20kotlin.Int))`(`buffer:` `[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)`, `dimension:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `samplingKey:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Create a Lut entry. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------------------|------------------------------------------------|\n| open [FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html) | [getBuffer](#getBuffer())`()` \u003cbr /\u003e |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getDimension](#getDimension())`()` \u003cbr /\u003e |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getSamplingKey](#getSamplingKey())`()` \u003cbr /\u003e |\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### Entry\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nEntry(\n buffer: FloatArray, \n dimension: Int, \n samplingKey: Int)\n```\n\nCreate a Lut entry.\n\n1D Lut(s) are treated as gain curves.\n\n3D Lut(s) are used for direct color manipulations.\n\nFor 3D Lut(s), the values should be normalized to the range `0.0` to `1.0`, inclusive. And `1.0` is the maximum panel luminance. And If N is the size of each dimension, the data is arranged in RGB order: \n\n```kotlin\nR(0, 0, 0), R(0, 0, 1), ..., R(0, 0, N - 1),\n R(0, 1, 0), ..., R(0, 1, N - 1), ..., R(0, N - 1, N - 1),\n R(1, 0, 0), ..., R(1, 0, N - 1), ..., R(1, N - 1, N - 1), ..., R(N - 1, N - 1, N - 1),\n G(0, 0, 0), ..., G(N - 1, N - 1, N - 1),\n B(0, 0, 0), ..., B(N - 1, N - 1, N - 1)\n```\nWhen a GPU shader samples 3D Lut data, it's accessed in a flat, one-dimensional arrangement. Assuming that we have a 3D array `ORIGINAL[N][N][N]`, then \n\n```kotlin\nFLAT[z + N * (y + N * x)] = ORIGINAL[x][y][z]\n```\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `buffer` | [FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html): The raw lut data This value cannot be `null`. |\n| `dimension` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Either 1D or 3D Value is [android.hardware.LutProperties#ONE_DIMENSION](/reference/kotlin/android/hardware/LutProperties#ONE_DIMENSION:kotlin.Int), or [android.hardware.LutProperties#THREE_DIMENSION](/reference/kotlin/android/hardware/LutProperties#THREE_DIMENSION:kotlin.Int) |\n| `samplingKey` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The sampling kay used for the Lut Value is [android.hardware.LutProperties#SAMPLING_KEY_RGB](/reference/kotlin/android/hardware/LutProperties#SAMPLING_KEY_RGB:kotlin.Int), [android.hardware.LutProperties#SAMPLING_KEY_MAX_RGB](/reference/kotlin/android/hardware/LutProperties#SAMPLING_KEY_MAX_RGB:kotlin.Int), or [android.hardware.LutProperties#SAMPLING_KEY_CIE_Y](/reference/kotlin/android/hardware/LutProperties#SAMPLING_KEY_CIE_Y:kotlin.Int) |\n\nPublic methods\n--------------\n\n### getBuffer\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getBuffer(): FloatArray\n```\n\n| Return ||\n|-------------------------------------------------------------------------------------------|----------------------------------------------------------|\n| [FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html) | the lut raw data of the lut This value cannot be `null`. |\n\n### getDimension\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getDimension(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|--------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the dimension of the lut entry |\n\n### getSamplingKey\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getSamplingKey(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|----------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the sampling key used by the lut |\n\n### toString\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |"]]