Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ctype.h>
- #include <stdio.h>
- #define BUFSIZE 1024
- int main() {
- char mybuf[BUFSIZE] = { 0 };
- FILE* ifd;
- FILE* ofd;
- ifd = fopen("test.png","rb");
- ofd = fopen("out.png","wb");
- while ( ( fread( mybuf, sizeof(char), BUFSIZE ,ifd) ) > 0 ) {
- fwrite(mybuf, sizeof(char),BUFSIZE,ofd);
- }
- fclose(ifd);
- fclose(ofd);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement