52 #ifndef __PCL_ICCProfile_h
53 #define __PCL_ICCProfile_h
89 namespace ICCProfileClass
95 InputDevice = 0x00000001,
96 DisplayDevice = 0x00000002,
97 OutputDevice = 0x00000004,
98 DeviceLink = 0x00000008,
99 ColorSpaceConversion = 0x00000010,
100 AbstractProfile = 0x00000020,
101 NamedColorProfile = 0x00000040
139 namespace ICCColorSpace
143 Unknown = 0x80000000,
181 namespace ICCRenderingIntent
187 RelativeColorimetric,
205 namespace ICCRenderingDirection
246 using profile_class = ICCProfileClass::mask_type;
251 using color_space = ICCColorSpace::mask_type;
256 using rendering_intent = ICCRenderingIntent::value_type;
261 using rendering_direction = ICCRenderingDirection::value_type;
335 return !m_data.IsEmpty();
341 operator bool()
const
353 return !m_path.IsEmpty();
424 String Model(
const char* language =
"en",
const char* country =
"US" )
const;
446 const char* language =
"en",
const char* country =
"US" )
const;
471 return ColorSpace() == ICCColorSpace::RGB;
479 return ColorSpace() == ICCColorSpace::Gray;
517 SetEmbeddedFlag(
false );
552 void Set(
const void* rawData );
579 return Open( m_data );
619 return Open( icc.
Begin() );
654 return IsValid( icc.
Begin() );
839 : description( a_description )
890 static void ThrowErrorWithCMSInfo(
const String& message );
A type-safe collection of enumerated flags.
A combination of ICCColorSpace values.
A combination of ICCProfileClass values.
A high-level interface to ICC color profiles.
size_type ProfileSize() const
static handle Open(const ByteArray &icc)
void Set(const ByteArray &profile)
bool IsDiskProfile() const
static bool IsValidFile(const String &profilePath)
static profile_class Class(handle h)
static String Description(handle h, const char *language="en", const char *country="US")
ICCProfile(ICCProfile &&)=default
static handle Open(const String &profilePath)
void Set(const void *rawData)
static profile_list FindProfilesByColorSpace(ICCColorSpaces spaces)
ICCProfile(const String &profilePath)
static StringList FindProfiles(const String &dirPath=String())
String Description(const char *language="en", const char *country="US") const
static StringList ProfileDirectories()
void GetInformation(String &description, String &manufacturer, String &model, String ©right, const char *language="en", const char *country="US") const
static void Close(handle h)
static bool IsValidHandle(handle h)
ICCProfile(const void *rawData)
String Manufacturer(const char *language="en", const char *country="US") const
static bool IsValid(const ByteArray &icc)
static handle Open(const void *rawData)
bool IsSameProfile(const ICCProfile &other) const
bool SupportsRenderingIntent(rendering_intent intent, rendering_direction direction) const
String Copyright(const char *language="en", const char *country="US") const
ICCProfile(const ByteArray &rawData)
const ByteArray & ProfileData() const
static void ExtractProfileList(StringList &selectedDescriptionsList, StringList &selectedPathsList, const StringList &pathList, ICCColorSpaces spaces=ICCColorSpace::Any, ICCProfileClasses classes=ICCProfileClass::Any)
ICCProfile(const ICCProfile &)=default
String Model(const char *language="en", const char *country="US") const
static String Manufacturer(handle h, const char *language="en", const char *country="US")
static bool IsValid(const void *rawdata)
static String Model(handle h, const char *language="en", const char *country="US")
static String FindInstalledProfile(const String &description, bool exactMatch=true)
color_space ColorSpace() const
friend void Swap(ICCProfile &x1, ICCProfile &x2)
static String Copyright(handle h, const char *language="en", const char *country="US")
void SetEmbeddedFlag(bool on=true)
static bool SupportsRenderingIntent(handle h, rendering_intent intent, rendering_direction direction)
static color_space ColorSpace(handle h)
profile_class Class() const
void Load(const String &profilePath)
Generic dynamic sorted array.
bool operator==(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
bool operator<(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
void Swap(GenericPoint< T > &p1, GenericPoint< T > &p2) noexcept
A structure to hold descriptive data about ICC profiles.
String path
Full path to an ICC profile disk file.
Info(const String &a_description, const String &a_path=String())
String description
Description of an ICC profile.