Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how to add new image sdecoder.
- 1. create a directory which name is your image decoder name and put source files
- to the directory. e.g. bmp.
- const struct image_decoder image_decoder and IMGDEC_HEADER need to be defined in
- your souce file.
- check imageviewer.h for the detail of struct image_decoder.
- 2. add the directory name to SUBDIR in this directory.
- if your decoder is supported by particular targets, surround it with #if directive.
- e.g. if the decoder supports color LCD targets only,
- #if 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
- 4. add entry to the apps/plugins/viewers.config. e.g. bmp,viewer/imageviewer
- if your decoder is supported by particular targets, surround it with #if directive.
- e.g. if the decoder supports color LCD targets only,
- #if HAVE_LCD_COLOR
- bmp,viewer/imageviewer
- #endif
- notes:
- if you need to use greylib functions to draw image, add the functions to
- struct imgdec_api just like gray_bitmap_part.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement