Advertisement
Kojima0502

albumcreated

Sep 28th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int i,j;
  4. unsigned chardn;
  5. FILE *fpi;
  6. unsigned char  *file;
  7. width=atoi(argv[2]);
  8. height=atoi(argv[3])
  9. file=(unsigned char *)malloc(width*height*sizeof(char));
  10. if((fpi=fopen(argv[1],"rb"))==NULL)
  11. {
  12.         fprintf(stderr,"input file open error"\n");
  13.        exit(1);
  14.                }
  15.                fread((undigned char *)filel,sizeof(char),width*height,fpi);
  16.                for (i=0;i<height,i++)
  17.                {
  18.                    for(j=0,j<width;j++)
  19.                    {
  20.                        dn=file[i*width+j];
  21.                    }
  22.                }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement