Contains image native API.
Classes | |
struct | property_item |
Encapsulates a metadata property to be included in an image file. More... | |
Protected Static Methods | |
static void | blur (intptr handle, int32 radius) |
Blurs the image whith the specified radius. | |
static void | color_palette (intptr image, std::vector< std::tuple< xtd::byte, xtd::byte, xtd::byte, xtd::byte > > &entries, int32 &flags) |
Gets the color palette used for the image. | |
static intptr | create (const xtd::string &filename, std::map< size_t, size_t > &frame_resolutions) |
Creates an image from specified filename and get the frame_solution collection. | |
static intptr | create (const xtd::string &filename, bool use_icm, std::map< size_t, size_t > &frame_resolutions) |
Creates an image from specified filename and get the frame_solution collection. | |
static intptr | create (std::istream &stream, std::map< size_t, size_t > &frame_resolutions) |
Creates an image from specified std::istream and get the frame_solution collection. | |
static intptr | create (std::istream &stream, bool use_icm, std::map< size_t, size_t > &frame_resolutions) |
Creates an image from specified std::istream and get the frame_solution collection. | |
static intptr | create (const char *const *bits) |
Creates an image from bits. | |
static intptr | create (int32 width, int32 height) |
Creates an empty image from size. | |
static intptr | create (int32 width, int32 height, float horizontal_resolution, float vertical_resolution) |
Creates an empty image from size, and horzontal and vertical resolution. | |
static intptr | create (int32 width, int32 height, int32 format) |
Creates an empty image from size, and pixel format. | |
static intptr | create (int32 width, int32 height, int32 stride, int32 format, intptr scan0) |
Creates an empty image from size, pixel format and pixel datas. | |
static void | destroy (intptr image) |
Destroys the image. | |
static size_t | flags (intptr image) |
Gets attribute flags for the pixel data of this Image. | |
static intptr | from_hicon (intptr icon) |
Creates a bitmap from a Windows handle to an icon. | |
static xtd::byte * | get_alpha (intptr image) |
Get the access to the alpah from this image. | |
static xtd::byte * | get_data (intptr image) |
Get the access to the data from this image. | |
static intptr | get_hbitmap (intptr image) |
Creates a GDI bitmap object from this image. | |
static intptr | get_hbitmap (intptr image, xtd::byte a, xtd::byte r, xtd::byte g, xtd::byte b) |
Creates a GDI bitmap object from this image. | |
static intptr | get_hicon (intptr image) |
Returns the handle to an icon. | |
static float | horizontal_resolution (intptr image) |
Gets the horizontal resolution, in pixels per inch, of the image. | |
static void | lock_bits (intptr image, int32 left, int32 top, int32 width, int32 height, int32 flags, int32 format, int32 &image_data_height, int32 &image_data_pixel_format, int32 &image_data_reserved, intptr &image_data_scan0, int32 &image_data_stride, int32 &image_data_width) |
Locks a xtd::drawing::bitmap into system memory. | |
static void | make_transparent (intptr image, xtd::byte transparent_color_a, xtd::byte transparent_color_r, xtd::byte transparent_color_g, xtd::byte transparent_color_b) |
Makes the specified color transparent for this bitmap. | |
static void | physical_dimension (intptr image, int32 &width, int32 &height) |
Gets the width and height of this image. | |
static std::vector< int32 > | property_id_list (intptr image) |
Gets IDs of the property items stored in the image. | |
static std::vector< property_item > | property_items (intptr image) |
Gets all the property items (pieces of metadata) stored in the image. | |
static size_t | pixel_format (intptr image) |
Gets the pixel format for the image. | |
static size_t | raw_format (intptr image) |
Gets the file format of the image. | |
static void | rescale (intptr image, int32 width, int32 height) |
Rescale the image. | |
static void | rotate_flip (intptr image, int32 rotate_flip_type) |
Rotates, flips, or rotates and flips the image. | |
static void | set_resolution (intptr image, int32 x_dpi, int32 y_dpi) |
Sets the resolution for this bitmap. | |
static void | save (intptr image, const xtd::string &filename) |
Saves image to the specified output filename. | |
static void | save (intptr image, const xtd::string &filename, size_t raw_format) |
Saves image to the specified output filename and raw format. | |
static void | save (intptr image, std::ostream &stream, size_t raw_format) |
Saves image to the specified stream and raw format. | |
static float | screen_dpi () |
Get the screen dpi. | |
static void | size (intptr image, int32 &width, int32 &height) |
Gets the width and height, in pixels, of the image. | |
static void | unlock_bits (intptr image, int32 &image_data_height, int32 &image_data_pixel_format, int32 &image_data_reserved, intptr &image_data_scan0, int32 &image_data_stride, int32 &image_data_width) |
Unlocks this Bitmap from system memory. | |
static float | vertical_resolution (intptr image) |
Gets the vertical resolution, in pixels per inch, of the image. | |
Blurs the image whith the specified radius.
image | The image handle. |
radius | The radius of the blur, specified as a <length> |
|
staticprotected |
Gets the color palette used for the image.
image | The image handle. |
entries | A std::vector<std::tuple<xtd::byte, xtd::byte, xtd::byte, xtd::byte>> (alpha, red, green and blue componenents of color) that represents the color palette used for the image. |
flags | A value that specifies how to interpret the color information in the array of colors |
|
staticprotected |
Creates an image from specified filename and get the frame_solution collection.
filename | The filename of the image. |
frame_resolutions | an std::map<size_t, size_t> containing the frame dimention and the image count collection (see frame_dimension.h for more information). |
|
staticprotected |
Creates an image from specified filename and get the frame_solution collection.
filename | The filename of the image. |
frame_resolutions | an std::map<size_t, size_t> containing the frame dimention and the image count collection (see frame_dimension.h for more information). |
use_icm | true to use color correction for this Bitmap; otherwise, false. |
|
staticprotected |
Creates an image from specified std::istream and get the frame_solution collection.
stream | The std::istream containing the image. |
frame_resolutions | an std::map<size_t, size_t> containing the frame dimention and the image count collection (see frame_dimension.h for more information). |
|
staticprotected |
Creates an image from specified std::istream and get the frame_solution collection.
stream | The std::istream containing the image. |
use_icm | true to use color correction for this Bitmap; otherwise, false. |
frame_resolutions | an std::map<size_t, size_t> containing the frame dimention and the image count collection (see frame_dimension.h for more information). |
|
staticprotected |
Creates an image from bits.
bits | The bits containing the image. |
Creates an empty image from size.
width | The width for the empty image. |
height | The height for the empty image. |
|
staticprotected |
Creates an empty image from size, and horzontal and vertical resolution.
width | The width for the new image. |
height | The height for the new image. |
|
staticprotected |
Creates an empty image from size, and pixel format.
width | The width for the empty image. |
height | The height for the empty image. |
format | The pixel format for the new image. |
|
staticprotected |
Creates an empty image from size, pixel format and pixel datas.
width | The width for the empty image. |
height | The height for the empty image. |
stride | Integer that specifies the byte offset between the beginning of one scan line and the next. This is usually (but not necessarily) the number of bytes in the pixel format (for example, 2 for 16 bits per pixel) multiplied by the width of the bitmap. The value passed to this parameter must be a multiple of four. |
format | The pixel format for the new image. |
scan0 | Pointer to an array of bytes that contains the pixel data. |
|
staticprotected |
Destroys the image.
image | The image handle to destroy. |
|
staticprotected |
Gets attribute flags for the pixel data of this Image.
image | The image handle. |
Creates a bitmap from a Windows handle to an icon.
hicon | A handle to an icon. |
Get the access to the alpah from this image.
image | A handle to an image. |
Get the access to the data from this image.
image | A handle to an image. |
Creates a GDI bitmap object from this image.
image | A handle to an image. |
|
staticprotected |
Creates a GDI bitmap object from this image.
image | A handle to an image. |
a | The alpha componant of the background color. |
r | The red componant of the background color. |
g | The green componant of the background color. |
b | The blue componant of the background color. |
Returns the handle to an icon.
image | A handle to an image. |
|
staticprotected |
Gets the horizontal resolution, in pixels per inch, of the image.
image | The image handle. |
|
staticprotected |
Locks a xtd::drawing::bitmap into system memory.
image | The image handle. |
top | An int32 that specifies the top of the bitmap to lock. |
left | An int32 that specifies the left of the bitmap to lock. |
width | An int32 that specifies the width of the bitmap to lock. |
height | An int32 that specifies the height of the bitmap to lock. |
flags | An image lock mode value that specifies the access level (read/write) for the bitmap. |
format | A pixel format value that specifies the data format of this bitmap. |
image_data_height | The pixel height of the bitmap object. Also sometimes referred to as the number of scan lines. |
image_data_pixel_format | A pixel format that specifies the format of the pixel information in the associated bitmap. |
image_data_reserved | Reserved. Do not use. |
image_data_scan0 | The address of the first pixel data in the bitmap. |
image_data_stride | The stride width (also called scan width), in bytes, of the bitmap. |
image_data_width | The pixel width of the bitmap. This can also be thought of as the number of pixels in one scan line. |
|
staticprotected |
Makes the specified color transparent for this bitmap.
image | The image handle. |
transprent_color_a | The byte that represents the alpha component of the color to make transparent. |
transprent_color_r | The byte that represents the red component of the color to make transparent. |
transprent_color_g | The byte that represents the green component of the color to make transparent. |
transprent_color_b | The byte that represents the blue component of the color to make transparent. |
|
staticprotected |
Gets the width and height of this image.
image | The image handle. |
width | A int32 that represents the width of the image. |
height | A int32 that represents the height of the image. |
|
staticprotected |
Gets IDs of the property items stored in the image.
image | The image handle. |
|
staticprotected |
Gets all the property items (pieces of metadata) stored in the image.
image | The image handle. |
|
staticprotected |
Gets the pixel format for the image.
image | The image handle. |
|
staticprotected |
Gets the file format of the image.
image | The image handle. |
|
staticprotected |
Rescale the image.
image | The image handle. |
width | The width for the new image. |
height | The height for the new image. |
|
staticprotected |
Rotates, flips, or rotates and flips the image.
image | The image handle. |
rotate_flip_type | A value that specifies the type of rotation and flip to apply to the image (see rotate_flip_types.h for more information). |
|
staticprotected |
Sets the resolution for this bitmap.
image | The image handle. |
x_dpi | The horizontal resolution, in dots per inch, of the xtd::drawing::bitmap. |
y_dpi | The vertical resolution, in dots per inch, of the xtd::drawing::bitmap. |
|
staticprotected |
Saves image to the specified output filename.
image | The image handle. |
filename | The file to save to. |
|
staticprotected |
Saves image to the specified output filename and raw format.
image | The image handle. |
filename | The file to save to. |
raw_format | The image format that represents the file format of this image (see image_formats.h for more information). |
|
staticprotected |
Saves image to the specified stream and raw format.
image | The image handle. |
stream | The stream to save to. |
raw_format | The image format that represents the file format of this image (see image_formats.h for more information). |
|
staticprotected |
Get the screen dpi.
|
staticprotected |
Gets the width and height, in pixels, of the image.
image | The image handle. |
width | The width, in pixels, of the image. |
height | The height, in pixels, of the image. |
|
staticprotected |
Unlocks this Bitmap from system memory.
image | The image handle. |
image_data_height | The pixel height of the bitmap object. Also sometimes referred to as the number of scan lines. |
image_data_pixel_format | A pixel format that specifies the format of the pixel information in the associated bitmap. |
image_data_reserved | Reserved. Do not use. |
image_data_scan0 | The address of the first pixel data in the bitmap. |
image_data_stride | The stride width (also called scan width), in bytes, of the bitmap. |
image_data_width | The pixel width of the bitmap. This can also be thought of as the number of pixels in one scan line. |
|
staticprotected |
Gets the vertical resolution, in pixels per inch, of the image.
image | The image handle. |