Alex 'AdUser' Z
10 years ago
3 changed files with 15 additions and 6 deletions
@ -1,15 +1,25 @@
|
||||
#include "common.h" |
||||
#include "database.h" |
||||
#include "bitmap.h" |
||||
#include "sampler.h" |
||||
|
||||
int main(int argc, char **argv) |
||||
{ |
||||
char * const source = "sample.png"; |
||||
imdb_rec_t rec; |
||||
int ret = 0; |
||||
|
||||
if (argc < 2) { |
||||
puts("Usage: sampler-test <file>"); |
||||
exit(EXIT_FAILURE); |
||||
} |
||||
|
||||
memset(&rec, 0x0, sizeof(imdb_rec_t)); |
||||
ret = imdb_sample(&rec, source); |
||||
|
||||
exit(ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE); |
||||
if (imdb_sample(&rec, argv[1]) != 0) { |
||||
puts("sampler failure"); |
||||
exit(EXIT_FAILURE); |
||||
} |
||||
|
||||
bitmap_print(&rec.data[REC_OFF_BM]); |
||||
|
||||
exit(EXIT_SUCCESS); |
||||
} |
||||
|
Loading…
Reference in new issue