inc/flexUtils.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2007 - Nastasi Christian
00003 This program is free software; you can redistribute it and/or
00004 modify it under the terms of the GNU General Public License
00005 as published by the Free Software Foundation; either version 2
00006 of the License, or (at your option) any later version.
00007 
00008 This program is distributed in the hope that it will be useful,
00009 but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 GNU General Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License
00014 along with this program; if not, write to the Free Software
00015 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00016 */
00017 
00018 #ifndef _flexUtils_h_
00019 #define _flexUtils_h_
00020 
00021 #include <stdio.h>
00022 #include <jpeglib.h>
00023 
00024 typedef struct
00025 {
00026         struct jpeg_source_mgr pub;   
00027         unsigned char* buffer;
00028         unsigned int   bufsize;
00029 } myJPEG_source_mgr;
00030 
00031 typedef myJPEG_source_mgr* myJPEG_src_ptr;
00032 
00053 bool flex_JPEG_decompress(unsigned char* srcBuffer, int size, unsigned char* dstBuffer, int& width, int& height, int& bpp);
00054 
00063 void flex_rgb16_to_rgb24(unsigned char *src, unsigned char *dest, unsigned int width, unsigned int height);
00072 void flex_rgb12_to_rgb24(unsigned char *src, unsigned char *dest, unsigned int width, unsigned int height);
00081 void flex_gray4_to_gray8(unsigned char *src, unsigned char *dest, unsigned int width, unsigned int height);
00090 void flex_gray2_to_gray8(unsigned char *src, unsigned char *dest, unsigned int width, unsigned int height);
00091 
00092 #endif

Generated on Wed Apr 23 00:11:08 2008 for Flex CAM Serial by  doxygen 1.5.4