Graphics Conversion Tool

To Be Improved

  • Add support for converting video to the self-developed eZip compressed encoding format

  • Improve image editing and video editing functions

  • Expose more professional parameter interfaces and provide detailed descriptions

  • Optimize the tool UI based on user feedback

Tool Overview

In HMI application development, a large number of image and video assets are used. On the SiFli chip platform, image asset processing involves several aspects:

  • Basic image processing, including format conversion, compression, and resolution conversion

  • Convert images to the chip-specific format (eZip)

  • Program the final assets to platform storage, such as FLASH or an SD card

This tool is designed to bring these processing steps together for easier user development and higher efficiency. The tool mainly implements the following functions:

  • Conversion, size adjustment, and compression for common image formats (PNG/JPEG/WebP/AVIF, etc.)

  • Conversion, basic parameter adjustment, sequence frame extraction, and other functions for common video formats (MP4/AVI/MJPEG, etc.)

  • Convert images in GIF/PNG/APNG and other formats into the SiFli chip-specific formats: eZip (static images) or eZip-A (animations)

  • Provide processing for individual images and videos, as well as batch image and video processing

Tool Download

Click to download GraphicsTool Toolkit

Tool and Platform Solution Requirements

The main purpose of this tool is to facilitate resource conversion for SiFli development platform solutions. The platform solution and the tool have the following combined usage requirements:

  • The chip software system and base resources are stored in NOR FLASH and can run directly after being downloaded with the SiFli download tool.

  • New customer-added resources are stored on the SD card to address NOR FLASH space limitations.

  • The SD card has a directory structure with fixed names, including:

    • ebook: e-book folder

    • music: music MP3 folder

    • dynamic_app: installable dynamic app folder

    • dynamic_wf: installable dynamic watch face folder

    • ota: system firmware upgrade folder, where multiple files can be placed and one selected for upgrade

    • photo: photo folder

    • video: video folder

    • startuplogo: customizable power-on/power-off animation folder

    The tool can create these basic directory structures. After users place resources in the corresponding paths and convert them with the tool, the output files can be copied to the corresponding directories on the SD card for use.

  • The ota upgrade package is automatically generated when compiling system code with the SiFli compilation tool. Place it in the ota folder to use it.

Tool Usage Modes

Important

This tool provides Dedicated Mode and Normal Mode for different users.

  • Dedicated Mode: intended for daily use by downstream customers, who may be non-professional users. Based on the released chip platform, it provides only a limited set of fully optimized and tested configurations, preventing unexpected issues caused by incorrect configuration due to lack of familiarity and reducing subsequent support complexity. In this mode, video files using MP4, MJPEG, eZip, and other compression methods all use the unified xxx.mp4 suffix.

  • Normal Mode: this mode exposes common parameters for image/video processing and provides greater configuration flexibility and more information. Developer mode is mainly used internally by SiFli, and downstream customers familiar with image/video processing may also use it as appropriate. For convenience during daily development, this mode has some special format constraints. For example, MJPEG files appear as xxx.240x320.mjpeg.mp4 to reflect specific file configuration information, but it cannot guarantee that all generated files can be decoded successfully.

Image Conversion

Basic Functions

This tool provides conversion between common image formats, including PNG/JPG/WebP/AVIF, and supports adjustment of image size, image quality, and other parameters. On the SiFli platform, the general process is to convert images in other formats to PNG at the required resolution, then further convert PNG to eZip with the tool for chip use.

PNG/GIF/APNG–>eZip

eZip is a lossless compression format independently developed by SiFli Technology. It can be used for graphics format compression, similar to PNG, with transparency support and a compression ratio slightly higher than PNG, and it can also be used for general-purpose file compression. This tool supports converting graphics files in PNG/GIF/APNG formats to the eZip format used by the SiFli platform.

Video Conversion

Basic Functions

This tool provides conversion between common video formats and has the following configurable parameters:

  • Container format selection (MP4/AVI/MJPEG/sequence frames, etc.)

  • Video codec format (H.264/H.265/EZIP/VP8/VP9/AV1/MJPEG, etc.)

  • Audio codec format (MP3/AAC, etc.)

  • Video resolution selection/settings (scaling/cropping region)

  • Video frame rate selection/settings

  • Audio parameter settings (mute, mono or stereo, bit rate, sampling frequency, etc.)

  • Video content clipping (clip video within a specified time range)

Common video conversion scenarios on the SiFli platform include: MP4/AVI–>MP4, MP4/AVI–>eZip-A, and MP4/AVI–>MJPEG.

Note

  • The configuration items for MP4 output above must exactly match the settings of the specific chip’s internal decoding mechanism. This is determined by the design of the specific chip. The tool needs to provide corresponding configurations for debugging and development, but externally released tools should provide only a few fixed configurations and should not give customers too much freedom.

Sequence Frame Extraction

In some scenarios, video sequence frames need to be extracted to play silent animations. The frame rate for extracted sequence frames should not exceed 30 fps for the solution. If the original video frame rate is lower than 30 fps, the original frame rate is used. The extracted frame sequence is saved as PNG images and then further converted to eZip.

Tool Usage

The tool interface is shown below and is mainly divided into five areas. For usage, refer to the “GraphicsTool.pdf” document in the GraphicsTool toolkit. This section briefly introduces operation flows and notes for several common scenarios.

../_images/%E5%9B%BE%E5%BD%A2%E5%B7%A5%E5%85%B7_1.png

How to Add Files for Conversion to the List

Method 1: Use the “Source Select” button in the function control area to select the resource path

Method 2: Use the “Update Path” item in the right-click menu of the file selection area to select the resource path

Method 3: Drag files or paths into the list

Important

Note that the file list box displays only folders and files whose formats match the current processing function. For details, refer to the [IMG_FILTER] and [VIDEO_FILTER] configurations in GraphicsTool.ini under the tool directory.

How to Put Converted Files onto the SD Card

Insert the SD card into the computer, or insert the SD card into the development board and connect the Type-C USB cable to the computer. After the computer successfully enumerates the SD card drive letter, copy the generated files to the corresponding directory under the SD card drive letter.

Appendix: Basic Knowledge of SD Cards

For systems with an SD card, overly high requirements are usually not placed on the specific SD card performance and format, for user convenience.

In general, because the SiFli chip SDK uses the FatFS file system and supports FAT16 and FAT32, modern SD cards often have relatively large capacities. Therefore, the only requirement is that the SD file system is also FAT32, with a maximum supported capacity of 32GB. In this case, the SD card can be formatted as FAT32 through File Explorer in Windows, with no other requirements.

For specific scenarios, such as video playback or storage, customers may need to pair the product with a dedicated SD card. In this case, requirements on SD card read/write speed can be increased further. Typical mainstream specifications are:

  • SDHC, up to 32GB

  • Class 10 (C10), UHS-I (U1), Video 10MB/s (V10), supports 10MB/s read/write

Note

Basic SD card information is as follows. For more details, refer to the following article:

How Should You Choose an SD Card? Speed and Lifetime Matter, and This Is How You Should Choose

SD Card Capacity Classes

SD cards can be classified by capacity as follows:

  • SD or SDSC (Secure Digital Standard Capacity Card): maximum storage capacity of 2 GB

  • SDHC (Secure Digital High Capacity Card): storage capacity greater than 2 GB and up to 32 GB

  • SDXC (Secure Digital Extended Capacity): storage capacity greater than 32 GB and up to 2 TB

  • SDUC (Secure Digital Ultra Capacity): storage capacity greater than 2 TB and up to 128 TB

SD card speed classes

SD cards can be classified by speed as follows:

tools/assets/SD_speed.png

SD card interfaces and speed modes

SD card interfaces are divided into SDIO and SPI. Depending on the chip platform and application scenario, either interface may be used.

  • SDIO: by interface speed mode, SD cards can be divided into the following 7 types:

    1. Default Speed Mode: 3.3 V supply, maximum frequency 25 MHz, maximum speed 12.5 MB/s

    2. High Speed Mode: 3.3 V supply, maximum frequency 50 MHz, maximum speed 25 MB/s

    3. SDR12: UHS-I card, 1.8 V supply, maximum frequency 25 MHz, maximum speed 12.5 MB/s

    4. SDR25: UHS-I card, 1.8 V supply, maximum frequency 50 MHz, maximum speed 25 MB/s

    5. SDR50: UHS-I card, 1.8 V supply, maximum frequency 100 MHz, maximum speed 50 MB/s

    6. SDR104: UHS-I card, 1.8 V supply, maximum frequency 208 MHz, maximum speed 104 MB/s

    7. DDR50: UHS-I card, 1.8 V supply, maximum frequency 50 MHz, maximum speed 50 MB/s

  • SPI:

    • In SPI speed mode, the upper frequency limit of an SD card is 25 MHz and the upper speed limit is 3.125 MB/s

Note

When the external storage capacity of the chip on a module or PCBA is insufficient, an onboard SD card may be used to expand storage at lower cost. In this case, the SD card partitions and file system must be fixed according to the usage scenario, so a dedicated tool is required to partition and program the SD card, and the SD card performance can also be fixed.

In this case, the SD card should be placed in a protected state (sealed with a label, or installed in an internal card slot that is not exposed). If users remove the SD card themselves and format or change partitions in a computer file browser instead of using the dedicated tool, the entire system is very likely to be damaged and may not recover normal operation. The only solution in this situation is to guide the customer to use the dedicated tool to repartition and format it. Because of the complexity of after-sales service, this kind of end-user operation should be strongly avoided.