The stick2xyz Documentation 1.14.1
|
#include "output2dpngpriv.h"
#include "output2dpng.h"
#include "output2djpeg.h"
#include "output2dbmp.h"
Go to the source code of this file.
int mod_output2d_bpp_default | ( | void | ) |
This function returns the default bits per pixel (bpp) value of the module.
int | The default bpp value. |
Definition at line 709 of file output2dpng.c.
References output2dbmp_bpp_default(), output2djpeg_bpp_default(), and output2dpng_bpp_default().
size_t mod_output2d_bpp_list | ( | int * | array | ) |
This function sets up an integer array with bits per pixel (bpp) numbers that are supported by the module.
[out] | array | An array of integers for the function to set up. If parameter is NULL, the array will not be set up. |
size_t | The number of elements that the array must be allocated for. |
Definition at line 675 of file output2dpng.c.
References output2dbmp_bpp_list(), output2djpeg_bpp_list(), and output2dpng_bpp_list().
int mod_output2d_bpp_supported | ( | const int | value | ) |
This function will check to see if a bits per pixel (bpp) value is supported by the module.
[in] | value | The bpp value to be checked. |
1 | If value is supported. |
0 | If value is not supported. |
Definition at line 694 of file output2dpng.c.
References output2dbmp_bpp_supported(), output2djpeg_bpp_supported(), and output2dpng_bpp_supported().
stick2xyz_pctchar mod_output2d_desc | ( | void | ) |
Returns the the internally stored module short description.
stick2xyz_pctchar | The constant module short description. |
Definition at line 525 of file output2dpng.c.
References output2dbmp_desc(), output2djpeg_desc(), and output2dpng_desc().
void mod_output2d_free_handle | ( | output2d_handle | handle | ) |
Deallocates an Output 2-D handle.
[in] | handle | The handle to deallocate. |
Definition at line 845 of file output2dpng.c.
References output2dbmp_free(), output2djpeg_free(), and output2dpng_free().
int mod_output2d_getnewdata | ( | output2d_handle | handle, |
unsigned int | filnum | ||
) |
This is an optional function to ask the connected Pane 2-D module for another copy of the image data. This function is useful when multithreading.
[in] | handle | The handle to operate on. |
[in] | filnum | If greater than zero, the number becomes the next file number. Otherwise, the file number in the handle is incremented. |
1 | On success. |
0 | On failure. |
Definition at line 869 of file output2dpng.c.
References output2dbmp_getnewdata(), output2djpeg_getnewdata(), and output2dpng_getnewdata().
int mod_output2d_init | ( | int | multithread | ) |
This optional function is called when the module is initialized. This function allows you to return a count of references to the module.
[in] | multithread | 1 if program is running with multiple threads, 0 if program is running single threaded. |
0 | on error. |
1 | any positive integer means success. |
Definition at line 981 of file output2dpng.c.
References output2dpng_init().
void mod_output2d_lang | ( | stick2xyz_print_ptr | newval | ) |
Changes the pointer type of the language pack calling function.
[in] | newval | The new function pointer to store. |
Definition at line 944 of file output2dpng.c.
References output2dbmp_lang(), output2djpeg_lang(), and output2dpng_lang().
int mod_output2d_multithread_safe | ( | void | ) |
Tells you whether or not the module's write functions are multi-thread safe.
1 | If write functions are multi-thread safe. |
0 | If write functions are not multi-thread safe. |
Definition at line 585 of file output2dpng.c.
References output2dbmp_multithread_safe(), output2djpeg_multithread_safe(), and output2dpng_multithread_safe().
stick2xyz_pctchar mod_output2d_name | ( | void | ) |
Returns the internally stored UNIX module name.
stick2xyz_pctchar | The constant UNIX module name. |
Definition at line 511 of file output2dpng.c.
References output2dbmp_name(), output2djpeg_name(), and output2dpng_name().
int mod_output2d_quality_range | ( | struct output2d_qualityinfo * | dest | ) |
Fills a structure with image quality information. The information is to be used in the compression value of mod_output2d_write (and mod_output2d_write_w on Windows).
dest | The structure to fill with data. |
1 | On success. |
0 | On failure. |
Definition at line 629 of file output2dpng.c.
References output2dbmp_qualityrange(), output2djpeg_qualityrange(), and output2dpng_quality_range().
uint32_t mod_output2d_quality_valid | ( | const int | value | ) |
An OPTIONAL function that allows the module to check if the given integer is a valid quality value.
[in] | value | The value to check. |
STICK2XYZ_OUTPUT2D_QUALITY_VALID | If value is valid. |
STICK2XYZ_OUTPUT2D_QUALITY_INVALID | If value is invalid. |
STICK2XYZ_OUTPUT2D_QUALITY_TOOLOW | If value is invalid and too low. |
STICK2XYZ_OUTPUT2D_QUALITY_TOOHIGH | If value is invalid and too high. |
Definition at line 654 of file output2dpng.c.
References output2dbmp_qualityvalid(), output2djpeg_qualityvalid(), and output2dpng_quality_valid().
void mod_output2d_read | ( | const char * | filetoread | ) |
Reads a file and prints the file information to stdout.
[in] | filetoread | The file to read. |
Definition at line 962 of file output2dpng.c.
References output2dpng_read().
int mod_output2d_release | ( | void | ) |
This optional function is called when the module is being unloaded. This function allows you to run any cleanup code independent of the operating system's way of notifying the module.
0 | when module is ready to be unloaded. |
1 | any positive integer means module is not ready to be unloaded. |
Definition at line 996 of file output2dpng.c.
References output2dpng_release().
void mod_output2d_set_tty | ( | void * | fildescout, |
void * | fildescerr | ||
) |
This function sets the file descriptors for writing to the terminal.
By default, the library uses stdout and stderr.
This function was introduced in version 1.5.0.
[in] | fildescout | The file descriptor for stdout. |
[in] | fildescerr | The file descriptor for stderr. |
Definition at line 605 of file output2dpng.c.
References output2dbmp_set_tty(), output2djpeg_set_tty(), and output2dpng_set_tty().
int mod_output2d_sigterm | ( | output2d_sigterm_ready | func, |
int | modnumber | ||
) |
This optional function is called when the program receives signal SIGTERM.
[in] | func | The function for the module to call when ready for program exit, if 0 is returned by the module. |
[in] | modnumber | The module number in the dynamic or static array. This number is the parameter when calling func. |
1 | module is ready to be unloaded. |
0 | module is not ready to be unloaded. |
Definition at line 1030 of file output2dpng.c.
References output2dbmp_sigterm(), output2djpeg_sigterm(), and output2dpng_sigterm().
int mod_output2d_type | ( | void | ) |
Returns the integer describing the module type.
The possible values are:
ASCII Modules:
STICK2XYZ_MODTYPE_OUTPUT2D_DEBUG
UNICODE Modules:
STICK2XYZ_MODTYPE_OUTPUT2D_UNICODE
STICK2XYZ_MODTYPE_OUTPUT2D_UNICODE_DEBUG
int | The module type as described above. |
Definition at line 568 of file output2dpng.c.
References output2dbmp_type(), output2djpeg_type(), and output2dpng_type().
void mod_output2d_version | ( | int * | dest | ) |
Sets up the major, minor, and revision numbers into three integers.
[out] | dest | An array of three integers to receive the module data. |
Definition at line 540 of file output2dpng.c.
References output2dbmp_version(), output2djpeg_version(), and output2dpng_version().
int mod_output2d_write | ( | output2d_handle | handle, |
const char * | filnam, | ||
unsigned int | filnum, | ||
int | compression | ||
) |
Writes information in a Output 2-D handle to a file.
[in] | handle | The handle to work on. |
[in] | filnam | The file name prefix to open. |
[in] | filnum | The file number to write after the prefix. |
[in] | compression | The compression ratio, if applicable, to use. |
int | 1 on success, 0 on failure. |
Definition at line 894 of file output2dpng.c.
References output2dbmp_write(), output2djpeg_write(), and output2dpng_write().
int mod_output2d_write_w | ( | output2d_handle | handle, |
const wchar_t * | filnam, | ||
unsigned int | filnum, | ||
int | compression | ||
) |
Writes information in a Output 2-D handle to a file.
[in] | handle | The handle to work on. |
[in] | filnam | The file name prefix to open. |
[in] | filnum | The file number to write after the prefix. |
[in] | compression | The compression ratio, if applicable, to use. |
int | 1 on success, 0 on failure. |
Definition at line 922 of file output2dpng.c.
References output2dbmp_write_w(), output2djpeg_write_w(), and output2dpng_write_w().
output2d_handle mod_pane16bytype_to_output2d | ( | pane2d_handle | pane, |
pane2d_dupfunc_getlist | duplist, | ||
int | use_rgb, | ||
unsigned int | filnum | ||
) |
Converts a Pane 2-D 16-bit handle into an Output 2-D handle.
[in] | pane | The Pane 2-D handle to convert. |
[in] | duplist | The Pane 2-D's function for duplicating the image data. |
[in] | use_rgb | 1 if output is to be done in color, 0 otherwise. |
[in] | filnum | The initial file number to use. If 0, it will be set to 1. |
output2d_handle | The new Output 2-D handle. |
Definition at line 801 of file output2dpng.c.
References output2dpng_bypng16type().
output2d_handle mod_pane_to_output2d | ( | pane2d_handle | pane, |
pane2d_dupdata | dupdata, | ||
pane2d_dupxy | dupxy, | ||
int | use_rgb | ||
) |
Converts a Pane 2-D handle into an Output 2-D handle.
[in] | pane | The Pane 2-D handle to convert. |
[in] | dupdata | The Pane 2-D's function for duplicating the image data. |
[in] | dupxy | The Pane 2-D's function for duplicating the maximum X and Y coordinates. |
[in] | use_rgb | 1 if output is to be done in color, 0 otherwise. |
output2d_handle | The new Output 2-D handle. |
Definition at line 741 of file output2dpng.c.
References output2dpng_to_png().
output2d_handle mod_panebytype_to_output2d | ( | pane2d_handle | pane, |
pane2d_dupfunc_getlist | duplist, | ||
int | use_rgb, | ||
unsigned int | filnum | ||
) |
Converts a Pane 2-D 8-bit handle into an Output 2-D handle.
[in] | pane | The Pane 2-D handle to convert. |
[in] | duplist | The Pane 2-D's function for duplicating the image data. |
[in] | use_rgb | 1 if output is to be done in color, 0 otherwise. |
[in] | filnum | The initial file number to use. If 0, it will be set to 1. |
output2d_handle | The new Output 2-D handle. |
Definition at line 826 of file output2dpng.c.
References output2dbmp_bybmptype(), output2djpeg_byjpegtype(), and output2dpng_bypngtype().
output2d_handle mod_paneimage_to_output2d | ( | pane2d_handle | pane, |
pane2d_dupimage | dupimage, | ||
pane2d_freeimage | freedata, | ||
pane2d_dupxy | dupxy, | ||
int | use_rgb | ||
) |
Converts a Pane 2-D handle into an Output 2-D handle.
[in] | pane | The Pane 2-D handle to convert. |
[in] | dupimage | The Pane 2-D's function for duplicating the image data. |
[in] | freedata | The Pane 2-D's function for freeing image data. |
[in] | dupxy | The Pane 2-D's function for duplicating the maximum X and Y coordinates. |
[in] | use_rgb | 1 if output is to be done in color, 0 otherwise. |
output2d_handle | The new Output 2-D handle. |
Definition at line 772 of file output2dpng.c.
References output2dpng_image_to_png().