The xtd::drawing::imaging::effects::bitonal_effect converts image into lower and upper colors with threshold value.
- Namespace
- xtd::drawing::imaging::effects
- Library
- xtd.drawing
- Appearance
-
- Examples
- The following example code shows how tu use xtd::drawing::imaging::effects::bitonal_effect with image.
result.
save(
"ball_bitonal.png");
static const xtd::drawing::color white
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
Definition color.hpp:473
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition color.hpp:404
void save(const xtd::string &filename) const
Saves this xtd::drawing::image to the specified file or stream.
static image from_file(const xtd::string &filename)
Creates an image from the specified file.
static xtd::drawing::image set_effect(const xtd::drawing::image &image, const xtd::drawing::imaging::effects::effect &effect)
Sets the specified effects to the specifid image.
The xtd::drawing::imaging::effects::bitonal_effect converts image into lower and upper colors with th...
Definition bitonal_effect.hpp:34
|
int32 | threshold |
| Gets or sets the threshold value (from 0 to 765).
|
|
color | upper_color |
| Gets or sets the color used when RGB color is upper the threshold value.
|
|
color | lower_color |
| Gets or sets the color used when RGB color is under or equal the threshold value.
|
|
|
| object ()=default |
| Create a new instance of the ultimate base class object.
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object.
|
|
virtual xtd::size | get_hash_code () const noexcept |
| Serves as a hash function for a particular type.
|
|
virtual type_object | get_type () const noexcept |
| Gets the type of the current instance.
|
|
template<class object_t > |
xtd::uptr< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object.
|
|
virtual xtd::string | to_string () const noexcept |
| Returns a xtd::string that represents the current object.
|
|
template<class object_a_t , class object_b_t > |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal.
|
|
template<class object_a_t , class object_b_t > |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance.
|
|
| abstract_object ()=default |
| Initializes a new instance of the xtd::abstract_object class.
|
|
◆ bitonal_effect() [1/2]
xtd::drawing::imaging::effects::bitonal_effect::bitonal_effect |
( |
| ) |
|
|
default |
Initialise the new instance of xtd::drawing::imaging::bitonal_effect object.
◆ bitonal_effect() [2/2]
xtd::drawing::imaging::effects::bitonal_effect::bitonal_effect |
( |
int32 |
threshold, |
|
|
color |
upper_color, |
|
|
color |
lower_color |
|
) |
| |
Initialise the new instance of xtd::drawing::imaging::bitonal_effect object with specified threshold, upper color, and lower color.
- Parameters
-
threshold | The threshold value (from 0 to 765). |
upper_color | The color used when RGB color is upper the threshold value. |
lower_color | The color used when RGB color is under or equal the threshold value. |
◆ apply()
void xtd::drawing::imaging::effects::bitonal_effect::apply |
( |
xtd::drawing::image & |
image | ) |
const |
|
overrideprotectedvirtual |
◆ threshold
int32 xtd::drawing::imaging::effects::bitonal_effect::threshold |
Gets or sets the threshold value (from 0 to 765).
- Parameters
-
threshold | The threshold value (from 0 to 765). |
◆ upper_color
color xtd::drawing::imaging::effects::bitonal_effect::upper_color |
Gets or sets the color used when RGB color is upper the threshold value.
- Parameters
-
upper_color | The color used when RGB color is upper the threshold value. |
◆ lower_color
color xtd::drawing::imaging::effects::bitonal_effect::lower_color |
Gets or sets the color used when RGB color is under or equal the threshold value.
- Parameters
-
lower_color | The color used when RGB color is under or equal the threshold value. |
The documentation for this struct was generated from the following file: