Graphics Conversion Tool

To-Do List

  • Add custom eZip compression encoding format for video conversion

  • Improve image and video editing features

  • Open more professional parameter interfaces and provide detailed descriptions

  • Optimize the tool’s UI based on user feedback

Tool Introduction

In the development of HMI applications, a large number of images and video materials are required. On the SiFli chip platform, handling image materials involves several aspects:

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

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

  • Burning the final materials to the platform storage (FLASH or SD card, etc.)

This tool aims to centralize these processes, making it easier for users to develop and improve efficiency. The tool primarily implements the following functions:

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

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

  • Converting images in formats such as GIF/PNG/APNG to the SiFli chip-specific format, i.e., eZip (static images) or eZip-A (animations)

  • Providing individual image and video processing, as well as batch processing of images and videos

Tool Download

Click to download GraphicsTool package

Tool and Platform Requirements

The primary design purpose of this tool is to facilitate resource conversion for the SiFli development platform. The platform and tool combination have the following requirements:

  • The chip software system and basic resources are stored in NOR FLASH and can be downloaded and run directly using the SiFli download tool

  • New customer resources are placed on the SD card to address the space limitations of NOR FLASH

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

    • ebook: eBook folder

    • music: Music MP3 folder

    • dynamic_app: Installable dynamic application folder

    • dynamic_wf: Installable dynamic watch face folder

    • ota: System firmware upgrade folder, multiple files can be placed here for selection

    • photo: Photo folder

    • video: Video folder

    • startuplogo: Customizable boot animation folder

    The tool can create these basic directory structures. After users place resources in the corresponding paths and process 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 using the SiFli compilation tool to compile the system code and can be placed in the ota folder for use.

Tool Usage Modes

Important

This tool provides Dedicated Mode and Normal Mode, offering convenience for different users.

  • Dedicated Mode: For daily use by downstream customers (who may not be professional users), based on the released chip platform, only a limited number of fully optimized and tested configurations are provided to avoid unexpected issues due to unfamiliarity with incorrect configurations, reducing the complexity of subsequent support. In this mode, the file extensions for MP4, MJPEG, eZip, etc., will be uniformly set to xxx.mp4.

  • Normal Mode: This mode opens up common parameters for image/video processing, offering more configuration flexibility and information. Developer mode is mainly used internally by SiFli, and downstream customers familiar with image/video processing can also use it as appropriate. This mode facilitates daily development with some special format constraints, such as MJPEG files appearing as xxx.240x320.mjpeg.mp4 to reflect specific file configurations, but it cannot guarantee that all generated files can be decoded effectively.

Image Conversion

Basic Functions

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

PNG/GIF/APNG –> eZip

eZip is a lossless compression format developed by SiFli Technology. It can be used for compressing graphic formats (with compression capabilities similar to PNG, supporting transparency, and slightly higher compression ratio than PNG) and general file compression. This tool supports converting graphic files in PNG/GIF/APNG formats to the eZip format used by the SiFli platform.

Video Conversion

Basic Functions

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

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

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

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

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

  • Video frame rate selection/setting

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

  • Video content extraction (extracting video within a specified time range)

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

Note

  • The configuration items for outputting MP4 must be consistent with the settings of the internal decoding mechanism of the specific chip, which is determined by the design of the specific chip. The tool needs to provide various configurations to support debugging and development, but the tool released externally should have a few fixed configurations and not provide too much freedom to customers.

Sequence Frame Extraction

In some scenarios, it is necessary to extract sequence frames from videos for silent animation playback. The frame rate for extracting sequence frames should not exceed 30 frames. If the original video frame rate is less than 30 frames, the original video frame rate will be used. The extracted frame sequence is saved as PNG images and then further converted to eZip.

Tool Usage Methods

The tool interface is shown in the figure below, divided into five main areas. The usage methods can be referred to in the “GraphicsTool.pdf” document in the GraphicsTool package. Here, we briefly introduce the operation procedures and precautions for several common scenarios.

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

How to Add Files to the List

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

Method 2: Right-click in the file selection area and choose “Update Path” to select the resource path

Method 3: Drag and drop files or paths into the list

Important

Note that in the file list box, only folders and files that match the current processing function will be displayed. For specific details, refer to the [IMG_FILTER] and [VIDEO_FILTER] configurations in the GraphicsTool.ini file in the tool directory.

How to Copy Converted Files to the SD Card

Insert the SD card into the computer (or connect the development board with the SD card to the computer via a Type-C USB cable). Once the SD card is successfully enumerated on the computer, copy the generated files to the corresponding directory on the SD card.

Appendix: Basic Knowledge of SD Cards

For systems with SD cards, for the convenience of users, it is often not possible to set high requirements for the performance and format of the specific SD card.

Generally, since the SiChips SDK uses the FatFS file system, which supports FAT16 and FAT32, modern SD cards often have large capacities. Therefore, the only requirement is that the file system of the SD card is also FAT32, supporting up to 32GB capacity. In this case, the SD card can be formatted to the FAT32 system using the file explorer in the Windows operating system, with no other requirements.

For specific scenarios (such as video playback or storage), there may be situations where it is necessary to require the customer’s product to use a dedicated SD card. In such cases, the read and write speed requirements for the SD card can be further increased, for example, typical mainstream specifications are:

  • SDHC, up to 32GB

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

Note

Basic information about SD cards is as follows, and more knowledge can be found in the following article:

How to Choose an SD Card? Speed and Lifespan Matter, Here’s How to Choose

SD Card Capacity Tiers

SD cards can be categorized by capacity as follows:

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

  • SDHC (Secure Digital High Capacity Card): Storage capacity from 2GB to 32GB

  • SDXC (Secure Digital eXtended Capacity): Storage capacity from 32GB to 2TB

  • SDUC (Secure Digital Ultra Capacity): Storage capacity from 2TB to 128TB

SD Card Speed Tiers

SD cards can be categorized by speed as follows:

tools/assets/SD_speed.png

SD Card Interfaces and Speed Modes

SD cards have two types of interfaces: SDIO and SPI, and both may be used depending on the chip platform and application scenario.

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

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

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

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

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

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

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

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

  • SPI:

    • In SPI mode, the frequency limit for SD cards is 25MHz, with a speed limit of 3.125MB/s

Note

When the external storage capacity of the module or PCBA is insufficient, it is possible to use an on-board SD card to expand storage at a lower cost. In this case, the partitioning and file system of the SD card need to be fixed according to the usage scenario, so a dedicated tool must be used to partition and burn the SD card, and the performance of the SD card can also be fixed.

In such cases, the SD card should be placed in a protected state (sealed with a label or the card slot should be internal and not exposed). If the user removes the SD card and formats or changes the partition using a computer file explorer (not a dedicated tool), it is very likely to damage the entire system, preventing it from functioning normally. In such cases, the only solution is to guide the customer to use the dedicated tool to re-partition and format the SD card. Due to the complexity of after-sales service, this kind of operation by end-users should be strongly avoided.