| 1 |
.\" $Id: fiasco_renderer_new.3,v 1.2 2000/06/14 18:58:35 hafner Exp $ |
| 2 |
.TH fiasco 3 "April, 2000" "FIASCO" "Fractal Image And Sequence COdec" |
| 3 |
|
| 4 |
.SH NAME |
| 5 |
.B fiasco_renderer_new, fiasco_renderer_delete |
| 6 |
\- convert a FIASCO image object to an X11 XImage |
| 7 |
|
| 8 |
.SH SYNOPSIS |
| 9 |
.B #include <fiasco.h> |
| 10 |
.sp |
| 11 |
.BI "fiasco_renderer_t *" |
| 12 |
.fi |
| 13 |
.BI "fiasco_renderer_new (unsigned long "red_mask , |
| 14 |
.fi |
| 15 |
.BI " unsigned long "green_mask , |
| 16 |
.fi |
| 17 |
.BI " unsigned long "blue_mask , |
| 18 |
.fi |
| 19 |
.BI " unsigned "bpp , |
| 20 |
.fi |
| 21 |
.BI " int "double_resolution ); |
| 22 |
.sp |
| 23 |
.BI "void" |
| 24 |
.fi |
| 25 |
.BI "fiasco_renderer_delete (fiasco_renderer_t * "renderer ); |
| 26 |
.sp |
| 27 |
.BI "int" |
| 28 |
.fi |
| 29 |
.BI "fiasco_renderer_render (const fiasco_renderer_t * "renderer , |
| 30 |
.fi |
| 31 |
.BI " unsigned char * "data ); |
| 32 |
.fi |
| 33 |
.BI " const fiasco_image_t * "fiasco_image ); |
| 34 |
.fi |
| 35 |
|
| 36 |
.SH DESCRIPTION |
| 37 |
The \fBfiasco_renderer_new()\fP function allocates and initializes a |
| 38 |
renderer object which has to be used to convert an internal FIASCO |
| 39 |
image object to one of the supported X11 formats. Currently, the FIASCO |
| 40 |
image can be rendered to an X11 XImage of either 16, 24, or 32 bits |
| 41 |
per pixel. Additional formats will be supported upon request. |
| 42 |
|
| 43 |
Function \fBfiasco_renderer_render()\fP is used to convert the given |
| 44 |
FIASCO image object to the specified format. |
| 45 |
|
| 46 |
After all frames are rendered, the function |
| 47 |
\fBfiasco_renderer_delete()\fP should be called to free temporarily |
| 48 |
allocated memory and to discard the renderer object. |
| 49 |
|
| 50 |
Note that the FIASCO renderer class is not restricted to X11 images: a |
| 51 |
FIASCO image object can be converted to an image data array of the |
| 52 |
form RGBRGB... by setting \fIred_mask\fP=0xff0000, |
| 53 |
\fIgreen_mask\fP=0xff00, \fIblue_mask\fP=0xff, and \fIbpp\fP=24. |
| 54 |
|
| 55 |
.SH ARGUMENTS |
| 56 |
|
| 57 |
.TP |
| 58 |
bpp |
| 59 |
Determines the number of bits of a single pixel of the X11 XImage |
| 60 |
structure (see XCreateImage(3)). If the XImage is already allocated |
| 61 |
then the value XImage->bits_per_pixel should be used. Currently, 16, |
| 62 |
24, and 32 bits per pixel are supported. |
| 63 |
|
| 64 |
.TP |
| 65 |
red_mask |
| 66 |
Determines which bits of a pixel should be used for the red |
| 67 |
component. If the XImage is already allocated then the value |
| 68 |
XImage->red_mask should be used. E.g., if \fIbpp=16\fP and |
| 69 |
\fIred_mask=0xf800\fP then each pixel is stored with two bytes. The |
| 70 |
red component uses bits 11-15, the remaining green and blue components |
| 71 |
use bits 0-10. |
| 72 |
|
| 73 |
.TP |
| 74 |
green_mask |
| 75 |
Determines which bits of a pixel should be used for the green |
| 76 |
component. If the XImage is already allocated then the value |
| 77 |
XImage->green_mask should be used. |
| 78 |
|
| 79 |
.TP |
| 80 |
blue_mask |
| 81 |
Determines which bits of a pixel should be used for the blue |
| 82 |
component. If the XImage is already allocated then the value |
| 83 |
XImage->blue_mask should be used. |
| 84 |
|
| 85 |
.TP |
| 86 |
data |
| 87 |
A pointer to the image data. If the XImage is already allocated then |
| 88 |
the value XImage->data should be used. This array has to be large |
| 89 |
enough to hold the decoded image at the given size (geometry and bits |
| 90 |
per pixel). |
| 91 |
|
| 92 |
.TP |
| 93 |
fiasco_image |
| 94 |
This object represents the decoded image which has been |
| 95 |
created by the FIASCO functions fiasco_decoder_get_frame(3) or |
| 96 |
fiasco_image_new(3). |
| 97 |
|
| 98 |
.SH RETURN VALUE |
| 99 |
The function \fBfiasco_renderer_new()\fP returns a pointer to the newly |
| 100 |
allocated renderer object. If an error has been caught, a NULL pointer |
| 101 |
is returned. |
| 102 |
|
| 103 |
The function \fBfiasco_renderer_render()\fP returns 1 if the image |
| 104 |
has been successfully converted. Otherwise, the function returns 0. |
| 105 |
|
| 106 |
In case of an error in one of the above functions, use the function |
| 107 |
fiasco_get_error_message(3) to get a string with the last error |
| 108 |
message of FIASCO. |
| 109 |
|
| 110 |
.SH "SEE ALSO" |
| 111 |
.br |
| 112 |
.BR fiasco_decoder_get_frame "(3), " fiasco_get_error_message (3) |
| 113 |
.BR fiasco_image_new (3) |
| 114 |
.br |
| 115 |
|
| 116 |
Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger. |
| 117 |
\fBWeighted Finite Automata for Video Compression\fP, IEEE Journal on |
| 118 |
Selected Areas In Communications, January 1998 |
| 119 |
.br |
| 120 |
Ullrich Hafner. \fBLow Bit-Rate Image and Video Coding with Weighted |
| 121 |
Finite Automata\fP, Ph.D. thesis, Mensch & Buch Verlag, ISBN |
| 122 |
3-89820-002-7, October 1999. |
| 123 |
|
| 124 |
.SH AUTHOR |
| 125 |
Ullrich Hafner |