⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readimage.c

📁 包含了对于灰度图像的8种jpeg无损压缩的预测方法
💻 C
字号:
#include <stdio.h>void readimage(char filename[], unsigned char **image, int row_size, int col_size)/************************************************************************                                                                      **  File: readimage.c                                                   **  Function:  reads an image (what else :?)                            **  Author  : K. Sayood                                                 **  Last mod: 5/12/95                                                   **  Usage:  see usage()                                                 **                                                                      **                                                                      **  filename[] : character string containing filename                   **  **image    : array of pointers pointing to the rows in an image     **  row_size   : number of rows in the image                            **  col_size   : number of columns in the image.                        **                                                                      ************************************************************************//********************************************************************************NOTICE:                                                                       **This code is believed by the author to be bug free.  You are free to use and  **modify this code with the understanding that any use, either direct or        **derivative, must contain acknowledgement of its author and source.  The author**makes no warranty of any kind, expressed or implied, of merchantability or    **fitness for a particular purpose.  The author shall not be held liable for any**incidental or consequential damages in connection with or arising out of the  **furnishing, performance, or use of this software.  This software is not       **authorized for use in life support devices or systems.                        *********************************************************************************/    {int r, c;     FILE *infile;     infile = fopen(filename,"rb");     if (infile == NULL)	{fprintf(stderr, "Unable to open file %s", filename);	 exit(1);	}     for(r=0; r<row_size; r++)	 fread(image[r],col_size,sizeof(char),infile);              fclose(infile);    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -