The File class provides a function to import and export image files.
More...
#include <hps.h>
|
static ImageKit | Import (char const *in_file_name, ImportOptionsKit const &in_options) |
| Performs a synchronous import of the specified image file. More...
|
|
static void | Export (char const *in_file_name, HPS::WindowKey const &in_window, ExportOptionsKit const &in_options) |
| Performs a synchronous export to an image of the specified window. More...
|
|
static void | Export (char const *in_file_name, HPS::WindowKey const &in_window, unsigned int in_width, unsigned int in_height, Format in_format=Format::Png, bool in_transparent_background=false) |
| Performs a synchronous export to an image of the specified window. More...
|
|
static void | Export (char const *in_file_name, HPS::ImageKit const &in_image_kit) |
| Performs a synchronous export to an image from the specified ImageKit May throw an exception if a problem occurs during export, or if the image kit provided is incomplete. More...
|
|
|
| File () |
| Private default constructor to prevent instantiation. More...
|
|
The File class provides a function to import and export image files.
◆ File()
HPS::Image::File::File |
( |
| ) |
|
|
private |
Private default constructor to prevent instantiation.
◆ Export() [1/3]
Performs a synchronous export to an image of the specified window.
May throw an IOException if a problem occurs during export.
- Parameters
-
in_file_name | Name of image file to which to save the data. |
in_window | The WindowKey where the screen-shot will be taken |
in_options | Options to use during export. If the option does not have size defined the size of in_window is used. |
◆ Export() [2/3]
static void HPS::Image::File::Export |
( |
char const * |
in_file_name, |
|
|
HPS::WindowKey const & |
in_window, |
|
|
unsigned int |
in_width, |
|
|
unsigned int |
in_height, |
|
|
Format |
in_format = Format::Png , |
|
|
bool |
in_transparent_background = false |
|
) |
| |
|
static |
Performs a synchronous export to an image of the specified window.
May throw an IOException if a problem occurs during export.
- Parameters
-
in_file_name | Name of image file to which to save the data. |
in_window | The WindowKey where the screen-shot will be taken |
in_width | The width of the exported image, in pixels |
in_height | The height of the exported image, in pixels |
in_format | The format of the exported image, defaults to PNG |
in_transparent_background | Whether to render the background as transparent. Only valid if in_format is PNG. Defaults to false. |
◆ Export() [3/3]
static void HPS::Image::File::Export |
( |
char const * |
in_file_name, |
|
|
HPS::ImageKit const & |
in_image_kit |
|
) |
| |
|
static |
Performs a synchronous export to an image from the specified ImageKit May throw an exception if a problem occurs during export, or if the image kit provided is incomplete.
- Parameters
-
in_file_name | Name of image file to which to save the data. |
in_image_kit | ImageKit containing the data, size and format of the image to be exported |
◆ Import()
Performs a synchronous import of the specified image file.
The function returns an ImageKit with the data from the image file and with the specified options. May throw an IOException if a problem occurs during import.
- Parameters
-
in_file_name | Name of image file from which to get the data. |
in_options | Options to use during import and to set on the ImageKit returned by this function. |
- Returns
- An ImageKit containing the data from the specified file and with the specified options.
The documentation for this class was generated from the following file: