public final class ColorProfileUtil extends Object
Modifier and Type | Method and Description |
---|---|
static ICC_Profile |
getICC_Profile(byte[] data)
Proxy method for
ICC_Profile.getInstance(byte[])
that properly synchronizes the call to avoid a potential race condition. |
static ICC_Profile |
getICC_Profile(InputStream in)
Proxy method for
ICC_Profile.getInstance(java.io.InputStream)
that properly synchronizes the call to avoid a potential race condition. |
static ICC_Profile |
getICC_Profile(int colorSpace)
Proxy method for
ICC_Profile.getInstance(int)
that properly synchronizes the call to avoid a potential race condition. |
static ICC_Profile |
getICC_Profile(String fileName)
Proxy method for
ICC_Profile.getInstance(java.lang.String)
that properly synchronizes the call to avoid a potential race condition. |
static String |
getICCProfileDescription(ICC_Profile profile)
Returns the profile description of an ICC profile
|
static boolean |
isDefaultsRGB(ICC_Profile profile)
Indicates whether a given color profile is identical to the default sRGB profile
provided by the Java class library.
|
public static String getICCProfileDescription(ICC_Profile profile)
profile
- the profilepublic static boolean isDefaultsRGB(ICC_Profile profile)
profile
- the color profile to checkpublic static ICC_Profile getICC_Profile(byte[] data)
ICC_Profile.getInstance(byte[])
that properly synchronizes the call to avoid a potential race condition.data
- the specified ICC Profile dataICC_Profile
instance corresponding to the data in the
specified byte arraypublic static ICC_Profile getICC_Profile(int colorSpace)
ICC_Profile.getInstance(int)
that properly synchronizes the call to avoid a potential race condition.colorSpace
- the type of color space to create a profile for. The specified type is
one of the color space constants defined in the ColorSpace
class.ICC_Profile
instance corresponding to the specified ColorSpace
IllegalArgumentException
- if colorSpace
is not one of the predefined typespublic static ICC_Profile getICC_Profile(InputStream in) throws IOException
ICC_Profile.getInstance(java.io.InputStream)
that properly synchronizes the call to avoid a potential race condition.in
- the input stream from which to read the profile dataICC_Profile
instance corresponding to the data in the
specified InputStream
IOException
- if an I/O error occurs while reading the streamIllegalArgumentException
- if the stream does not contain valid ICC Profile datapublic static ICC_Profile getICC_Profile(String fileName) throws IOException
ICC_Profile.getInstance(java.lang.String)
that properly synchronizes the call to avoid a potential race condition.fileName
- the name of the file that contains the profile dataICC_Profile
instance corresponding to the data in the specified fileIOException
- if the file cannot be opened, or an I/O error occurs while reading
the streamIllegalArgumentException
- if the stream does not contain valid ICC Profile dataSecurityException
- if a security manager is installed and it does not permit read
access to the given file.Copyright © 2024 Apache Software Foundation. All rights reserved.