Lines Matching refs:rpng2_info
189 static mainprog_info rpng2_info; variable
320 memset(&rpng2_info, 0, sizeof(mainprog_info)); in main()
370 rpng2_info.display_exponent = atof(p); in main()
372 rpng2_info.display_exponent = default_display_exponent; in main()
387 rpng2_info.display_exponent = atof(*argv); in main()
388 if (rpng2_info.display_exponent <= 0.0) in main()
503 } else if ((rc = readpng2_init(&rpng2_info)) != 0) { in main()
522 readpng2_cleanup(&rpng2_info); in main()
555 rpng2_info.bg_red = (uch)r; in main()
556 rpng2_info.bg_green = (uch)g; in main()
557 rpng2_info.bg_blue = (uch)b; in main()
559 rpng2_info.need_bgcolor = TRUE; in main()
561 rpng2_info.state = kPreInit; in main()
562 rpng2_info.mainprog_init = rpng2_x_init; in main()
563 rpng2_info.mainprog_display_row = rpng2_x_display_row; in main()
564 rpng2_info.mainprog_finish_display = rpng2_x_finish_display; in main()
578 if (readpng2_decode_data(&rpng2_info, inbuf, incount)) in main()
582 if (error || incount != INBUFSIZE || rpng2_info.state == kDone) { in main()
583 if (rpng2_info.state == kDone) { in main()
610 readpng2_cleanup(&rpng2_info); in main()
708 rpng2_x_redisplay_image (0, 0, rpng2_info.width, rpng2_info.height); in main()
717 if (rpng2_info.state >= kWindowInit) { in main()
752 ulg rowbytes = rpng2_info.rowbytes; in rpng2_x_init()
755 Trace((stderr, " rowbytes = %d\n", rpng2_info.rowbytes)) in rpng2_x_init()
756 Trace((stderr, " width = %ld\n", rpng2_info.width)) in rpng2_x_init()
757 Trace((stderr, " height = %ld\n", rpng2_info.height)) in rpng2_x_init()
759 rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); in rpng2_x_init()
760 if (!rpng2_info.image_data) { in rpng2_x_init()
761 readpng2_cleanup(&rpng2_info); in rpng2_x_init()
765 rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); in rpng2_x_init()
766 if (!rpng2_info.row_pointers) { in rpng2_x_init()
767 free(rpng2_info.image_data); in rpng2_x_init()
768 rpng2_info.image_data = NULL; in rpng2_x_init()
769 readpng2_cleanup(&rpng2_info); in rpng2_x_init()
773 for (i = 0; i < rpng2_info.height; ++i) in rpng2_x_init()
774 rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; in rpng2_x_init()
789 readpng2_cleanup(&rpng2_info); in rpng2_x_init()
794 rpng2_info.state = kWindowInit; in rpng2_x_init()
803 ulg bg_red = rpng2_info.bg_red; in rpng2_x_create_window()
804 ulg bg_green = rpng2_info.bg_green; in rpng2_x_create_window()
805 ulg bg_blue = rpng2_info.bg_blue; in rpng2_x_create_window()
909 window = XCreateWindow(display, root, 0, 0, rpng2_info.width, in rpng2_x_create_window()
910 rpng2_info.height, 0, depth, InputOutput, visual, attrmask, &attr); in rpng2_x_create_window()
931 size_hints->min_width = size_hints->max_width = (int)rpng2_info.width; in rpng2_x_create_window()
933 (int)rpng2_info.height; in rpng2_x_create_window()
973 xdata = (uch *)malloc(4*rpng2_info.width*rpng2_info.height); in rpng2_x_create_window()
976 xdata = (uch *)malloc(2*rpng2_info.width*rpng2_info.height); in rpng2_x_create_window()
979 xdata = (uch *)malloc(rpng2_info.width*rpng2_info.height); in rpng2_x_create_window()
989 (char *)xdata, rpng2_info.width, rpng2_info.height, pad, 0); in rpng2_x_create_window()
1030 XFillRectangle(display, window, gc, 0, 0, rpng2_info.width, in rpng2_x_create_window()
1031 rpng2_info.height); in rpng2_x_create_window()
1072 bg_rowbytes = 3 * rpng2_info.width; in rpng2_x_load_bg_image()
1073 bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); in rpng2_x_load_bg_image()
1103 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_load_bg_image()
1122 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_x_load_bg_image()
1170 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_load_bg_image()
1175 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_x_load_bg_image()
1203 hh = (int)(rpng2_info.height / 2); in rpng2_x_load_bg_image()
1204 hw = (int)(rpng2_info.width / 2); in rpng2_x_load_bg_image()
1222 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_load_bg_image()
1225 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_x_load_bg_image()
1277 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_load_bg_image()
1281 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_load_bg_image()
1295 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_load_bg_image()
1315 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_load_bg_image()
1318 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_load_bg_image()
1337 XPutImage(display, window, gc, ximage, 0, 0, 0, 0, rpng2_info.width, in rpng2_x_load_bg_image()
1338 rpng2_info.height); in rpng2_x_load_bg_image()
1350 uch bg_red = rpng2_info.bg_red; in rpng2_x_display_row()
1351 uch bg_green = rpng2_info.bg_green; in rpng2_x_display_row()
1352 uch bg_blue = rpng2_info.bg_blue; in rpng2_x_display_row()
1369 if (rpng2_info.pass != prevpass) { in rpng2_x_display_row()
1370 if (pause_after_pass && rpng2_info.pass > 0) { in rpng2_x_display_row()
1381 fprintf(stderr, "%s: pass %d of 7\r", PROGNAME, rpng2_info.pass + 1); in rpng2_x_display_row()
1383 prevpass = rpng2_info.pass; in rpng2_x_display_row()
1402 src = rpng2_info.image_data + row*rpng2_info.rowbytes; in rpng2_x_display_row()
1406 if (rpng2_info.channels == 3) { in rpng2_x_display_row()
1407 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_display_row()
1429 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_display_row()
1477 src = rpng2_info.row_pointers[row]; in rpng2_x_display_row()
1481 if (rpng2_info.channels == 3) { in rpng2_x_display_row()
1482 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_display_row()
1497 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_display_row()
1550 if (demo_timing && (row - firstrow >= 16 || row >= rpng2_info.height-2)) { in rpng2_x_display_row()
1552 (int)firstrow, rpng2_info.width, row - firstrow + 1); in rpng2_x_display_row()
1557 if (!demo_timing && ((rows & 0xf) == 0 || row >= rpng2_info.height-2)) { in rpng2_x_display_row()
1559 (int)firstrow, rpng2_info.width, row - firstrow + 1); in rpng2_x_display_row()
1578 rpng2_info.state = kDone; in rpng2_x_finish_display()
1591 uch bg_red = rpng2_info.bg_red; in rpng2_x_redisplay_image()
1592 uch bg_green = rpng2_info.bg_green; in rpng2_x_redisplay_image()
1593 uch bg_blue = rpng2_info.bg_blue; in rpng2_x_redisplay_image()
1603 rpng2_info.channels)) in rpng2_x_redisplay_image()
1605 rpng2_info.width, rpng2_info.rowbytes, ximage_rowbytes)) in rpng2_x_redisplay_image()
1623 src = rpng2_info.image_data + row*rpng2_info.rowbytes; in rpng2_x_redisplay_image()
1627 if (rpng2_info.channels == 3) { in rpng2_x_redisplay_image()
1628 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_redisplay_image()
1672 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_redisplay_image()
1740 (int)lastrow, rpng2_info.width, 16); in rpng2_x_redisplay_image()
1750 src = rpng2_info.row_pointers[row]; in rpng2_x_redisplay_image()
1754 if (rpng2_info.channels == 3) { in rpng2_x_redisplay_image()
1755 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_redisplay_image()
1770 for (i = rpng2_info.width; i > 0; --i) { in rpng2_x_redisplay_image()
1810 (int)lastrow, rpng2_info.width, 16); in rpng2_x_redisplay_image()
1825 (int)lastrow, rpng2_info.width, rpng2_info.height-lastrow); in rpng2_x_redisplay_image()
1872 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_reload_bg_image()
1891 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_x_reload_bg_image()
1939 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_reload_bg_image()
1944 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_x_reload_bg_image()
1968 hh = (int)(rpng2_info.height / 2); in rpng2_x_reload_bg_image()
1969 hw = (int)(rpng2_info.width / 2); in rpng2_x_reload_bg_image()
1987 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_x_reload_bg_image()
1990 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_x_reload_bg_image()
2061 if (rpng2_info.image_data) { in rpng2_x_cleanup()
2062 free(rpng2_info.image_data); in rpng2_x_cleanup()
2063 rpng2_info.image_data = NULL; in rpng2_x_cleanup()
2066 if (rpng2_info.row_pointers) { in rpng2_x_cleanup()
2067 free(rpng2_info.row_pointers); in rpng2_x_cleanup()
2068 rpng2_info.row_pointers = NULL; in rpng2_x_cleanup()