The stick2xyz Documentation 1.14.1
output2dpng.c
Go to the documentation of this file.
1/***************************************************************************
2 * stick2xyz - Can create and convert stick figure animations for CG. *
3 * Copyright (C) 2021 by Kevin McBride <dolphindddd@aol.com> *
4 * *
5 * This program is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17 ***************************************************************************/
18
19
20#include "output2dpngpriv.h"
21
22
23#ifdef DOXYGEN_BUILD
24#include "output2dpng.h"
25#include "output2djpeg.h"
26#include "output2dbmp.h"
27#else /* not DOXYGEN_BUILD */
28
29/* This array contains the version of the module. */
30static int modversion[] =
31 {STICK2XYZ_VER_MAJOR, STICK2XYZ_VER_MINOR, STICK2XYZ_VER_REVISION};
32/* The file descriptors we are outputting tty information to. */
33static FILE * modttyout = NULL;
34static FILE * modttyerr = NULL;
35#if defined(HAVE_THREADS_H) | defined(__WINDOWS__)
36static int canmultithread = 0;
37#else /* defined(HAVE_THREADS_H) | defined(__WINDOWS__) */
38static const int canmultithread = 0;
39#endif /* defined(HAVE_THREADS_H) | defined(__WINDOWS__) */
40static volatile int modreferences = 0;
41
42#ifndef STICK2XYZ_NO_MODLANGPACKS
43/* Used for dynamically accessing the language libraries. */
44stick2xyz_print_ptr stick2xyz_lang_lib_output2dpng = NULL;
45
46void output2dpng_lang ( stick2xyz_print_ptr newval )
47{
48 stick2xyz_lang_lib_output2dpng = newval;
49}
50#endif /* not STICK2XYZ_NO_MODLANGPACKS */
51
52
53/* PNGWrite Module Info Functions */
55{
56 return stick2xyz_output2dpng_modname();
57}
58
60{
61 return stick2xyz_output2dpng_moddesc();
62}
63
64void output2dpng_version ( int * dest )
65{
66 dest[0] = modversion[0];
67 dest[1] = modversion[1];
68 dest[2] = modversion[2];
69}
70
71int output2dpng_type ( void )
72{
73#ifdef UNICODE
74#ifdef DEBUG
76#else /* not DEBUG */
78#endif /* not DEBUG */
79#else /* not UNICODE */
80#ifdef DEBUG
82#else /* not DEBUG */
84#endif /* not DEBUG */
85#endif /* not UNICODE */
86}
87
88
89int output2dpng_init ( int multithread )
90{
91#if defined(HAVE_THREADS_H) | defined(__WINDOWS__)
92 /* Check reference count. */
93 if ( ( multithread ) && ( modreferences == 0 ) )
94 {
95 /* Initialize the mutex. */
96 if ( output2dpng_enablemultithread() )
97 {
98 /* We can now multithread. */
99 canmultithread = 1;
100 } else {
101 /* Call failed. */
102 return 0;
103 }
104 }
105#endif /* defined(HAVE_THREADS_H) | defined(__WINDOWS__) */
106
107 /* Increment modreferences. */
108 modreferences++;
109 /* Return reference count to caller. */
110 return modreferences;
111}
112
113int output2dpng_release ( void )
114{
115#if defined(HAVE_THREADS_H) | defined(__WINDOWS__)
116 /* Check reference count. */
117 if ( modreferences == 1 )
118 {
119 /* Destroy the mutex. */
120 if ( output2dpng_disablemultithread() )
121 {
122 /* We can no longer multithread. */
123 canmultithread = 0;
124 } else {
125 /* The function failed. */
126 return -1;
127 }
128 }
129#endif /* defined(HAVE_THREADS_H) | defined(__WINDOWS__) */
130
131 /* Check reference count. */
132 if ( modreferences == 0 )
133 {
134 /* Set errno. */
135 stick2xyz_set_errno(EAGAIN);
136 /* Nothing to do when ref is zero. */
137 return 0;
138 }
139
140 /* Decrement references. */
141 modreferences--;
142
143 /* Return reference count to caller. */
144 return modreferences;
145}
146
147
148void output2dpng_set_tty ( void * fildescout, void * fildescerr )
149{
150 modttyout = (FILE *)fildescout;
151 modttyerr = (FILE *)fildescerr;
152}
153
154FILE * output2dpng_get_ttyout ( void )
155{
156 if ( modttyout == NULL )
157 return stdout;
158 else
159 return modttyout;
160}
161
162FILE * output2dpng_get_ttyerr ( void )
163{
164 if ( modttyerr == NULL )
165 return stderr;
166 else
167 return modttyerr;
168}
169
170
171/* PNG Allocation Functions */
173 pane2d_handle pane,
174 pane2d_dupdata dupdata,
175 pane2d_dupxy dupxy,
176 int use_rgb
177)
178{
179 stick2xyz_image_data image;
180 int x;
181 int y;
182
183 /* Determine if padding should be used. */
184 if ( use_rgb )
185 use_rgb = 3;
186 else
187 use_rgb = 1;
188
189 /* Get the raw image data. */
190 image = dupdata(pane, use_rgb);
191 if ( image == NULL )
192 return NULL;
193
194 /* Get the x and y coordinates. */
195 dupxy(pane, &x, &y);
196
197 /* Pass all this information onto the allocator. */
198 return output2dpng_to_png_internal(image, use_rgb, x, y);
199}
200
202 pane2d_handle pane,
203 pane2d_dupimage dupimage,
204 pane2d_freeimage freedata,
205 pane2d_dupxy dupxy,
206 int use_rgb
207)
208{
209 stick2xyz_image_data image;
210 int x;
211 int y;
212
213 /* Determine if padding should be used. */
214 if ( use_rgb )
215 use_rgb = 3;
216 else
217 use_rgb = 1;
218
219 /* Get the raw image data. */
220 image = dupimage(pane, use_rgb);
221 if ( image == NULL )
222 return NULL;
223
224 /* Get the x and y coordinates. */
225 dupxy(pane, &x, &y);
226
227 /* Pass all this information onto the allocator. */
228 return output2dpng_image_to_png_internal(
229 image, use_rgb, x, y, pane,
230 NULL,
231 freedata,
233 0,
234 NULL
235 );
236}
237
239 pane2d_handle pane,
241 int use_rgb,
242 unsigned int filnum
243)
244{
245 struct pane2d_image16_funcs funclist;
246 stick2xyz_image16_data image;
247#ifdef __WINDOWS__
248 HANDLE eventreleased = NULL;
249#endif /* __WINDOWS__ */
250#ifdef HAVE_EVENTFD
251 int eventreleased;
252#endif /* HAVE_EVENTFD */
253 int multithreading;
254 int res;
255 int x;
256 int y;
257
258 /* Determine if padding should be used. */
259 if ( use_rgb )
260 use_rgb = 3;
261 else
262 use_rgb = 1;
263
264 /* Get sizeof structure. */
265 funclist.len = sizeof(struct pane2d_image16_funcs);
266 /* Get list of functions. */
267 res = duplist(
269 (struct pane2d_dupgen_funcs *)&funclist
270 );
271 /* If duplist() failed, we can't continue. */
272 if ( !res )
273 return NULL;
274 /* If our sizeof() is less than len, we need to assume a variable. */
275 if ( funclist.len < sizeof(struct pane2d_dupgen_funcs_v3) )
276 {
277 /* If our v2 sizeof() is less than len, we can't continue. */
278 if ( funclist.len < sizeof(struct pane2d_dupgen_funcs_v2) )
279 return NULL;
280
281 /* Assume multithreading is zero. */
282 multithreading = 0;
283 } else {
284 /* Get the multithreading boolean value. */
285 multithreading = funclist.multithreading(pane);
286 }
287#if defined(HAVE_EVENTFD) | defined(__WINDOWS__)
288 /* If our sizeof() at least v4, we can get the eventreleased handle. */
289 if ( funclist.len >= sizeof(struct pane2d_image16_funcs) )
290 {
291 eventreleased = funclist.eventreleased(pane);
292 }
293#endif /* defined(HAVE_EVENTFD) | defined(__WINDOWS__) */
294
295 /* Get the raw image data. */
296 image = funclist.dupimage(pane, use_rgb);
297 if ( image == NULL )
298 return NULL;
299
300 /* Get the x and y coordinates. */
301 funclist.dupxy(pane, &x, &y);
302
303 return output2dpng_image16_to_png_internal(
304 image, use_rgb, x, y, pane,
305 funclist.dupimage,
306 funclist.freeimage,
307 funclist.colorinfo(),
309#ifdef __WINDOWS__
311#else /* not __WINDOWS__ */
312#ifdef HAVE_EVENTFD
314#else /* not HAVE_EVENTFD */
315 NULL
316#endif /* not HAVE_EVENTFD */
317#endif /* not __WINDOWS__ */
318 );
319}
320
322 pane2d_handle pane,
324 int use_rgb,
325 unsigned int filnum
326)
327{
328 struct pane2d_image_funcs funclist;
329#ifdef __WINDOWS__
330 HANDLE eventreleased = NULL;
331#endif /* __WINDOWS__ */
332#ifdef HAVE_EVENTFD
333 int eventreleased;
334#endif /* HAVE_EVENTFD */
335 stick2xyz_image_data image;
336 int multithreading;
337 int res;
338 int x;
339 int y;
340
341 /* Determine if padding should be used. */
342 if ( use_rgb )
343 use_rgb = 3;
344 else
345 use_rgb = 1;
346
347 /* Get sizeof structure. */
348 funclist.len = sizeof(struct pane2d_image_funcs);
349 /* Get list of functions. */
350 res = duplist(
352 (struct pane2d_dupgen_funcs *)&funclist
353 );
354 /* If duplist() failed, we can't continue. */
355 if ( !res )
356 return NULL;
357 /* If our sizeof() is less than len, we need to assume a variable. */
358 if ( funclist.len < sizeof(struct pane2d_dupgen_funcs_v3) )
359 {
360 /* If our v2 sizeof() is less than len, we can't continue. */
361 if ( funclist.len < sizeof(struct pane2d_dupgen_funcs_v2) )
362 return NULL;
363
364 /* Assume multithreading is zero. */
365 multithreading = 0;
366 } else {
367 /* Get the multithreading boolean value. */
368 multithreading = funclist.multithreading(pane);
369 }
370#if defined(HAVE_EVENTFD) | defined(__WINDOWS__)
371 /* If our sizeof() at least v4, we can get the eventreleased handle. */
372 if ( funclist.len >= sizeof(struct pane2d_image_funcs) )
373 {
374 eventreleased = funclist.eventreleased(pane);
375 }
376#endif /* defined(HAVE_EVENTFD) | defined(__WINDOWS__) */
377
378 /* Get the raw image data. */
379 image = funclist.dupimage(pane, use_rgb);
380 if ( image == NULL )
381 return NULL;
382
383 /* Get the x and y coordinates. */
384 funclist.dupxy(pane, &x, &y);
385
386 return output2dpng_image_to_png_internal(
387 image, use_rgb, x, y, pane,
388 funclist.dupimage,
389 funclist.freeimage,
390 funclist.colorinfo(),
392#ifdef __WINDOWS__
394#else /* not __WINDOWS__ */
395#ifdef HAVE_EVENTFD
397#else /* not HAVE_EVENTFD */
398 NULL
399#endif /* not HAVE_EVENTFD */
400#endif /* not __WINDOWS__ */
401 );
402}
403
404
406{
407 return canmultithread;
408}
409
411 output2d_handle handle,
412 unsigned int filnum
413)
414{
415#if defined(HAVE_THREADS_H) | defined(__WINDOWS__)
416 /* If multithreading is not enabled, we can't do anything. */
417 if ( !canmultithread )
418 {
419 stick2xyz_set_errno(ENOSYS);
420 return 0;
421 }
422
423 /* Call our internal function. */
424 return output2dpng_getnewdata_internal(handle, filnum);
425#else /* not defined(HAVE_THREADS_H) | defined(__WINDOWS__) */
426 stick2xyz_set_errno(ENOSYS);
427 return 0;
428#endif /* not defined(HAVE_THREADS_H) | defined(__WINDOWS__) */
429}
430
431
433{
434 /* If dest is NULL, we can't do anything. */
435 if ( dest == NULL )
436 return 0;
437
438 /* If version of structure is less than we coded,
439 return failure to caller. */
440 if ( dest->quality_version < sizeof(struct output2d_qualityinfo) )
441 return 0;
442
443 /* Set our version of the structure. */
444 dest->quality_version = sizeof(struct output2d_qualityinfo);
445
446 /* Set up the values. */
447 dest->quality_min = STICK2XYZ_PNG_QUALITY_LOWEST;
448 dest->quality_max = STICK2XYZ_PNG_QUALITY_HIGHEST;
449 dest->quality_best = Z_BEST_COMPRESSION;
450 dest->quality_fast = Z_BEST_SPEED;
451 dest->quality_default = STICK2XYZ_PNG_COMPRESSION;
452
453 /* Return success to caller. */
454 return 1;
455}
456
457uint32_t output2dpng_quality_valid ( const int value )
458{
459 /* See if the value is too low. */
460 if ( value < 0 )
462
463 /* See if the value is too high. */
464 if ( value > 9 )
466
467 /* value is in the correct range. */
469}
470
471size_t output2dpng_bpp_list ( int * array )
472{
473 /* If array is NULL, return amount of elements to write. */
474 if ( array == NULL )
475 return 4;
476
477 /* Set up the bpp list array. */
478 array[0] = 8;
479 array[1] = 16;
480 array[2] = 24;
481 array[3] = 48;
482
483 /* Return to caller. */
484 return 4;
485}
486
487int output2dpng_bpp_supported ( const int value )
488{
489 if ( ( value == 8 ) | ( value == 16 ) )
490 return 1; /* Value is valid. */
491 if ( ( value == 24 ) | ( value == 48 ) )
492 return 1; /* Value is valid. */
493 return 0; /* Value is not valid. */
494}
495
496int output2dpng_bpp_default ( void )
497{
498 return 8;
499}
500
501#endif /* not DOXYGEN_BUILD */
502
503
504#ifndef STICK2XYZ_STATIC
505/* PNGWrite Module Info Functions */
512{
513#ifdef DOXYGEN_BUILD
516#endif /* DOXYGEN_BUILD */
517 return output2dpng_name();
518}
519
526{
527#ifdef DOXYGEN_BUILD
530#endif /* DOXYGEN_BUILD */
531 return output2dpng_desc();
532}
533
534
540void mod_output2d_version ( int * dest )
541{
542#ifdef DOXYGEN_BUILD
545#endif /* DOXYGEN_BUILD */
547}
548
569{
570#ifdef DOXYGEN_BUILD
573#endif /* DOXYGEN_BUILD */
574 return output2dpng_type();
575}
576
586{
587#ifdef DOXYGEN_BUILD
590#endif /* DOXYGEN_BUILD */
592}
593
594
605void mod_output2d_set_tty ( void * fildescout, void * fildescerr )
606{
607#ifdef DOXYGEN_BUILD
608 output2dbmp_set_tty(fildescout, fildescerr);
609 output2djpeg_set_tty(fildescout, fildescerr);
610#endif /* DOXYGEN_BUILD */
611 output2dpng_set_tty(fildescout, fildescerr);
612}
613
630{
631#ifdef DOXYGEN_BUILD
634#endif /* DOXYGEN_BUILD */
635 return output2dpng_quality_range(dest);
636}
637
654uint32_t mod_output2d_quality_valid ( const int value )
655{
656#ifdef DOXYGEN_BUILD
659#endif /* DOXYGEN_BUILD */
660 return output2dpng_quality_valid(value);
661}
662
663
675size_t mod_output2d_bpp_list ( int * array )
676{
677#ifdef DOXYGEN_BUILD
680#endif /* DOXYGEN_BUILD */
681 return output2dpng_bpp_list(array);
682}
683
694int mod_output2d_bpp_supported ( const int value )
695{
696#ifdef DOXYGEN_BUILD
699#endif /* DOXYGEN_BUILD */
700 return output2dpng_bpp_supported(value);
701}
702
710{
711#ifdef DOXYGEN_BUILD
714#endif /* DOXYGEN_BUILD */
716}
717
718
742 pane2d_handle pane,
743 pane2d_dupdata dupdata,
744 pane2d_dupxy dupxy,
745 int use_rgb
746)
747{
748 return output2dpng_to_png(pane, dupdata, dupxy, use_rgb);
749}
750
773 pane2d_handle pane,
774 pane2d_dupimage dupimage,
775 pane2d_freeimage freedata,
776 pane2d_dupxy dupxy,
777 int use_rgb
778)
779{
780 return output2dpng_image_to_png(pane, dupimage, freedata, dupxy, use_rgb);
781}
782
802 pane2d_handle pane,
804 int use_rgb,
805 unsigned int filnum
806)
807{
808 return output2dpng_bypng16type(pane, duplist, use_rgb, filnum);
809}
810
827 pane2d_handle pane,
829 int use_rgb,
830 unsigned int filnum
831)
832{
833#ifdef DOXYGEN_BUILD
834 output2dbmp_bybmptype(pane, duplist, use_rgb, filnum);
835 output2djpeg_byjpegtype(pane, duplist, use_rgb, filnum);
836#endif /* DOXYGEN_BUILD */
837 return output2dpng_bypngtype(pane, duplist, use_rgb, filnum);
838}
839
846{
847#ifdef DOXYGEN_BUILD
848 output2dbmp_free(handle);
849 output2djpeg_free(handle);
850#endif /* DOXYGEN_BUILD */
851 output2dpng_free(handle);
852}
853
870 output2d_handle handle,
871 unsigned int filnum
872)
873{
874#ifdef DOXYGEN_BUILD
875 output2dbmp_getnewdata(handle, filnum);
876 output2djpeg_getnewdata(handle, filnum);
877#endif /* DOXYGEN_BUILD */
878 return output2dpng_getnewdata(handle, filnum);
879}
880
895 output2d_handle handle,
896 const char * filnam,
897 unsigned int filnum,
898 int compression
899)
900{
901#ifdef DOXYGEN_BUILD
902 output2dbmp_write(handle, filnam, filnum, compression);
903 output2djpeg_write(handle, filnam, filnum, compression);
904#endif /* DOXYGEN_BUILD */
905 return output2dpng_write(handle, filnam, filnum, compression);
906}
907
908#ifdef UNICODE
923 output2d_handle handle,
924 const wchar_t * filnam,
925 unsigned int filnum,
926 int compression
927)
928{
929#ifdef DOXYGEN_BUILD
930 output2dbmp_write_w(handle, filnam, filnum, compression);
931 output2djpeg_write_w(handle, filnam, filnum, compression);
932#endif /* DOXYGEN_BUILD */
933 return output2dpng_write_w(handle, filnam, filnum, compression);
934}
935#endif /* UNICODE */
936
937
938#ifndef STICK2XYZ_NO_MODLANGPACKS
944void mod_output2d_lang ( stick2xyz_print_ptr newval )
945{
946#ifdef DOXYGEN_BUILD
947 output2dbmp_lang(newval);
948 output2djpeg_lang(newval);
949#endif /* DOXYGEN_BUILD */
950 output2dpng_lang(newval);
951}
952#endif /* not STICK2XYZ_NO_MODLANGPACKS */
953
954#ifdef DEBUG
962void mod_output2d_read ( const char * filetoread )
963{
964 output2dpng_read(filetoread);
965}
966#endif /* DEBUG */
967
968
981int mod_output2d_init ( int multithread )
982{
983 return output2dpng_init(multithread);
984}
985
997{
998 return output2dpng_release();
999}
1000
1001
1002#if defined(HAVE_THREADS_H) | defined(DOXYGEN_BUILD)
1031{
1032#ifdef DOXYGEN_BUILD
1033 output2dbmp_sigterm(func, modnumber);
1034 output2djpeg_sigterm(func, modnumber);
1035#endif /* DOXYGEN_BUILD */
1036
1037 return output2dpng_sigterm(func, modnumber);
1038}
1039#endif /* defined(HAVE_THREADS_H) | defined(DOXYGEN_BUILD) */
1040
1041
1042#else /* STICK2XYZ_STATIC */
1043void output2dpng_funcptrs_setup ( struct output2d_funcptrs * ptr )
1044{
1049
1052#ifdef HAVE_THREADS_H
1054#else /* not HAVE_THREADS_H */
1055 ptr->output2d_funcptrs_sigterm = NULL;
1056#endif /* not HAVE_THREADS_H */
1058
1070
1073
1077
1078#ifdef UNICODE
1080#endif /* UNICODE */
1082
1083#ifdef DEBUG
1085#else /* DEBUG */
1086 ptr->output2d_funcptrs_read = NULL;
1087#endif /* DEBUG */
1088}
1089#endif /* STICK2XYZ_STATIC */
1090
void output2dbmp_lang(stick2xyz_print_ptr newval)
stick2xyz_pctchar output2dbmp_desc(void)
int output2dbmp_bpp_supported(const int value)
int output2dbmp_sigterm(output2d_sigterm_ready func, int modnumber)
output2d_handle output2dbmp_bybmptype(pane2d_handle pane, pane2d_dupfunc_getlist duplist, int use_rgb, unsigned int filnum)
size_t output2dbmp_bpp_list(int *array)
int output2dbmp_getnewdata(output2d_handle handle, unsigned int filnum)
int output2dbmp_bpp_default(void)
void output2dbmp_set_tty(void *fildescout, void *fildescerr)
int output2dbmp_type(void)
int output2dbmp_multithread_safe(void)
stick2xyz_pctchar output2dbmp_name(void)
int output2dbmp_write(output2d_handle handle, const char *filnam, unsigned int filnum, int compression)
void output2dbmp_free(output2d_handle handle)
int output2dbmp_write_w(output2d_handle handle, stick2xyz_pctchar filnam, unsigned int filnum, int compression)
void output2dbmp_version(int *dest)
uint32_t output2dbmp_qualityvalid(const int value)
int output2dbmp_qualityrange(struct output2d_qualityinfo *dest)
void output2djpeg_version(int *dest)
int output2djpeg_getnewdata(output2d_handle handle, unsigned int filnum)
int output2djpeg_bpp_supported(const int value)
int output2djpeg_write(output2d_handle handle, const char *filnam, unsigned int filnum, int compression)
int output2djpeg_sigterm(output2d_sigterm_ready func, int modnumber)
int output2djpeg_qualityrange(struct output2d_qualityinfo *dest)
int output2djpeg_type(void)
int output2djpeg_multithread_safe(void)
uint32_t output2djpeg_qualityvalid(const int value)
size_t output2djpeg_bpp_list(int *array)
void output2djpeg_lang(stick2xyz_print_ptr newval)
stick2xyz_pctchar output2djpeg_name(void)
int output2djpeg_write_w(output2d_handle handle, stick2xyz_pctchar filnam, unsigned int filnum, int compression)
void output2djpeg_set_tty(void *fildescout, void *fildescerr)
stick2xyz_pctchar output2djpeg_desc(void)
void output2djpeg_free(output2d_handle handle)
output2d_handle output2djpeg_byjpegtype(pane2d_handle pane, pane2d_dupfunc_getlist duplist, int use_rgb, unsigned int filnum)
int output2djpeg_bpp_default(void)
int mod_output2d_write_w(output2d_handle handle, const wchar_t *filnam, unsigned int filnum, int compression)
Definition: output2dpng.c:922
void mod_output2d_free_handle(output2d_handle handle)
Definition: output2dpng.c:845
void mod_output2d_read(const char *filetoread)
Definition: output2dpng.c:962
int mod_output2d_sigterm(output2d_sigterm_ready func, int modnumber)
Definition: output2dpng.c:1030
size_t mod_output2d_bpp_list(int *array)
Definition: output2dpng.c:675
uint32_t mod_output2d_quality_valid(const int value)
Definition: output2dpng.c:654
int mod_output2d_init(int multithread)
Definition: output2dpng.c:981
stick2xyz_pctchar mod_output2d_name(void)
Definition: output2dpng.c:511
output2d_handle mod_panebytype_to_output2d(pane2d_handle pane, pane2d_dupfunc_getlist duplist, int use_rgb, unsigned int filnum)
Definition: output2dpng.c:826
int mod_output2d_release(void)
Definition: output2dpng.c:996
int mod_output2d_type(void)
Definition: output2dpng.c:568
int mod_output2d_bpp_default(void)
Definition: output2dpng.c:709
int mod_output2d_quality_range(struct output2d_qualityinfo *dest)
Definition: output2dpng.c:629
int mod_output2d_multithread_safe(void)
Definition: output2dpng.c:585
output2d_handle mod_paneimage_to_output2d(pane2d_handle pane, pane2d_dupimage dupimage, pane2d_freeimage freedata, pane2d_dupxy dupxy, int use_rgb)
Definition: output2dpng.c:772
void mod_output2d_version(int *dest)
Definition: output2dpng.c:540
output2d_handle mod_pane16bytype_to_output2d(pane2d_handle pane, pane2d_dupfunc_getlist duplist, int use_rgb, unsigned int filnum)
Definition: output2dpng.c:801
int mod_output2d_bpp_supported(const int value)
Definition: output2dpng.c:694
int mod_output2d_getnewdata(output2d_handle handle, unsigned int filnum)
Definition: output2dpng.c:869
void mod_output2d_set_tty(void *fildescout, void *fildescerr)
Definition: output2dpng.c:605
stick2xyz_pctchar mod_output2d_desc(void)
Definition: output2dpng.c:525
output2d_handle mod_pane_to_output2d(pane2d_handle pane, pane2d_dupdata dupdata, pane2d_dupxy dupxy, int use_rgb)
Definition: output2dpng.c:741
int mod_output2d_write(output2d_handle handle, const char *filnam, unsigned int filnum, int compression)
Definition: output2dpng.c:894
void mod_output2d_lang(stick2xyz_print_ptr newval)
Definition: output2dpng.c:944
void output2dpng_lang(stick2xyz_print_ptr newval)
void output2dpng_set_tty(void *fildescout, void *fildescerr)
int output2dpng_bpp_default(void)
int output2dpng_write(output2d_handle handle, const char *filnam, unsigned int filnum, int compression)
void output2dpng_free(output2d_handle handle)
uint32_t output2dpng_quality_valid(const int value)
int output2dpng_bpp_supported(const int value)
int output2dpng_sigterm(output2d_sigterm_ready func, int modnumber)
int output2dpng_init(int multithread)
int output2dpng_write_w(output2d_handle handle, const wchar_t *filnam, unsigned int filnum, int compression)
output2d_handle output2dpng_bypng16type(pane2d_handle pane, pane2d_dupfunc_getlist duplist, int use_rgb, unsigned int filnum)
void output2dpng_read(const char *filetoread)
stick2xyz_pctchar output2dpng_desc(void)
void output2dpng_version(int *dest)
size_t output2dpng_bpp_list(int *array)
output2d_handle output2dpng_bypngtype(pane2d_handle pane, pane2d_dupfunc_getlist duplist, int use_rgb, unsigned int filnum)
int output2dpng_type(void)
output2d_handle output2dpng_image_to_png(pane2d_handle pane, pane2d_dupimage dupimage, pane2d_freeimage freedata, pane2d_dupxy dupxy, int use_rgb)
output2d_handle output2dpng_to_png(pane2d_handle pane, pane2d_dupdata dupdata, pane2d_dupxy dupxy, int use_rgb)
int output2dpng_multithread_safe(void)
stick2xyz_pctchar output2dpng_name(void)
int output2dpng_release(void)
int output2dpng_quality_range(struct output2d_qualityinfo *dest)
int output2dpng_getnewdata(output2d_handle handle, unsigned int filnum)
void(* pane2d_freeimage)(pane2d_handle, uint8_t **)
Definition: stick2xyz.h:1133
#define STICK2XYZ_MODTYPE_OUTPUT2D
Definition: stick2xyz.h:227
#define STICK2XYZ_OUTPUT2D_QUALITY_TOOLOW
Definition: stick2xyz.h:1622
void(* output2d_sigterm_ready)(int)
Definition: stick2xyz.h:1724
#define STICK2XYZ_PANE2D_REQUEST_UINT16PP
Definition: stick2xyz.h:423
#define STICK2XYZ_MODTYPE_OUTPUT2D_UNICODE_DEBUG
Definition: stick2xyz.h:230
int(* pane2d_dupfunc_getlist)(uint32_t, struct pane2d_dupgen_funcs *)
Definition: stick2xyz.h:1165
uint8_t **(* pane2d_dupimage)(pane2d_handle, int)
Definition: stick2xyz.h:1129
#define STICK2XYZ_MODTYPE_OUTPUT2D_UNICODE
Definition: stick2xyz.h:229
void * output2d_handle
Definition: stick2xyz.h:1630
#define STICK2XYZ_OUTPUT2D_QUALITY_VALID
Definition: stick2xyz.h:1620
#define STICK2XYZ_MODTYPE_OUTPUT2D_DEBUG
Definition: stick2xyz.h:228
const wchar_t * stick2xyz_pctchar
Definition: stick2xyz.h:145
#define STICK2XYZ_PANE2D_REQUEST_UINT8PP
Definition: stick2xyz.h:421
uint8_t **(* pane2d_dupdata)(pane2d_handle, int)
Definition: stick2xyz.h:1125
#define STICK2XYZ_PANE2D_COLORTYPE_GRAY
Definition: stick2xyz.h:436
#define STICK2XYZ_OUTPUT2D_QUALITY_TOOHIGH
Definition: stick2xyz.h:1623
void(* pane2d_dupxy)(pane2d_handle, int *, int *)
Definition: stick2xyz.h:1161
void * pane2d_handle
Definition: stick2xyz.h:447
output2d_modid_name output2d_funcptrs_name
Definition: stick2xyz.h:1842
output2d_bpp_supported output2d_funcptrs_bpp_supported
Definition: stick2xyz.h:1860
paneimage_to_output2d output2d_funcptrs_paneimage_to_output2d
Definition: stick2xyz.h:1864
output2d_modid_desc output2d_funcptrs_desc
Definition: stick2xyz.h:1843
output2d_release output2d_funcptrs_release
Definition: stick2xyz.h:1849
output2d_init output2d_funcptrs_init
Definition: stick2xyz.h:1848
output2d_free_handle output2d_funcptrs_free_handle
Definition: stick2xyz.h:1869
output2d_sigterm output2d_funcptrs_sigterm
Definition: stick2xyz.h:1853
output2d_write_w output2d_funcptrs_write_w
Definition: stick2xyz.h:1872
output2d_bpp_list output2d_funcptrs_bpp_list
Definition: stick2xyz.h:1859
output2d_modid_version output2d_funcptrs_version
Definition: stick2xyz.h:1844
output2d_quality_valid output2d_funcptrs_quality_valid
Definition: stick2xyz.h:1857
output2d_read output2d_funcptrs_read
Definition: stick2xyz.h:1876
output2d_bpp_default output2d_funcptrs_bpp_default
Definition: stick2xyz.h:1861
output2d_modid_type output2d_funcptrs_type
Definition: stick2xyz.h:1845
output2d_quality_range output2d_funcptrs_quality_range
Definition: stick2xyz.h:1856
output2d_set_tty output2d_funcptrs_set_tty
Definition: stick2xyz.h:1851
output2d_getnewdata output2d_funcptrs_getnewdata
Definition: stick2xyz.h:1867
pane16_to_output2d_bytype output2d_funcptrs_pane16_to_output2d_bytype
Definition: stick2xyz.h:1865
pane_to_output2d output2d_funcptrs_pane_to_output2d
Definition: stick2xyz.h:1863
pane_to_output2d_bytype output2d_funcptrs_pane_to_output2d_bytype
Definition: stick2xyz.h:1866
output2d_multithread_safe output2d_funcptrs_multithread_safe
Definition: stick2xyz.h:1850
output2d_write output2d_funcptrs_write
Definition: stick2xyz.h:1874
uint32_t quality_version
Definition: stick2xyz.h:1642
pane2d_is_multithreaded multithreading
Definition: stick2xyz.h:1495
pane2d_eventreleased eventreleased
Definition: stick2xyz.h:1503
pane2d_is_multithreaded multithreading
Definition: stick2xyz.h:1441
pane2d_eventreleased eventreleased
Definition: stick2xyz.h:1449

SourceForge.net Logo  stick2xyz Project Page