rockbox/apps/plugins/imageviewer
Thomas Martitz 6d19275876 Hosted: Output map files after linking.
Change-Id: I5ac64d781aaa1aa2b3157589f8e689c0d946a39f
2012-01-21 18:39:19 +01:00
..
bmp FS#6321: Universal Image Viewer 2010-11-21 13:47:56 +00:00
jpeg Fix warnings from r31453 2011-12-28 11:47:35 +00:00
png plugins: another round of making local things static and adding missing #includes 2011-12-28 11:32:13 +00:00
ppm image viewer: ppm: 2011-01-19 12:51:57 +00:00
image_decoder.c revert personal change accidentally included in r29110 2011-01-22 16:19:20 +00:00
image_decoder.h FS#11819: image viewer: use magick number in file to determine image type. 2011-01-22 13:41:53 +00:00
imageviewer.c GSoC/Buflib: Enable compaction in buflib. 2011-08-30 14:01:45 +00:00
imageviewer.h image viewer: 2011-01-17 13:47:57 +00:00
imageviewer.make Hosted: Output map files after linking. 2012-01-21 18:39:19 +01:00
imageviewer_button.h Initial commit of the Samsung YP-R0 port. 2011-12-24 11:56:46 +00:00
readme.txt image viewer: add quick guide describing how to add image decoder. also improve comments. 2011-01-16 12:45:11 +00:00
SOURCES FS#6321: Universal Image Viewer 2010-11-21 13:47:56 +00:00
SUBDIRS Rework ppmviewer to fit our shiny new imageviewer framework. FS#11818 by me. 2011-01-09 13:22:54 +00:00

this document describes how to add new image decoder.

1. create a directory which name is your image decoder's name and put source files
 under the directory.
'const struct image_decoder image_decoder' and 'IMGDEC_HEADER' must be declared in
 one of your source files.
see imageviewer.h for the detail of struct image_decoder.

2. add the directory name to apps/plugins/imageviewer/SUBDIR so that the decoder
 is built.
if the decoder is supported by particular targets, surround it with #if directive.
e.g. if the decoder supports color LCD targets only,
#ifdef HAVE_LCD_COLOR
bmp
#endif

3. append appropriate entry to enum image_type in image_decoder.h, decoder_names
 and ext_list in image_decoder.c so that the imageviewer plugin can recognize
 the decoder.
if the decoder is supported by particular targets, surround them with same #if
 directive in SUBDIR.

4. add entry to apps/plugins/viewers.config
 (in format: file_extension,viewer/imageviewer) so that the file with specified 
 file extension will be opened by image viewer plugin.
if the decoder is supported by particular targets, surround it with same #if
 directive in SUBDIR.

5. add entry to apps/plugins/CATEGORIES (in format: decoder_name,viewer) so
 that the build file is copied to viewers directory.
DON'T surround this with #if directive.


notes:
if you need to use greylib functions to draw image, add the functions to
 struct imgdec_api just like gray_bitmap_part because GREY_INFO_STRUCT is
 declared in imageviewer and is not available from the decoder.