Lines Matching refs:rpng2_info
186 static mainprog_info rpng2_info; variable
299 memset(&rpng2_info, 0, sizeof(mainprog_info)); in WinMain()
360 rpng2_info.display_exponent = atof(p); in WinMain()
362 rpng2_info.display_exponent = default_display_exponent; in WinMain()
397 rpng2_info.display_exponent = atof(*argv); in WinMain()
398 if (rpng2_info.display_exponent <= 0.0) in WinMain()
496 } else if ((rc = readpng2_init(&rpng2_info)) != 0) { in WinMain()
556 rpng2_info.bg_red = (uch)r; in WinMain()
557 rpng2_info.bg_green = (uch)g; in WinMain()
558 rpng2_info.bg_blue = (uch)b; in WinMain()
560 rpng2_info.need_bgcolor = TRUE; in WinMain()
562 rpng2_info.state = kPreInit; in WinMain()
563 rpng2_info.mainprog_init = rpng2_win_init; in WinMain()
564 rpng2_info.mainprog_display_row = rpng2_win_display_row; in WinMain()
565 rpng2_info.mainprog_finish_display = rpng2_win_finish_display; in WinMain()
579 if (readpng2_decode_data(&rpng2_info, inbuf, incount)) in WinMain()
583 if (error || incount != INBUFSIZE || rpng2_info.state == kDone) { in WinMain()
584 if (rpng2_info.state == kDone) { in WinMain()
611 readpng2_cleanup(&rpng2_info); in WinMain()
646 ulg rowbytes = rpng2_info.rowbytes; in rpng2_win_init()
649 Trace((stderr, " rowbytes = %d\n", rpng2_info.rowbytes)) in rpng2_win_init()
650 Trace((stderr, " width = %ld\n", rpng2_info.width)) in rpng2_win_init()
651 Trace((stderr, " height = %ld\n", rpng2_info.height)) in rpng2_win_init()
653 rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); in rpng2_win_init()
654 if (!rpng2_info.image_data) { in rpng2_win_init()
655 readpng2_cleanup(&rpng2_info); in rpng2_win_init()
659 rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); in rpng2_win_init()
660 if (!rpng2_info.row_pointers) { in rpng2_win_init()
661 free(rpng2_info.image_data); in rpng2_win_init()
662 rpng2_info.image_data = NULL; in rpng2_win_init()
663 readpng2_cleanup(&rpng2_info); in rpng2_win_init()
667 for (i = 0; i < rpng2_info.height; ++i) in rpng2_win_init()
668 rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; in rpng2_win_init()
676 readpng2_cleanup(&rpng2_info); in rpng2_win_init()
680 rpng2_info.state = kWindowInit; in rpng2_win_init()
689 uch bg_red = rpng2_info.bg_red; in rpng2_win_create_window()
690 uch bg_green = rpng2_info.bg_green; in rpng2_win_create_window()
691 uch bg_blue = rpng2_info.bg_blue; in rpng2_win_create_window()
704 wimage_rowbytes = ((3*rpng2_info.width + 3L) >> 2) << 2; in rpng2_win_create_window()
707 wimage_rowbytes*rpng2_info.height))) in rpng2_win_create_window()
722 bmih->biWidth = rpng2_info.width; in rpng2_win_create_window()
723 bmih->biHeight = -((long)rpng2_info.height); in rpng2_win_create_window()
736 memset(wimage_data, 0, wimage_rowbytes*rpng2_info.height); in rpng2_win_create_window()
738 for (j = 0; j < rpng2_info.height; ++j) { in rpng2_win_create_window()
740 for (i = rpng2_info.width; i > 0; --i) { in rpng2_win_create_window()
778 CW_USEDEFAULT, CW_USEDEFAULT, rpng2_info.width+extra_width, in rpng2_win_create_window()
779 rpng2_info.height+extra_height, NULL, NULL, global_hInst, NULL); in rpng2_win_create_window()
796 x = (rpng2_info.width - len*tm.tmAveCharWidth)/2; in rpng2_win_create_window()
797 y = (rpng2_info.height - tm.tmHeight)/2; in rpng2_win_create_window()
808 for (j = 0; j < rpng2_info.height; ++j) { in rpng2_win_create_window()
810 for (i = rpng2_info.width; i > 0; --i) { in rpng2_win_create_window()
820 rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ in rpng2_win_create_window()
821 rect.bottom = (LONG)rpng2_info.height; /* possibly off by one? */ in rpng2_win_create_window()
850 bg_rowbytes = 3 * rpng2_info.width; in rpng2_win_load_bg_image()
851 bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); in rpng2_win_load_bg_image()
878 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_win_load_bg_image()
897 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_win_load_bg_image()
945 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_win_load_bg_image()
950 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_win_load_bg_image()
978 hh = rpng2_info.height / 2; in rpng2_win_load_bg_image()
979 hw = rpng2_info.width / 2; in rpng2_win_load_bg_image()
997 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_win_load_bg_image()
1000 for (i = 0; i < rpng2_info.width; ++i) { in rpng2_win_load_bg_image()
1049 for (row = 0; row < rpng2_info.height; ++row) { in rpng2_win_load_bg_image()
1052 for (i = rpng2_info.width; i > 0; --i) { in rpng2_win_load_bg_image()
1072 uch bg_red = rpng2_info.bg_red; in rpng2_win_display_row()
1073 uch bg_green = rpng2_info.bg_green; in rpng2_win_display_row()
1074 uch bg_blue = rpng2_info.bg_blue; in rpng2_win_display_row()
1100 src = rpng2_info.image_data + row*rpng2_info.rowbytes; in rpng2_win_display_row()
1105 if (rpng2_info.channels == 3) { in rpng2_win_display_row()
1106 for (i = rpng2_info.width; i > 0; --i) { in rpng2_win_display_row()
1115 for (i = rpng2_info.width; i > 0; --i) { in rpng2_win_display_row()
1150 if ((rows & 0xf) == 0 || row == rpng2_info.height-1) { in rpng2_win_display_row()
1155 rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ in rpng2_win_display_row()
1176 rpng2_info.state = kDone; in rpng2_win_finish_display()
1198 if (rpng2_info.image_data) { in rpng2_win_cleanup()
1199 free(rpng2_info.image_data); in rpng2_win_cleanup()
1200 rpng2_info.image_data = NULL; in rpng2_win_cleanup()
1203 if (rpng2_info.row_pointers) { in rpng2_win_cleanup()
1204 free(rpng2_info.row_pointers); in rpng2_win_cleanup()
1205 rpng2_info.row_pointers = NULL; in rpng2_win_cleanup()
1231 rc = StretchDIBits(hdc, 0, 0, rpng2_info.width, rpng2_info.height, in rpng2_win_wndproc()
1232 0, 0, rpng2_info.width, rpng2_info.height, in rpng2_win_wndproc()