FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
164
Copyright © Bridgetek Limited
5.20
CMD_LOADIMAGE - load a JPEG image
Decompress the following JPEG image data into an FT800 bitmap, in main memory. The
image data should be a regular baseline JPEG (JFIF) image.
C prototype
void cmd_loadimage( uint32_t ptr,
uint32_t options );
Parameters
ptr
Destination address
options
By default, option OPT_RGB565 means the loaded bitmap is in RGB565
format. Option OPT_MONO means the loaded bitmap to be monochrome, in L8
format. The command appends display list commands to set the source,
layout and size of the resulting image. Option OPT_NODL prevents this -
nothing is written to the display list. OPT_NODL can be OR'ed with OPT_MONO
or OPT_RGB565.
Description
The data byte should immediately follow in the command buffer. If the number of bytes
is not a multiple of 4, then 1, 2 or 3 bytes should be appended to ensure 4-byte
alignment of the next command. These padding bytes can have any value.
The application on the host processor has to parse the JPEG header to get the properties
of the JPEG image and decide to decode. Behavior is unpredictable in cases of non
baseline jpeg images or the output data generated is more than the RAM_G size.
Command layout
+0
CMD_LOADIMAGE(0xffffff24)
+4
Ptr
+8
Options
+12
Byte0
+13
Byte1
..
..
+n
..