亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? grp4comp.c

?? NIST Handwriting OCR Testbed
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*# proc: grp4comp - CCITT Group 4 compresses an image.# proc:*//*********************************************************************   File Name:  grp4comp.c					    **   Modified:   Darlene E. Frederick				    **               Michael D. Garris                                   **   Date:	January 25, 1990				    **   Package:    CCITT4 compression routines			    **                                                                   **   Modified 12/90 by Stan Janet                                    **		flush_buffer() was adding an extra byte to data     **		whether it was already byte-aligned or not          **   Modified 12/94 by Patrick Grother                               **               Reclared the all variables of type "short" to be    **               "int", using a macro SHORT defined in the include   **               file grp4comp.h.                                    **               On images with more than 2^15 rows the              **               result was garbage because of an overflowed line    **               counter. The new declaration has a limit of 2^31    **				   				    **   Contents:   ccitt4_compress()				    **		read_uncompressed_file_into_memory()		    **		control_compression()				    **		prepare_to_compress()				    **		compress_image()				    **		make_array_of_changing_elements()		    **		set_up_first_and_last_changing_elements_c()	    **		prepare_to_compress_next_line()			    **		set_up_first_line()				    **		crash_c()				  	    **								    *	********************************************************************/#ifdef TIME#include <sys/time.h>#endif#include <memory.h>#include <grp4comp.h>/* Added by MDG in order have option of passing alloc responsibilities to caller */#define NOALLOC 0#define ALLOC	1int comp_alloc_flag = ALLOC;int comp_write_init_flag;#ifdef TIME  struct timeval  t1, t2;  struct timezone tz;#endif/************************************************************************   grp4comp is the main routine of this file.  It does pre-           **   liminary setup, calls routines, and does final processing.         *************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **		   indata - buffer containing the uncompressed data.   **		   inbytes - the number of bytes in indata.            **  		   width - Width in pixels of scan line in indata.     **  		   height - Number of lines in indata.                 **	Returned:          					       **		   outdata - buffer containing the compressed data.    **		   outbytes - the number of bytes in outdata.          *************************************************************************/grp4comp(indata,inbytes,width,height,outdata,outbytes)unsigned char *indata, *outdata;int inbytes, width, height, *outbytes;{   struct uncompressed_descriptor uncompressed;   struct compressed_descriptor compressed;       	uncompressed.pixels_per_line = width;       	uncompressed.number_of_lines = height;        uncompressed.data = indata;        comp_alloc_flag = NOALLOC;        comp_write_init_flag = True;	read_uncompressed_file_into_memory( &uncompressed);        compressed.data = outdata;	control_compression( &uncompressed, &compressed );        *outbytes = compressed.length_in_bytes;/*	printf("\ncompressed:lines: %d, pixels:%d, length:%d\n",	 compressed.number_of_lines, compressed.pixels_per_line, 	 compressed.length_in_bytes); */}/***************************** control_compression **************************			calls the functions that compress the image			*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   compressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 *************************************************************************/void control_compression( uncompressed, compressed )struct uncompressed_descriptor *uncompressed;struct compressed_descriptor *compressed;{struct parameters 				 sole_parameters;struct parameters 				*params = &sole_parameters;#ifdef TIME  SHORT i;            tz.tz_minuteswest = 0;            tz.tz_dsttime     = 0;            gettimeofday(&t1, &tz); #endif        	prepare_to_compress( uncompressed, compressed, params );	compress_image( uncompressed, compressed, params );        /* memory deallocation added by Michael D. Garris 2/26/90 */        free(params->reference_line);        free(params->coding_line);#ifdef TIME           gettimeofday(&t2, &tz);            printf("\ntime difference: %ld:%ld\n", t2.tv_sec - t1.tv_sec,           t2.tv_usec - t1.tv_usec);           for(i=0; i<5; i++) printf("%c",'\07');*/#endif}/************************ read_uncompressed_file_into_memory *******************			allocates memory for the uncompressed image.					*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 *************************************************************************/void read_uncompressed_file_into_memory( uncompressed )struct uncompressed_descriptor *uncompressed;{int file_size;     if(comp_alloc_flag){	file_size = uncompressed->pixels_per_line * uncompressed->number_of_lines	 / Pixels_per_byte;	 	if((uncompressed->data = (char *)calloc( file_size, sizeof(char) )) == NULL) { 	    printf("\nCannot allocate enough memory for uncomp file.\n"); 	    crash_c(); 	}     }     else        if(uncompressed->data == NULL){           printf("\nNo memory allocated for input data!\n");           crash_c();        }} /* end read_uncompressed_file_into_memory() *//*************************** prepare_to_compress ****************************			initializes variables in preperation for compression					*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   compressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 **		   params - structure storing information needed for   **		   	    comparison and other tasks.		       *************************************************************************/void prepare_to_compress( uncompressed, compressed, params )struct uncompressed_descriptor  *uncompressed;struct compressed_descriptor 	*compressed;struct parameters 				*params;{	        		params->max_pixel   	    = uncompressed->pixels_per_line;	compressed->pixels_per_line = uncompressed->pixels_per_line;	compressed->number_of_lines = uncompressed->number_of_lines;		set_up_first_line_c( params ); 	prepare_to_write_bits_c( compressed );		 } /* end prepare_to_compress() *//****************************** compress_image *******************************					compresses the image						*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   compressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void compress_image( uncompressed, compressed, params )struct uncompressed_descriptor 	*uncompressed;struct compressed_descriptor 	*compressed;struct parameters *params;{SHORT  line;	for(line = 0; line < uncompressed->number_of_lines; line++) {			     make_array_of_changing_elements( params, uncompressed, line );	     set_up_first_and_last_changing_elements_c( params );	     compress_line( params );	     prepare_to_compress_next_line( params );	} /* end for each line loop */		write_bits_c("000000000001000000000001");	compressed->length_in_bytes = flush_buffer();}/************************ make_array_of_changing_elements *********************		stores in a list pointed to by "params->coding_line" the pixel numbers	of all the changing elements in the coding line	 						*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **		   line_number -  the number of the line in the image  **	Returned:          					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void make_array_of_changing_elements( params, uncompressed, line_number )struct parameters *params;struct uncompressed_descriptor 	*uncompressed;SHORT line_number;{SHORT 	bytes_per_line;int	line_offset;SHORT 	byte_offset;	bytes_per_line = params->max_pixel / Pixels_per_byte;	line_offset = bytes_per_line * line_number;	for(byte_offset=0; byte_offset < bytes_per_line; byte_offset++) {	    process_char(*(uncompressed->data+line_offset+byte_offset),params);	} 	}	/* end make_array_of_changing_elements() *//******************* set_up_first_and_last_changing_elements_c *****************		initializes the first and last changing elements in the coding line						******************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       **	Returned:          					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void set_up_first_and_last_changing_elements_c(params)struct parameters *params;{	*(params->coding_line) = Invalid;	*(params->coding_line + ++params->index) = params->max_pixel;	*(params->coding_line + ++params->index) = params->max_pixel;	*(params->coding_line + ++params->index) = params->max_pixel;		/* the previous lines may be necessary if when searching for b1, you	skip some elements because you know that they are the wrong color */}/************************ prepare_to_compress_next_line ***********************		initializes variables in preperation for compressing another line				******************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       **	Returned:          					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void prepare_to_compress_next_line(params)struct parameters *params;{SHORT *temp;	/* swap the reference and unchanged coding lines */		temp = params->reference_line;	params->reference_line = params->coding_line;	params->coding_line = temp;		params->pixel = 0;	params->index = 0;	params->previous_color = White;	} /* end prepare_to_read_next_line() */	/******************************* set_up_first_line_c ***************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲va国产天堂va久久en| 欧美午夜电影网| 亚洲第一狼人社区| 日韩丝袜情趣美女图片| 97久久超碰国产精品| 日韩高清在线一区| 亚洲欧美激情小说另类| 久久久久久久综合日本| 欧美另类久久久品| 99国产欧美久久久精品| 国产一区在线视频| 午夜欧美2019年伦理| 国产精品第13页| 久久只精品国产| 91精品国产一区二区| 91传媒视频在线播放| 国产69精品久久99不卡| 国产一区二区三区日韩| 丝袜亚洲另类欧美| 一区二区三区精品| 亚洲人成网站色在线观看| 国产日本一区二区| 精品国产乱码久久久久久图片| 欧美日韩一区高清| 欧美亚洲图片小说| 91免费版在线看| 成人av综合在线| 成人免费精品视频| 丁香婷婷深情五月亚洲| 国产精品99久久久久久宅男| 蜜桃91丨九色丨蝌蚪91桃色| 日本美女一区二区三区视频| 日日夜夜免费精品视频| 亚洲第一久久影院| 亚洲丶国产丶欧美一区二区三区| 亚洲精品高清在线| 亚洲精品免费在线| 伊人一区二区三区| 亚洲精品菠萝久久久久久久| 亚洲女爱视频在线| 亚洲精品视频一区二区| 一区二区三区av电影| **网站欧美大片在线观看| 国产精品色哟哟| 国产精品国产馆在线真实露脸 | 久久国产综合精品| 日本欧美久久久久免费播放网| 亚洲国产wwwccc36天堂| 亚洲国产精品综合小说图片区| 一区二区三区日本| 亚洲图片有声小说| jiyouzz国产精品久久| 成人美女在线观看| zzijzzij亚洲日本少妇熟睡| 成人免费看视频| 在线免费观看视频一区| 91精品国产综合久久精品性色| 欧美一区二区三区喷汁尤物| 精品国产乱码久久久久久夜甘婷婷| 久久午夜羞羞影院免费观看| 中文一区二区完整视频在线观看| 亚洲国产精品激情在线观看| 亚洲欧美在线视频观看| 亚洲一区视频在线| 老司机午夜精品99久久| 风间由美一区二区三区在线观看 | 中文字幕日韩一区二区| 亚洲精品日产精品乱码不卡| 午夜精品久久久久久久久久| 老色鬼精品视频在线观看播放| 国产伦理精品不卡| 91尤物视频在线观看| 欧美亚洲综合在线| 日韩精品中文字幕在线一区| 国产精品天美传媒沈樵| 亚洲国产精品久久久久婷婷884| 久久99久久精品| 成a人片亚洲日本久久| 色狠狠桃花综合| 欧美不卡123| 国产精品久久久久久久久免费樱桃| 亚洲伦在线观看| 蜜桃av噜噜一区| 91麻豆免费观看| 日韩欧美专区在线| 中文字幕在线不卡视频| 日韩av午夜在线观看| 福利一区在线观看| 欧美裸体一区二区三区| 久久久国际精品| 日日嗨av一区二区三区四区| 成人国产精品免费| 91精品国产免费| 亚洲色图视频网| 国产呦精品一区二区三区网站| 在线影院国内精品| 日本一区二区视频在线观看| 日本vs亚洲vs韩国一区三区二区| 99久久精品国产导航| 欧美成人精品福利| 亚洲丰满少妇videoshd| eeuss鲁片一区二区三区| 欧美xingq一区二区| 亚洲永久精品国产| 北条麻妃一区二区三区| 精品欧美乱码久久久久久1区2区| 一级做a爱片久久| 大尺度一区二区| 欧美成人午夜电影| 视频一区欧美精品| 91精品福利视频| 国产精品乱子久久久久| 激情综合亚洲精品| 欧美福利一区二区| 一二三四区精品视频| av综合在线播放| 日韩—二三区免费观看av| 91免费国产视频网站| 中文字幕乱码一区二区免费| 韩国欧美一区二区| 日韩免费性生活视频播放| 午夜欧美大尺度福利影院在线看| 欧美综合一区二区| 一区二区三区在线视频观看58| av日韩在线网站| 中文字幕成人在线观看| 国产高清精品网站| 精品国产乱码久久久久久1区2区| 日韩中文字幕一区二区三区| 欧美乱熟臀69xxxxxx| 亚洲成人激情自拍| 在线观看亚洲成人| 亚洲一线二线三线久久久| 在线观看免费一区| 一区二区成人在线视频| 在线这里只有精品| 一区二区高清视频在线观看| 欧美色视频在线| 日产国产欧美视频一区精品| 91精品国产手机| 国内国产精品久久| 中文字幕第一区第二区| www.日韩在线| 伊人一区二区三区| 欧美久久久一区| 麻豆一区二区99久久久久| 欧美精品一区二区三区在线| 国产一区二区视频在线播放| 国产欧美一区二区在线观看| 国产成人精品1024| 中文字幕亚洲不卡| 欧美午夜在线一二页| 日本美女一区二区| 国产视频一区二区在线| av在线不卡网| 一区二区三区四区av| 欧美日韩1234| 国产一区二区三区久久悠悠色av| 欧美高清在线一区二区| 色94色欧美sute亚洲线路一久| 一区二区不卡在线播放| 日韩片之四级片| 不卡影院免费观看| 亚洲综合色网站| 日韩精品中文字幕一区二区三区 | 日本高清无吗v一区| 亚洲bt欧美bt精品| 欧美成人video| 成人激情av网| 亚洲v精品v日韩v欧美v专区| 精品国产亚洲在线| 一本到不卡免费一区二区| 日日骚欧美日韩| 国产精品三级av在线播放| 色嗨嗨av一区二区三区| 美女性感视频久久| 国产精品久久久久久久浪潮网站 | 国产一区久久久| 一区二区三区中文在线| 精品国产一区二区三区av性色| 成人激情免费网站| 全部av―极品视觉盛宴亚洲| 日韩av成人高清| 国产欧美日韩在线观看| 欧美日韩精品欧美日韩精品一 | 成人免费在线观看入口| 欧美剧情电影在线观看完整版免费励志电影 | 成人免费视频播放| 午夜精品视频一区| 日韩理论片网站| 精品剧情在线观看| 欧美丝袜丝交足nylons图片| 粉嫩一区二区三区在线看| 天天影视色香欲综合网老头| 欧美国产亚洲另类动漫| 欧美一区2区视频在线观看| 97精品电影院| 国产福利一区二区三区视频| 亚洲成人你懂的| 国产精品久久久久婷婷二区次|