xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::drawing::image Class Reference

An abstract base class that provides functionality for the bitmap and metafile descended classes. More...

#include <image.h>

Inheritance diagram for xtd::drawing::image:
xtd::drawing::bitmap

Classes

struct  data
 

Public Member Functions

int32_t flags () const
 Gets attribute flags for the pixel data of this Image. More...
 
const std::vector< guid > & frame_dimentions_list () const
 Gets an array of GUIDs that represent the dimensions of frames within this image. More...
 
intptr_t handle () const
 Get the handle of this image. More...
 
int32_t height () const
 Gets the height, in pixels, of this image. More...
 
float horizontal_resolution () const
 Gets the horizontal resolution, in pixels per inch, of this image. More...
 
imaging::color_palette palette () const
 Gets the color palette used for this image. More...
 
void palette (const imaging::color_palette &palette)
 Sets the color palette used for this image. More...
 
const size_fphysical_dimension () const
 Gets the width and height of this image. More...
 
imaging::pixel_format pixel_format () const
 Gets the pixel format for this image. More...
 
const std::vector< int32_t > & property_id_list () const
 Gets IDs of the property items stored in this image. More...
 
const std::vector< imaging::property_item > & property_items () const
 Gets all the property items (pieces of metadata) stored in this image. More...
 
const imaging::image_formatraw_format () const
 Gets the file format of this image. More...
 
void save (const std::string &filename) const
 
void save (const std::string &filename, const imaging::image_format &format) const
 
void save (std::ostream &stream, const imaging::image_format &format) const
 
const drawing::sizesize () const
 Gets the width and height, in pixels, of this image. More...
 
const std::anytag () const
 Gets an object that provides additional data about the image. More...
 
void tag (const std::any &tag)
 Sets an object that provides additional data about the image. More...
 
float vertical_resolution () const
 Gets the vertical resolution, in pixels per inch, of this image. More...
 
int32_t width () const
 Gets the width, in pixels, of this image. More...
 

Static Public Member Functions

static image from_data (const char *const *bits)
 
static image from_file (const std::string &filename)
 Creates an image from the specified file. More...
 
static image from_hbitmap (intptr_t hbitmap)
 
static image from_stream (std::istream &stream)
 

Static Public Attributes

static image empty
 

Protected Member Functions

 image (intptr_t hbitmap)
 
 image (const std::string &fileName)
 
 image (std::istream &stream)
 
 image (const char *const *bits)
 
 image (int32_t width, int32_t height)
 
 image (const image &image, int32_t width, int32_t height)
 
 image (const image &image, const rectangle &rect)
 
void update_properties ()
 

Protected Attributes

std::shared_ptr< datadata_ = std::make_shared<data>()
 

Detailed Description

An abstract base class that provides functionality for the bitmap and metafile descended classes.

Remarks
To draw an image on a Windows Form, you should use one of the draw_image methods.

The documentation for this class was generated from the following file: