-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBackgroundRemovedImageLoader.cpp
More file actions
45 lines (36 loc) · 1.26 KB
/
BackgroundRemovedImageLoader.cpp
File metadata and controls
45 lines (36 loc) · 1.26 KB
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
41
42
43
44
/*
* File: BackgroundRemovedImageLoader.cpp
* Author: Marc Gershow
*
* Created on November 5, 2010, 3:56 PM
*
* (C) Marc Gershow; licensed under the Creative Commons Attribution Share Alike 3.0 United States License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/us/ or send a letter to
* Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
*
*/
#include "BackgroundRemovedImageLoader.h"
#include <iostream>
#include "BackgroundRemovedImage.h"
using namespace std;
BackgroundRemovedImage *BackgroundRemovedImageLoader::fromFile(std::ifstream& is, const IplImage *bak) {
uint32_t id;
ifstream::pos_type cloc = is.tellg();
is.read((char *) &id, sizeof(id));
is.seekg(cloc);
switch(id) {
case BackgroundRemovedImage::IdCode:
return BackgroundRemovedImage::fromDisk(is, bak);
break;
default:
return BackgroundRemovedImage::fromDisk(is, bak);
break;
}
return NULL;
}
BackgroundRemovedImageLoader::BackgroundRemovedImageLoader() {
}
BackgroundRemovedImageLoader::BackgroundRemovedImageLoader(const BackgroundRemovedImageLoader& orig) {
}
BackgroundRemovedImageLoader::~BackgroundRemovedImageLoader() {
}