mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
* 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:
@@ -52,6 +52,26 @@ void CPictureViewer::add_format (int (*picsize) (const char *, int *, int *, int
|
|||||||
fh_root = fhn;
|
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)
|
void CPictureViewer::init_handlers (void)
|
||||||
{
|
{
|
||||||
#ifdef FBV_SUPPORT_PNG
|
#ifdef FBV_SUPPORT_PNG
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
#include <stdio.h> /* printf */
|
#include <stdio.h> /* printf */
|
||||||
#include <sys/time.h> /* gettimeofday */
|
#include <sys/time.h> /* gettimeofday */
|
||||||
#include "driver/framebuffer.h"
|
#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 * 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);
|
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 rescaleImageDimensions(int *width, int *height, const int max_width, const int max_height, bool upscale=false);
|
||||||
|
void getSupportedImageFormats(std::vector<std::string>& erw);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CFormathandler *fh_root;
|
CFormathandler *fh_root;
|
||||||
|
Reference in New Issue
Block a user