PageRenderTime 16ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/bmp_test.c

http://ftk.googlecode.com/
C | 24 lines | 19 code | 5 blank | 0 comment | 2 complexity | af217da081ea5a66bcdc8678c0c0c508 MD5 | raw file
 1#include "ftk.h"
 2#include "ftk_image_bmp_decoder.h"
 3
 4int main(int argc, char* argv[])
 5{
 6	FtkBitmap* bitmap = NULL;
 7	FtkImageDecoder* decoder = NULL;
 8	
 9	ftk_init(argc, argv);
10
11	ftk_bitmap_autotest();
12	decoder = ftk_image_bmp_decoder_create();
13	bitmap = ftk_image_decoder_decode(decoder, argv[1]);
14	
15	if(bitmap != NULL)
16	{
17		printf("%s: width=%d height=%d\n", argv[1], 
18			ftk_bitmap_width(bitmap), ftk_bitmap_height(bitmap));
19		ftk_bitmap_unref(bitmap);
20	}
21	ftk_image_decoder_destroy(decoder);
22
23	return 0;
24}