rockbox/apps/plugins/imageviewer
Aidan MacDonald d40a598970 plugins: Simplify plugin/codec API versioning
Replace the minimum version bound with a check on the size of
the API struct. The version only needs to be incremented for
ABI breaking changes. Additions to the API won't need to touch
the version number, resulting in fewer merge conflicts.

Change-Id: I916a04a7bf5890dcf5d615ce30087643165f8e1f
2023-03-21 16:23:54 -04:00
..
bmp
gif ImageViewer: Fix FS#13329 (GIF File handle/memory leaks) 2022-01-09 14:36:14 +00:00
jpeg Define LCD_STRIDEFORMAT unconditionally 2022-09-30 10:42:49 +01:00
png Limit more variables to file scope 2015-01-11 21:40:51 +01:00
ppm Define LCD_STRIDEFORMAT unconditionally 2022-09-30 10:42:49 +01:00
image_decoder.c plugins: Simplify plugin/codec API versioning 2023-03-21 16:23:54 -04:00
image_decoder.h
imageviewer.c plugins: Improve usability of iPod keymaps 2022-12-29 04:39:22 +01:00
imageviewer.h plugins: Simplify plugin/codec API versioning 2023-03-21 16:23:54 -04:00
imageviewer.make
imageviewer_button.h plugins: Improve usability of iPod keymaps 2022-12-29 04:39:22 +01:00
readme.txt
SOURCES
SUBDIRS

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.