Merge "Update javadoc for new added ColorSpace."

This commit is contained in:
TreeHugger Robot
2022-12-27 05:08:36 +00:00
committed by Android (Google) Code Review
2 changed files with 16 additions and 6 deletions

View File

@@ -1810,10 +1810,15 @@ public final class Bitmap implements Parcelable {
* {@code ColorSpace}.</p>
*
* @throws IllegalArgumentException If the specified color space is {@code null}, not
* {@link ColorSpace.Model#RGB RGB}, has a transfer function that is not an
* {@link ColorSpace.Rgb.TransferParameters ICC parametric curve}, or whose
* components min/max values reduce the numerical range compared to the
* previously assigned color space.
* {@link ColorSpace.Model#RGB RGB}, or whose components min/max values reduce
* the numerical range compared to the previously assigned color space.
* Prior to {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE},
* <code>IllegalArgumentException</code> will also be thrown
* if the specified color space has a transfer function that is not an
* {@link ColorSpace.Rgb.TransferParameters ICC parametric curve}. Starting from
* {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, the color spaces with non
* ICC parametric curve transfer function are allowed.
* E.g., {@link ColorSpace.Named#BT2020_HLG BT2020_HLG}.
*
* @throws IllegalArgumentException If the {@code Config} (returned by {@link #getConfig()})
* is {@link Config#ALPHA_8}.

View File

@@ -1682,11 +1682,16 @@ public final class ImageDecoder implements AutoCloseable {
* {@link #decodeBitmap decodeBitmap} when setting a non-RGB color space
* such as {@link ColorSpace.Named#CIE_LAB Lab}.</p>
*
* <p class="note">The specified color space's transfer function must be
* <p class="note">Prior to {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE},
* the specified color space's transfer function must be
* an {@link ColorSpace.Rgb.TransferParameters ICC parametric curve}. An
* <code>IllegalArgumentException</code> will be thrown by the decode methods
* if calling {@link ColorSpace.Rgb#getTransferParameters()} on the
* specified color space returns null.</p>
* specified color space returns null.
* Starting from {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE},
* the color spaces with non ICC parametric curve transfer function are allowed.
* E.g., {@link ColorSpace.Named#BT2020_HLG BT2020_HLG}.
* </p>
*
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded onHeaderDecoded}.</p>