• sales

    +86-0755-88291180

Image Extraction

Introduction

When developing an embedded microcontroller, you need to use LCD/OLED to display a picture. The most direct and simple way is to use corresponding tools to convert the picture into corresponding data points (actually a 2-dimensional array), and then you can use the corresponding code to display the array on the LCD/OLED display by sequence.

Steps

1. Click Image2Lcd2.9.zip to download the tool.
2. Double-click to enter the interface.

3. Open the image that needs to be extracted. (Here we take a 1.47inch LCD Module as an example.)

  • Parameter setting
Output data type: C array (*.c)
Scan mode: vertical
Output grayscale: 16-bit true color
Maximum width and height (set according to the actual aspect ratio of the image): 172x320
Output image adjustment: the default setting is fine, if you need color inversion, check Color Inversion
Click 16-bit color: color bits -> RGB565, order of colors -> RGB


4. Save the setting.

  • The path and name are set by the user.
  • The file type is .c file.
  • After saving, an array will be generated, after ctrl+A selects all:


  • Copy it to the "Image. c" file.


  • In Image. h:


  • Finally, call the main function and map it to the screen.


The effect is shown below:

TAG: SpotPear STM32 programmer Cyberpunk LED Matrix Hourglass Gravity Sensor DIY Countdown Timer Clock STEM Educational Soldering Project for Beginners & Adult series bus servos ESP32 H2 ESP32-H2-Zero MINI Development Board For BLE/Zigbee/Thread Raspberry Pi 5 D ESP32-S3 ST7789 Raspberry Pi DSI 800×480 User Guide Raspberry Pi Pico 2 RP2350 0.85 inch LCD Display mini Development Board 0.85inch Screen RGB LED/SD Slot /QMI8658 Gyroscope Sensor CAN Analyzer SpotPear BG95-M3-Zero QuecPython EVB development support LTE/EGPRS and GNSS Raspberry Pi Transparent LCD Raspberry Pi 5 Audio USB TO 2.5G Ethernet Port Converter RJ45 RTL8156B Driver-Free For Windows/macOS/Linux/Android 1.28inch Round LCD 8.8inch LCD 1920x480 Computer PC Monitor Display Secondary Screen TypeC USB CPU RAM Raspberry Pi RP2040 LoRa How to Use Product ROS2