An abstract base class that provides functionality for the bitmap and metafile descended classes.
Public Fields | |
| static image | empty |
| Represent an empty xtd::drawing::image. | |
Public Properties | |
| auto | alpha () const -> const xtd::byte * |
| Gets the image alpha pointer, which represents the alpha data of the image. | |
| auto | alpha () -> xtd::byte * |
| Gets the image alpha pointer, which represents the alpha data of the image. | |
| auto | flags () const noexcept -> xtd::int32 |
| Gets attribute flags for the pixel data of this xtd::drawing::image. | |
| auto | frame_dimentions_list () const noexcept -> xtd::array< guid > |
| Gets an array of GUIDs that represent the dimensions of frames within this image. | |
| auto | handle () const noexcept -> xtd::intptr |
| Gets the handle of this image. | |
| auto | height () const noexcept -> xtd::int32 |
| Gets the height, in pixels, of this image. | |
| auto | horizontal_resolution () const noexcept -> float |
| Gets the horizontal resolution, in pixels per inch, of this image. | |
| auto | palette () const noexcept -> xtd::drawing::imaging::color_palette |
| Gets the color palette used for this image. | |
| auto | palette (const xtd::drawing::imaging::color_palette &palette) noexcept -> void |
| Sets the color palette used for this image. | |
| auto | physical_dimension () const noexcept -> const xtd::drawing::size_f & |
| Gets the width and height of this image. | |
| auto | pixel_format () const noexcept -> xtd::drawing::imaging::pixel_format |
| Gets the pixel format for this image. | |
| auto | property_id_list () const noexcept -> const xtd::array< xtd::int32 > & |
| Gets IDs of the property items stored in this image. | |
| auto | property_items () const noexcept -> const xtd::array< xtd::drawing::imaging::property_item > & |
| Gets all the property items (pieces of metadata) stored in this image. | |
| auto | raw_format () const noexcept -> const xtd::drawing::imaging::image_format & |
| Gets the file format of this image. | |
| auto | rgb () const -> const xtd::byte * |
| Gets the image data pointer, which represents the RGB data of the image. | |
| auto | rgb () -> xtd::byte * |
| Gets the image data pointer, which represents the RGB data of the image. | |
| auto | size () const noexcept -> const xtd::drawing::size & |
| Gets the width and height, in pixels, of this image. | |
| auto | tag () const noexcept -> const xtd::any_object & |
| Gets an object that provides additional data about the image. | |
| auto | tag (const xtd::any_object &tag) noexcept -> void |
| Sets an object that provides additional data about the image. | |
| auto | vertical_resolution () const noexcept -> float |
| Gets the vertical resolution, in pixels per inch, of this image. | |
| auto | width () const noexcept -> xtd::int32 |
| Gets the width, in pixels, of this image. | |
Public Methods | |
| auto | clone () const -> image |
| Creates an exact copy of this xtd::drawing::image. | |
| auto | create_graphics () -> xtd::drawing::graphics |
| Creates the xtd::drawing::graphics for the image. | |
| auto | equals (const object &obj) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
| auto | equals (const image &other) const noexcept -> bool override |
| Indicates whether the current object is equal to another object of the same type. | |
| auto | get_bounds (xtd::drawing::graphics_unit page_unit) const noexcept -> xtd::drawing::rectangle_f |
| Gets the bounds of the image in the specified unit. | |
| auto | get_encoder_parameter_list (xtd::guid encoder) const noexcept -> xtd::drawing::imaging::encoder_parameters |
| Returns information about the parameters supported by the specified image encoder. | |
| auto | get_frame_count (const xtd::drawing::imaging::frame_dimension &dimension) const -> xtd::usize |
| Returns the number of frames of the specified dimension. | |
| auto | get_hash_code () const noexcept -> xtd::usize override |
| Serves as a hash function for a particular type. | |
| auto | get_property_item (int32 propid) -> xtd::drawing::imaging::property_item |
| Gets the specified property item from this xtd::drawing::image. | |
| auto | get_thmbnail_image (int32 thumb_width, int32 thunb_height) noexcept -> xtd::drawing::image |
| Returns a thumbnail for this xtd::drawing::image. | |
| auto | rotate_flip (xtd::drawing::rotate_flip_type rotate_flip_typerotate_flip_type) -> void |
| Rotates, flips, or rotates and flips the xtd::drawing::image. | |
| auto | save (const xtd::string &filename) const -> void |
| Saves this xtd::drawing::image to the specified file or stream. | |
| auto | save (const xtd::string &filename, const xtd::drawing::imaging::image_format &format) const -> void |
| Saves this xtd::drawing::image to the specified file in the specified format. | |
| auto | save (std::ostream &stream, const xtd::drawing::imaging::image_format &format) const -> void |
| Saves this image to the specified stream in the specified format. | |
Public Static Methods | |
| static auto | from_file (const xtd::string &filename) -> image |
| Creates an image from the specified file. | |
| static auto | from_hbitmap (xtd::intptr hbitmap) -> bitmap |
| Creates a xtd::drawing::bitmap from a handle to a GDI bitmap. | |
| static auto | from_stream (std::istream &stream) -> image |
| Creates an xtd::drawing::image from the specified data stream. | |
| static auto | from_xbm_data (const unsigned char *bits, int32 width, int32 height) -> bitmap |
| Creates an xtd::drawing::image from the specified data pointer, width and hieght. | |
| static auto | from_xpm_data (const char *const *bits) -> bitmap |
| Creates an xtd::drawing::image from the specified data pointer. | |
| static auto | get_pixel_format_size (xtd::drawing::imaging::pixel_format pixfmt) noexcept -> xtd::int32 |
| Returns the color depth, in number of bits per pixel, of the specified pixel format. | |
| static auto | is_alpha_pixel_format (xtd::drawing::imaging::pixel_format pixfmt) noexcept -> bool |
| Returns a value that indicates whether the pixel format for this xtd::drawing::image contains alpha information. | |
| static auto | is_canonical_pixel_format (xtd::drawing::imaging::pixel_format pixfmt) noexcept -> bool |
| Returns a value that indicates whether the pixel format is 32 bits per pixel. | |
| static auto | is_extended_pixel_format (xtd::drawing::imaging::pixel_format pixfmt) noexcept -> bool |
| Returns a value that indicates whether the pixel format is 64 bits per pixel. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| virtual auto | equals (const image &) const noexcept -> bool=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
|
nodiscard |
Gets the image alpha pointer, which represents the alpha data of the image.
|
nodiscard |
Gets the image alpha pointer, which represents the alpha data of the image.
|
nodiscardnoexcept |
Gets attribute flags for the pixel data of this xtd::drawing::image.
| image_flag value | Integer representation |
|---|---|
| image_flags_none | 0 |
| Iimage_flags_scalable | 1 |
| Iimage_flags_has_alpha | 2 |
| Iimage_flags_has_translucent | 4 |
| Iimage_flags_partially_scalable | 8 |
| Iimage_flags_color_space_rgb | 16 |
| Iimage_flags_color_space_cmyk | 32 |
| Iimage_flags_color_space_gray | 64 |
| Iimage_flags_color_space_ycbr | 128 |
| Iimage_flags_color_space_ycck | 256 |
| Iimage_flags_has_real_dpi | 4096 |
| Iimage_flags_has_real_pixel_size | 8192 |
| Iimage_flags_read_only | 65536 |
| Iimage_flags_caching | 131072 |
|
nodiscardnoexcept |
Gets an array of GUIDs that represent the dimensions of frames within this image.
|
nodiscardnoexcept |
Gets the handle of this image.
|
nodiscardnoexcept |
Gets the height, in pixels, of this image.
|
nodiscardnoexcept |
Gets the horizontal resolution, in pixels per inch, of this image.
|
nodiscardnoexcept |
Gets the color palette used for this image.
|
noexcept |
Sets the color palette used for this image.
| palette | A color_palette that represents the color palette used for this image. |
|
nodiscardnoexcept |
Gets the width and height of this image.
|
nodiscardnoexcept |
Gets the pixel format for this image.
|
nodiscardnoexcept |
Gets IDs of the property items stored in this image.
|
nodiscardnoexcept |
Gets all the property items (pieces of metadata) stored in this image.
|
nodiscardnoexcept |
Gets the file format of this image.
|
nodiscard |
Gets the image data pointer, which represents the RGB data of the image.
|
nodiscard |
Gets the image data pointer, which represents the RGB data of the image.
|
nodiscardnoexcept |
Gets the width and height, in pixels, of this image.
|
nodiscardnoexcept |
Gets an object that provides additional data about the image.
|
noexcept |
Sets an object that provides additional data about the image.
| tag | The object that provides additional data about the image. |
|
nodiscardnoexcept |
Gets the vertical resolution, in pixels per inch, of this image.
|
nodiscardnoexcept |
Gets the width, in pixels, of this image.
|
nodiscard |
Creates an exact copy of this xtd::drawing::image.
|
nodiscard |
Creates the xtd::drawing::graphics for the image.
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
nodiscardoverridenoexcept |
Indicates whether the current object is equal to another object of the same type.
| other | An object to compare with this object. |
|
nodiscardnoexcept |
Gets the bounds of the image in the specified unit.
| page_unit | One of the xtd::drawing::graphics_unit values indicating the unit of measure for the bounding rectangle. |
|
nodiscardnoexcept |
Returns information about the parameters supported by the specified image encoder.
| guid | A GUID that specifies the image encoder. |
|
nodiscard |
Returns the number of frames of the specified dimension.
| dimension | A xtd::drawing::imaging::frame_dimension that specifies the identity of the dimension type. |
|
nodiscardoverridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
nodiscard |
Gets the specified property item from this xtd::drawing::image.
| propid | The ID of the property item to get. |
| xtd::argument_exception | The image format of this image does not support property items. |
|
nodiscardnoexcept |
Returns a thumbnail for this xtd::drawing::image.
| thbmb_width | The width, in pixels, of the requested thumbnail image. |
| thum_height | The height, in pixels, of the requested thumbnail image. |
| auto xtd::drawing::image::rotate_flip | ( | xtd::drawing::rotate_flip_type | rotate_flip_type | ) | -> void |
Rotates, flips, or rotates and flips the xtd::drawing::image.
| rotate_flip_type | A xtd::drawing::rotate_flip_type member that specifies the type of rotation and flip to apply to the image. |
| auto xtd::drawing::image::save | ( | const xtd::string & | filename | ) | const -> void |
Saves this xtd::drawing::image to the specified file or stream.
| filename | A string that contains the name of the file to which to save this xtd::drawing::image. |
| auto xtd::drawing::image::save | ( | const xtd::string & | filename, |
| const xtd::drawing::imaging::image_format & | format ) const -> void |
Saves this xtd::drawing::image to the specified file in the specified format.
| filename | A string that contains the name of the file to which to save this xtd::drawing::image. |
| format | The xtd::drawing::imaging::image_format for this xtd::drawing::image. |
| auto xtd::drawing::image::save | ( | std::ostream & | stream, |
| const xtd::drawing::imaging::image_format & | format ) const -> void |
Saves this image to the specified stream in the specified format.
| stream | The std::otream where the image will be saved. |
| format | The xtd::drawing::imaging::image_format for this xtd::drawing::image. |
|
staticnodiscard |
Creates an image from the specified file.
| filename | A string that contains the name of the file from which to create the image. |
|
staticnodiscard |
Creates a xtd::drawing::bitmap from a handle to a GDI bitmap.
| hbitmap | The GDI bitmap handle from which to create the xtd::drawing::bitmap. |
|
staticnodiscard |
Creates an xtd::drawing::image from the specified data stream.
| stream | A std::istream that contains the data for this xtd::drawing::image. |
|
staticnodiscard |
Creates an xtd::drawing::image from the specified data pointer, width and hieght.
| data | A pointer that contains the data for the xtd::drawing::image. |
| width | The width for the xtd::drawing::image. |
| height | The height for the xtd::drawing::image. |
|
staticnodiscard |
Creates an xtd::drawing::image from the specified data pointer.
| data | A pointer that contains the data for the xtd::drawing::image. |
|
staticnodiscardnoexcept |
Returns the color depth, in number of bits per pixel, of the specified pixel format.
| pixfmt | The xtd::drawing::imaging::pixel_format member that specifies the format for which to find the size. |
|
staticnodiscardnoexcept |
Returns a value that indicates whether the pixel format for this xtd::drawing::image contains alpha information.
| pixfmt | The PixelFormat to test. |
|
staticnodiscardnoexcept |
Returns a value that indicates whether the pixel format is 32 bits per pixel.
| pixfmt | The PixelFormat to test. |
|
staticnodiscardnoexcept |
Returns a value that indicates whether the pixel format is 64 bits per pixel.
| pixfmt | The PixelFormat to test. |
|
static |
Represent an empty xtd::drawing::image.