Class to load and display JPEG images.
More...
#include <jpeg.h>
Class to load and display JPEG images.
This class is only supported on RISC OS 3.6 or later
◆ density_simple_ratio()
bool tbx::JPEG::density_simple_ratio |
( |
| ) |
const |
|
inline |
Check if this image has a simple density ratio.
- Returns
- true if the image has a simple density ratio
◆ dithered() [1/2]
void tbx::JPEG::dithered |
( |
bool |
dither | ) |
|
Set flag to control dithering when plotting.
- Parameters
-
dither | true to dither image |
◆ dithered() [2/2]
bool tbx::JPEG::dithered |
( |
| ) |
const |
|
inline |
Return dithered plot flag.
- Returns
- true if dithering is on for plotting
◆ error_defused() [1/2]
void tbx::JPEG::error_defused |
( |
bool |
error_defused | ) |
|
Set flag to control error defusion when plotting.
- Parameters
-
error_defused | true to use error defusion when plotting |
◆ error_defused() [2/2]
bool tbx::JPEG::error_defused |
( |
| ) |
const |
|
inline |
Return error defused plot flag.
- Returns
- true if error defusion is on for plotting
◆ extra_workspace()
int tbx::JPEG::extra_workspace |
( |
| ) |
const |
|
inline |
Return the extra memory required to plot this image.
- Returns
- number of extra workspace bytes required
◆ GetFileInfo()
bool tbx::JPEG::GetFileInfo |
( |
const std::string & |
file_name, |
|
|
int * |
width, |
|
|
int * |
height, |
|
|
int * |
x_density, |
|
|
int * |
y_density, |
|
|
int * |
workspace, |
|
|
bool * |
greyscale_image, |
|
|
bool * |
no_transform_plots, |
|
|
bool * |
pixel_density_is_simple_ratio |
|
) |
| |
|
static |
Get information on a JPEG file.
Pass 0 for any parameters not required
- Parameters
-
file_name | name of file to get the information for |
width | set to width in pixels |
height | set to height in pixels |
x_density | set to horizontal pixel density |
y_density | set to vertical pixel density |
workspace | set to SpriteExtend extra workspace requirement to plot. |
greyscale_image | set to true if JPEG is a greyscale image |
no_transform_plots | set to true if transform plots are not supported for this image. |
pixel_density_is_simple_ratio | set to true if pixel density is in dpi. |
- Returns
- true if it is a JPEG file
◆ greyscale()
bool tbx::JPEG::greyscale |
( |
| ) |
const |
|
inline |
Check if image is grey scale.
- Returns
- true if this is a grey scale image
◆ height()
int tbx::JPEG::height |
( |
| ) |
const |
|
inline |
Get the height of image.
- Returns
- height of image in pixels
◆ is_valid()
bool tbx::JPEG::is_valid |
( |
| ) |
const |
|
inline |
Check if JPEG class contains an image.
- Returns
- true if image is valid
◆ IsJPEGFile()
bool tbx::JPEG::IsJPEGFile |
( |
const std::string & |
file_name | ) |
|
|
static |
Check if a file is a JPEG file.
- Parameters
-
file_name | name of file to check |
- Returns
- true if it is a JPEG file
◆ load()
bool tbx::JPEG::load |
( |
const std::string & |
file_name | ) |
|
Load JPEG from file.
- Parameters
-
file_name | name of file to load from |
- Returns
- true if load succeeded
◆ plot() [1/5]
void tbx::JPEG::plot |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
virtual |
Plot jpeg to screen.
- Parameters
-
x | x coordinate in os units |
y | y coordinate in os units |
Implements tbx::Image.
◆ plot() [2/5]
void tbx::JPEG::plot |
( |
const Point & |
pos | ) |
const |
|
virtual |
Plot jpeg to screen.
- Parameters
-
pos | point to plot the jpeg in in os units |
Reimplemented from tbx::Image.
◆ plot() [3/5]
void tbx::JPEG::plot |
( |
int |
x, |
|
|
int |
y, |
|
|
const ScaleFactors & |
sf |
|
) |
| |
Plot the jpeg with the given scale factors.
- Parameters
-
x | x coordinate in os units |
y | y coordinate in os units |
sf | ScaleFactors to scale image |
◆ plot() [4/5]
void tbx::JPEG::plot |
( |
const BBox & |
bbox | ) |
|
Plot jpeg image in given box.
- Parameters
-
bbox | box to plot image into. |
◆ plot() [5/5]
◆ transform_plot_suppoted()
bool tbx::JPEG::transform_plot_suppoted |
( |
| ) |
const |
|
inline |
Check is transform plots are supported for this image.
- Returns
- true if transform plots are supported
◆ width()
int tbx::JPEG::width |
( |
| ) |
const |
|
inline |
Get the width of image.
- Returns
- width of image in pixels
◆ x_density()
int tbx::JPEG::x_density |
( |
| ) |
const |
|
inline |
Get the horizontal pixel density.
- Returns
- horizontal pixel density
◆ y_density()
int tbx::JPEG::y_density |
( |
| ) |
const |
|
inline |
Get the vertical pixel density.
- Returns
- vertical pixel density
The documentation for this class was generated from the following files: