Andrew Mahone | 60d4209 | 2009-05-01 23:24:23 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * JPEG image viewer |
| 11 | * (This is a real mess if it has to be coded in one single C file) |
| 12 | * |
| 13 | * File scrolling addition (C) 2005 Alexander Spyridakis |
| 14 | * Copyright (C) 2004 Jörg Hohensohn aka [IDC]Dragon |
| 15 | * Heavily borrowed from the IJG implementation (C) Thomas G. Lane |
| 16 | * Small & fast downscaling IDCT (C) 2002 by Guido Vollbeding JPEGclub.org |
| 17 | * |
| 18 | * This program is free software; you can redistribute it and/or |
| 19 | * modify it under the terms of the GNU General Public License |
| 20 | * as published by the Free Software Foundation; either version 2 |
| 21 | * of the License, or (at your option) any later version. |
| 22 | * |
| 23 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 24 | * KIND, either express or implied. |
| 25 | * |
| 26 | ****************************************************************************/ |
| 27 | |
| 28 | #include "resize.h" |
| 29 | #include "bmp.h" |
| 30 | #include "jpeg_common.h" |
| 31 | |
| 32 | #ifndef _JPEG_LOAD_H |
| 33 | #define _JPEG_LOAD_H |
| 34 | |
| 35 | int read_jpeg_file(const char* filename, |
| 36 | struct bitmap *bm, |
| 37 | int maxsize, |
| 38 | int format, |
| 39 | const struct custom_format *cformat); |
| 40 | |
| 41 | int read_jpeg_fd(int fd, |
| 42 | struct bitmap *bm, |
| 43 | int maxsize, |
| 44 | int format, |
| 45 | const struct custom_format *cformat); |
| 46 | |
Thomas Martitz | f577a6a | 2011-02-09 20:13:13 +0000 | [diff] [blame] | 47 | /** |
| 48 | * read embedded jpeg files as above. Needs an offset and length into |
| 49 | * the file |
| 50 | **/ |
| 51 | int clip_jpeg_file(const char* filename, |
| 52 | int offset, |
| 53 | unsigned long jpeg_size, |
| 54 | struct bitmap *bm, |
| 55 | int maxsize, |
| 56 | int format, |
| 57 | const struct custom_format *cformat); |
| 58 | |
| 59 | /** |
| 60 | * read embedded jpeg files as above. Needs an open file descripter, and |
| 61 | * assumes the caller has lseek()'d to the start of the jpeg blob |
| 62 | **/ |
| 63 | int clip_jpeg_fd(int fd, |
| 64 | unsigned long jpeg_size, |
| 65 | struct bitmap *bm, |
| 66 | int maxsize, |
| 67 | int format, |
| 68 | const struct custom_format *cformat); |
| 69 | |
Andrew Mahone | 60d4209 | 2009-05-01 23:24:23 +0000 | [diff] [blame] | 70 | #endif /* _JPEG_JPEG_DECODER_H */ |