ImageKit
-
class HPS::ImageKit : public HPS::Kit
The ImageKit class is a user space object. It is used for specifying all data associated with images.
Public Functions
-
void Convert(HPS::Image::Format in_format)
Converts this ImageKit to the specified format.
- Parameters
in_format – The format to convert the ImageKit to.
-
void Convert(ImageKit const &in_kit, HPS::Image::Format in_format)
Copies the source ImageKit into this ImageKit but converts it to the specified format.
-
virtual bool Empty() const
Indicates whether this ImageKit has any values set on it.
- Returns
true if no values are set on this ImageKit, false otherwise.
-
bool Equals(ImageKit const &in_kit) const
Check if the source ImageKit is equivalent to this ImageKit.
-
ImageKit(ImageKit &&in_that)
The move constructor creates an ImageKit by transferring the underlying impl of the rvalue reference to this ImageKit thereby avoiding a copy and allocation.
- Parameters
in_that – An rvalue reference to an ImageKit to take the impl from.
-
ImageKit(ImageKit const &in_kit)
The copy constructor creates a new ImageKit object that contains the same settings as the source ImageKit.
- Parameters
in_kit – The source ImageKit to copy.
-
ImageKit(ImageKit const &in_kit, HPS::Image::Format in_format)
This constructor creates a new ImageKit object that contains the same settings as the source ImageKit but converts it to the specified format.
-
inline virtual HPS::Type ObjectType() const
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Returns
The declared type of the object in question, which may differ from the true, underlying type.
-
bool operator!=(ImageKit const &in_kit) const
Check if the source ImageKit is not equivalent to this ImageKit.
-
ImageKit &operator=(ImageKit &&in_that)
The move assignment operator transfers the underlying impl of the rvalue reference to this ImageKit thereby avoiding a copy.
-
bool operator==(ImageKit const &in_kit) const
Check if the source ImageKit is equivalent to this ImageKit.
-
void Set(ImageKit const &in_kit)
Copies the source ImageKit into this ImageKit.
- Parameters
in_kit – The source ImageKit to copy.
-
ImageKit &SetCompressionQuality(float in_quality)
Sets the compression quality for the image. Values range from highest compression and poorest quality (0) to no compression and full quality (1).
- Parameters
in_quality – The compression quality for the image, a floating point value between 0 and 1.
- Returns
A reference to this ImageKit.
-
ImageKit &SetData(ByteArray const &in_image_data)
Sets the data for the image.
- Parameters
in_image_data – The array of data for the image.
- Returns
A reference to this ImageKit.
-
ImageKit &SetData(size_t in_byte_count, byte const in_image_data[])
Sets the data for the image.
- Parameters
in_byte_count – The size of the following array.
in_image_data – The array of data for the image.
- Returns
A reference to this ImageKit.
-
ImageKit &SetDownSampling(bool in_state)
Sets the whether to down-sample the image.
- Parameters
in_state – Whether to down-sample the image.
- Returns
A reference to this ImageKit.
-
ImageKit &SetFormat(Image::Format in_format)
Sets the format of the image.
- Parameters
in_format – The format of the image.
- Returns
A reference to this ImageKit.
-
ImageKit &SetSize(unsigned int in_width, unsigned int in_height)
Sets the width and height (in pixels) of the image.
- Parameters
in_width – The width (in pixels) of the image.
in_height – The height (in pixels) of the image.
- Returns
A reference to this ImageKit.
-
bool ShowCompressionQuality(float &out_quality) const
Shows the compression quality for the image.
- Parameters
out_quality – The compression quality for the image.
- Returns
true if the compression quality is valid, false otherwise.
-
bool ShowData(ByteArray &out_image_data) const
Shows the data for the image.
- Parameters
out_image_data – The array of data for the image.
- Returns
true if the data array is valid, false otherwise.
-
bool ShowDownSampling(bool &out_state) const
Shows whether to down-sample the image.
- Parameters
out_state – whether to down-sample the image.
- Returns
true if the flag is valid, false otherwise.
-
bool ShowFormat(Image::Format &out_format) const
Shows the format of the image.
- Parameters
out_format – The format of the image.
- Returns
true if the format is valid, false otherwise.
-
bool ShowSize(unsigned int &out_width, unsigned int &out_height) const
Shows the width and height (in pixels) of the image.
- Parameters
out_width – The width (in pixels) of the image.
out_height – The height (in pixels) of the image.
- Returns
true if the width and height are valid, false otherwise.
-
ImageKit &UnsetCompressionQuality()
Removes the compression quality for the image.
- Returns
A reference to this ImageKit.
-
ImageKit &UnsetDownSampling()
Removes whether to down-sample the image.
- Returns
A reference to this ImageKit.
-
ImageKit &UnsetEverything()
Removes all settings from this ImageKit.
- Returns
A reference to this ImageKit.
-
ImageKit &UnsetSize()
Removes the width and height of the image.
- Returns
A reference to this ImageKit.
-
virtual ~ImageKit()
Public Static Attributes
-
static const HPS::Type staticType = HPS::Type::ImageKit
-
void Convert(HPS::Image::Format in_format)