Blame view

image/image.h 689 Bytes
d32a1854   David Mayerich   added framework f...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  #ifndef STIM_IMAGE_H
  #define STIM_IMAGE_H
  
  #include <iostream>
  //This static class provides the STIM interface for loading images
  //	Use this interface for all image management - that way the actual library can be changed without problems
  
  //currently this interface uses CImg
  //	T = data type (usually unsigned char)
  template <class T>
  class image{
  
  	CImg<T> data;
  
  public:
  
  	//Load an image from a file
  	void load(std::string filename){
  		data.load(filename.c_str());
  	}
  
  	//save a file
  	void save(std::string filename){
  		data.save(filename.c_str());
  	}
  
  	//create an image from an interlaced buffer
  	void create_interlaced(T* buffer, unsigned int channels = 1){
  
  
  	}
  
  	
  
  
  
  };
  
  
  #endif