Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int i,j;
- unsigned chardn;
- FILE *fpi;
- unsigned char *file;
- width=atoi(argv[2]);
- height=atoi(argv[3])
- file=(unsigned char *)malloc(width*height*sizeof(char));
- if((fpi=fopen(argv[1],"rb"))==NULL)
- {
- fprintf(stderr,"input file open error"\n");
- exit(1);
- }
- fread((undigned char *)filel,sizeof(char),width*height,fpi);
- for (i=0;i<height,i++)
- {
- for(j=0,j<width;j++)
- {
- dn=file[i*width+j];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement