TerraLib 4.1
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/libjpeg/TeLibJpegWrapper.h
Go to the documentation of this file.
00001 /************************************************************************************
00002 TerraLib - a library for developing GIS applications.
00003 Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
00004 
00005 This code is part of the TerraLib library.
00006 This library is free software; you can redistribute it and/or
00007 modify it under the terms of the GNU Lesser General Public
00008 License as published by the Free Software Foundation; either
00009 version 2.1 of the License, or (at your option) any later version.
00010 
00011 You should have received a copy of the GNU Lesser General Public
00012 License along with this library.
00013 
00014 The authors reassure the license terms regarding the warranties.
00015 They specifically disclaim any warranties, including, but not limited to,
00016 the implied warranties of merchantability and fitness for a particular purpose.
00017 The library provided hereunder is on an "as is" basis, and the authors have no
00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
00020 indirect, special, incidental, or consequential damages arising out of the use
00021 of this library and its documentation.
00022 *************************************************************************************/
00027 #ifndef  __TERRALIB_DRIVER_LIBJPEG_WRAPPER_H
00028 #define  __TERRALIB_DRIVER_LIBJPEG_WRAPPER_H
00029 
00030 #include "../../kernel/TeDefines.h"
00031 #include <string>
00035 namespace Jpeg
00036 {
00044            TL_DLL bool ReadFileParams(const std::string& fileName, int& width, int& height, int& nChannels);
00045 
00046 // --------------  Handles the compression and uncompression to/from files.
00047 
00057            TL_DLL bool DecompressFile(const std::string& fileName, unsigned char* dstBuffer, int& width, int& height, int& nChannels);
00058 
00068            TL_DLL bool CompressToFile(unsigned char* buffer, int width, int height, int bpp, const std::string& fileName, int quality=75);
00069 
00080            TL_DLL bool DecompressBuffer(unsigned char* srcBuffer, int size, unsigned char* dstBuffer, int& width, int& height, int& bpp); 
00081 
00094            TL_DLL bool CompressToBuffer(unsigned char* srcBuffer, int width, int height, int bpp, unsigned char* dstBuffer, int& len, int quality=75); 
00095 }
00096 #endif
00097 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines