* Pictureviewer: Supported image formats

- Added function to determine the supported image formats
- Is required by moviebrowser.cpp (display screenshot)


git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1988 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
micha-bbg
2011-12-23 06:10:00 +00:00
parent 83e0e1bc98
commit 2e473b97d4
2 changed files with 22 additions and 0 deletions

View File

@@ -52,6 +52,26 @@ void CPictureViewer::add_format (int (*picsize) (const char *, int *, int *, int
fh_root = fhn;
}
void CPictureViewer::getSupportedImageFormats(std::vector<std::string>& exts)
{
#ifdef FBV_SUPPORT_PNG
exts.push_back(".png");
#endif
#ifdef FBV_SUPPORT_GIF
exts.push_back(".gif");
#endif
#ifdef FBV_SUPPORT_JPEG
exts.push_back(".jpg");
exts.push_back(".jpeg");
#endif
#ifdef FBV_SUPPORT_BMP
exts.push_back(".bmp");
#endif
#ifdef FBV_SUPPORT_CRW
exts.push_back(".crw");
#endif
}
void CPictureViewer::init_handlers (void)
{
#ifdef FBV_SUPPORT_PNG

View File

@@ -27,6 +27,7 @@
*/
#include <string>
#include <vector>
#include <stdio.h> /* printf */
#include <sys/time.h> /* gettimeofday */
#include "driver/framebuffer.h"
@@ -71,6 +72,7 @@ class CPictureViewer
unsigned char * Resize(unsigned char *orgin, int ox, int oy, int dx, int dy, ScalingMode type, unsigned char * dst = NULL);
unsigned char * ResizeA(unsigned char *orgin, int ox, int oy, int dx, int dy);
void rescaleImageDimensions(int *width, int *height, const int max_width, const int max_height, bool upscale=false);
void getSupportedImageFormats(std::vector<std::string>& erw);
private:
CFormathandler *fh_root;