xtd 1.0.0
Loading...
Searching...
No Matches
image_converter.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "image.hpp"
7#include <xtd/static>
8
10namespace xtd {
12 namespace drawing {
14 class bitmap;
16
29 public:
31
37 [[nodiscard]] static auto from_base64_string(const xtd::string& value) -> xtd::drawing::image;
38
43 [[nodiscard]] static auto to_array(const xtd::drawing::image& value) -> xtd::array<xtd::byte>;
44
49 [[nodiscard]] static auto to_base64_string(const xtd::drawing::image& value) -> xtd::string;
50
56 static auto to_file(const xtd::drawing::image& value, const xtd::string& filename) -> void;
61 static auto to_file(const xtd::drawing::image& value, const xtd::string& filename, const xtd::drawing::imaging::image_format& format) -> void;
62
67 [[nodiscard]] static auto to_image(const xtd::array<xtd::byte>& value) -> xtd::drawing::image;
72 [[nodiscard]] static auto to_image(const xtd::read_only_span<xtd::byte>& value) -> xtd::drawing::image;
76 [[nodiscard]] static auto to_image(const xtd::string& filename) -> xtd::drawing::image;
80 [[nodiscard]] static auto to_image(std::istream& stream) -> xtd::drawing::image;
81
88 static auto to_stream(const xtd::drawing::image& value, std::ostream& stream, const xtd::drawing::imaging::image_format& format) -> void;
90 };
91 }
92}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes....
Definition bitmap.hpp:26
Converts images to and from xtd::drawing::image class. This class cannot be inherited.
Definition image_converter.hpp:28
static auto to_file(const xtd::drawing::image &value, const xtd::string &filename, const xtd::drawing::imaging::image_format &format) -> void
Convert specified image to file.
static auto from_base64_string(const xtd::string &value) -> xtd::drawing::image
Convert specified base64 string to image.
static auto to_stream(const xtd::drawing::image &value, std::ostream &stream, const xtd::drawing::imaging::image_format &format) -> void
Convert specified image to stream.
static auto to_image(const xtd::string &filename) -> xtd::drawing::image
Convert specified file name string.
static auto to_image(const xtd::array< xtd::byte > &value) -> xtd::drawing::image
Convert specified byte array to image.
static auto to_base64_string(const xtd::drawing::image &value) -> xtd::string
Convert specified image to base64 string.
static auto to_array(const xtd::drawing::image &value) -> xtd::array< xtd::byte >
Convert specified image to byte array.
static auto to_image(const xtd::read_only_span< xtd::byte > &value) -> xtd::drawing::image
Convert specified bytes span to image.
static auto to_file(const xtd::drawing::image &value, const xtd::string &filename) -> void
Convert specified image to file.
static auto to_image(std::istream &stream) -> xtd::drawing::image
Convert specified stream to image.
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49
Specifies the file format of the image. Not inheritable.
Definition image_format.hpp:25
Contains drawing_export_ keyword.
auto format(const xtd::string &fmt, args_t &&... args) -> xtd::string
Writes the text representation of the specified arguments list, to string using the specified format ...
Definition format.hpp:21
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:38
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
Contains xtd::drawing::image class.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr read_only_span()
Creates an empty xtd::read_only_span whose xtd::read_only_span::data is null and xtd::read_only_span:...
Definition read_only_span.hpp:85