Rearange menu of mpegplayer. Add new menu with "settings" and "quit", and remove...
[kugel-rb.git] / apps / plugins / lib / read_image.c
blobedc4bfb981170b267e3c75a60cff845312223642
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2009 by Andrew Mahone
12 * This is a wrapper for the core jpeg_load.c
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
22 ****************************************************************************/
24 #include <plugin.h>
25 #include "feature_wrappers.h"
26 #include "read_image.h"
28 int read_image_file(const char* filename, struct bitmap *bm, int maxsize,
29 int format, const struct custom_format *cformat)
31 int namelen = rb->strlen(filename);
32 if (rb->strcmp(filename + namelen - 4, ".bmp"))
33 return read_jpeg_file(filename, bm, maxsize, format, cformat);
34 else
35 return scaled_read_bmp_file(filename, bm, maxsize, format, cformat);