Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

image

The image type is an abstract data type for interfacing with the image creation program. More...

Data Structures

struct  stp_image
 The image type is an abstract data type for interfacing with the image creation program. More...

Defines

#define STP_CHANNEL_LIMIT   (32)

Typedefs

typedef stp_image stp_image_t
 The image type is an abstract data type for interfacing with the image creation program.

Enumerations

enum  stp_image_status_t { STP_IMAGE_STATUS_OK, STP_IMAGE_STATUS_ABORT }
 Image status. More...

Functions

void stp_image_init (stp_image_t *image)
void stp_image_reset (stp_image_t *image)
int stp_image_width (stp_image_t *image)
int stp_image_height (stp_image_t *image)
stp_image_status_t stp_image_get_row (stp_image_t *image, unsigned char *data, size_t limit, int row)
const char * stp_image_get_appname (stp_image_t *image)
void stp_image_conclude (stp_image_t *image)

Variables

void(* stp_image::reset )(struct stp_image *image)
 This callback is called to reset the image to the beginning.
int(* stp_image::width )(struct stp_image *image)
 This callback returns the width of the image in pixels.
int(* stp_image::height )(struct stp_image *image)
 This callback returns the height of the image in pixels.
stp_image_status_t(* stp_image::get_row )(struct stp_image *image, unsigned char *data, size_t byte_limit, int row)
 This callback transfers the data from the image to the gimp-print library.
const char *(* stp_image::get_appname )(struct stp_image *image)
 This callback returns the name of the application.
void(* stp_image::conclude )(struct stp_image *image)
 This callback is called at the end of each page.
void * stp_image::rep
 A pointer to an application-specific state information that might need to be associated with the image object.

Detailed Description

The image type is an abstract data type for interfacing with the image creation program.


Define Documentation

#define STP_CHANNEL_LIMIT   (32)
 

The maximum number of channels.


Typedef Documentation

typedef struct stp_image stp_image_t
 

The image type is an abstract data type for interfacing with the image creation program.

It provides callbacks to functions defined within the client application which are called while printing the image.


Enumeration Type Documentation

enum stp_image_status_t
 

Image status.

Enumerator:
STP_IMAGE_STATUS_OK  Everything is OK.
STP_IMAGE_STATUS_ABORT  An error occured, or the job was aborted.


Function Documentation

void stp_image_conclude stp_image_t image  ) 
 

const char* stp_image_get_appname stp_image_t image  ) 
 

stp_image_status_t stp_image_get_row stp_image_t image,
unsigned char *  data,
size_t  limit,
int  row
 

int stp_image_height stp_image_t image  ) 
 

void stp_image_init stp_image_t image  ) 
 

void stp_image_reset stp_image_t image  ) 
 

int stp_image_width stp_image_t image  ) 
 


Variable Documentation

void(* stp_image::conclude)(struct stp_image *image) [inherited]
 

This callback is called at the end of each page.

const char*(* stp_image::get_appname)(struct stp_image *image) [inherited]
 

This callback returns the name of the application.

This is embedded in the output by some drivers.

stp_image_status_t(* stp_image::get_row)(struct stp_image *image, unsigned char *data, size_t byte_limit, int row) [inherited]
 

This callback transfers the data from the image to the gimp-print library.

It is called from the driver layer. It should copy WIDTH (as returned by the width() member) pixels of data into the data buffer. It normally returns STP_IMAGE_STATUS_OK; if something goes wrong, or the application wishes to stop producing any further output (e. g. because the user cancelled the print job), it should return STP_IMAGE_STATUS_ABORT. This will cause the driver to flush any remaining data to the output. It will always request rows in monotonically ascending order, but it may skip rows (if, for example, the resolution of the input is higher than the resolution of the output).

Parameters:
image the image in use.
data a pointer to width() bytes of pixel data.
byte_limit (image width * number of channels).
row (unused).

int(* stp_image::height)(struct stp_image *image) [inherited]
 

This callback returns the height of the image in pixels.

Parameters:
image the image in use.

void* stp_image::rep [inherited]
 

A pointer to an application-specific state information that might need to be associated with the image object.

void(* stp_image::reset)(struct stp_image *image) [inherited]
 

This callback is called to reset the image to the beginning.

It may (in principle) be called multiple times if a page is being printed more than once.

Warning:
The reset() call may be removed in the future.
Parameters:
image the image in use.

int(* stp_image::width)(struct stp_image *image) [inherited]
 

This callback returns the width of the image in pixels.

Parameters:
image the image in use.


Generated on Sat Aug 27 11:56:03 2005 for libgutenprint API Reference by  doxygen 1.4.4