Advertisement
Guest User

Untitled

a guest
Aug 31st, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <math.h>
  2. #include <string.h>
  3.  
  4.  int read_image(char* file_name, char** image_data, int* width, int* height) {
  5.     FILE* fp = fopen(file_name, "rb");
  6.    
  7.     int width, height, max, type;
  8.     file_header = fscanf("P%d %d %d %d\n",&type,&width,&height,&max);
  9.  
  10.     image_data = malloc()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement