rockbox/apps/plugins/imageviewer
Solomon Peachy eb03c7b4d0 build: Newer toolchains need a few tweaks to linker options.
Pull those fixes in now

Change-Id: I71c373ecc9d062ca997eb940c7d84a94e2d678aa
2025-09-07 15:40:44 -04:00
..
bmp View Album Art from WPS context menu 2024-10-28 12:46:51 -04:00
gif View Album Art from WPS context menu 2024-10-28 12:46:51 -04:00
jpeg jpeg: Silence -Wshift-negative-value warnings 2025-04-22 09:43:40 -04:00
jpegp jpeg: Silence -Wshift-negative-value warnings 2025-04-22 09:43:40 -04:00
png View Album Art from WPS context menu 2024-10-28 12:46:51 -04:00
ppm View Album Art from WPS context menu 2024-10-28 12:46:51 -04:00
image_decoder.c imageviewer: Initial support for JPEG progressive images. Add decoder 2024-10-14 09:19:34 -04:00
image_decoder.h imageviewer: Initial support for JPEG progressive images. Add decoder 2024-10-14 09:19:34 -04:00
imageviewer.c misc: Fix a small pile of warnings found with diagnostics turned way up 2025-09-06 21:31:58 -04:00
imageviewer.h View Album Art from WPS context menu 2024-10-28 12:46:51 -04:00
imageviewer.make build: Newer toolchains need a few tweaks to linker options. 2025-09-07 15:40:44 -04:00
imageviewer_button.h New port: Anbernic RG Nano 2025-07-29 21:01:53 -04: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
SUBDIRS imageviewer: Initial support for JPEG progressive images. Add decoder 2024-10-14 09:19:34 -04: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.