Boot image display method, electronic device, and computer readable medium

By converting target image resources into hexadecimal data and mapping them to the pixel values ​​of the display interface, the problem of poor interface matching during boot-up image display was solved, achieving high-quality image display.

CN115495035BActive Publication Date: 2026-04-28AITIWEIER ELECTRONICS TECH BEIJING
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AITIWEIER ELECTRONICS TECH BEIJING
Filing Date
2022-10-26
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing boot image display methods are prone to displaying blank or black interfaces during system adjustments, and the target image and display interface have poor matching, resulting in display effects that do not meet customer requirements.

Method used

The target image resource is converted into hexadecimal data, and a pixel correspondence is established with the target display interface. The image is then displayed on the display interface using the hexadecimal data, ensuring that the image matches the interface.

Benefits of technology

It improves the matching degree between images and display interfaces, achieving realistic and full image display effects, and meeting customer pre-order requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115495035B_ABST
    Figure CN115495035B_ABST
Patent Text Reader

Abstract

The application discloses a start-up image display method, electronic equipment and computer readable medium, and relates to the field of image display. The method comprises the following steps: adjusting a to-be-displayed image resource based on the display parameters of a target display interface to obtain a target image resource comprising at least one picture; converting each picture in the target image resource into hexadecimal data; establishing a corresponding relationship between the hexadecimal data of each picture and the pixel points of the target display interface; displaying the hexadecimal data of a current picture to be played at the corresponding pixel points, and connecting the displayed pixel points to obtain the current picture to be played, thereby completing the display of the current picture to be played. In one technical solution of the application, the picture to be played is displayed on the display interface in the form of hexadecimal data, so that the picture to be played has high matching degree with the display interface, the display effect of the picture to be played is real and full, and the predetermined requirements of the customer are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image display, and more particularly to a method for displaying a boot-up image, an electronic device, and a computer-readable medium. Background Technology

[0002] The system's boot image includes a boot logo and a boot animation. The boot image serves the following functions: to provide a smooth boot transition for the system and to promote the company that owns the product.

[0003] During system startup, it takes time for the drivers of various hardware components and system configurations to adjust. If the display is blank or black during this adjustment period, it is visually unfriendly to the user. To alleviate this problem, a boot image needs to be added when backlighting is enabled to facilitate the system startup transition. Current boot images are customized to meet the different usage needs of various customers. Although a target image is displayed during startup, the mismatch between the target image's data format and the display interface means that the display effect of the target image may not meet the customer's expectations. Summary of the Invention

[0004] The purpose of this invention is to provide a boot image display method, electronic device, and computer-readable medium to solve the problem that existing boot image display methods fail to meet customer requirements.

[0005] To achieve the aforementioned objective, a boot image display method according to a first aspect of the present invention includes:

[0006] S1, Based on the display parameters of the target display interface, adjust the image resources to be displayed to obtain target image resources including at least one image;

[0007] S2, convert each image in the target image resource into hexadecimal data;

[0008] S3, establish the correspondence between the hexadecimal data of each image and the pixels of the target display interface;

[0009] S4. Based on the correspondence, the hexadecimal data of the image to be played is displayed at its corresponding pixel. The pixels in the display state are connected to obtain the image to be played, thus completing the display of the image to be played.

[0010] Preferably, S1 specifically involves: obtaining the display parameters of the target display interface; adjusting the format of the image resource to be displayed based on the display parameters to obtain the target image resource; saving the target image resource to the corresponding file in the system; during the adjustment process, the resolution of the target display interface is consistent with the size of the target image resource, and the color mode of the target image resource is consistent with the color range supported by the target display interface.

[0011] Preferably, S2 specifically involves: reading all images to be converted from the target image resource containing at least one image to obtain an image set containing at least one image; scanning all images in the image set according to preset image scanning parameters and the data type of the output image after scanning to obtain hexadecimal data for each image and storing it in a hexadecimal data array, and then ending the scanning.

[0012] More preferably, the step of scanning all images in the image set to obtain the hexadecimal data of each image and storing it in a hexadecimal data array specifically involves: using a for loop to traverse the row and column data of the currently scanned image j to obtain the hexadecimal data of the currently scanned image j; adding the hexadecimal data of the currently scanned image j to the corresponding position in the hexadecimal data array, and continuing to scan the next image until all images in the image set have been scanned.

[0013] Preferably, S4 specifically involves: retrieving the hexadecimal data of the image to be played and storing it in the video memory; the controller of the target display interface reads the hexadecimal data from the video memory line by line from the beginning, and after reading the current line, continues reading from the beginning of the next line until all the hexadecimal data in the video memory has been read; all the read hexadecimal data is sent to the target display interface; based on the pre-set correspondence between pixels and bits of the target display interface, each hexadecimal data is assigned to a pixel; based on the display rules of the target display interface, the assigned value of each pixel is displayed, and the pixels in the display state are connected to form the image in the image resource to be displayed.

[0014] More preferably, the pre-set correspondence between pixels and bits of the target display interface is specifically: one pixel corresponds to one bit or one pixel corresponds to two bits.

[0015] Preferably, after S4, the method further includes: displaying all images in the target image resource according to the playback parameters of all images in the target image resource, specifically: when the target image resource is a static image resource including only one image i, the playback parameter of image i is repeated playback, the hexadecimal data of image i is displayed at its corresponding pixel, and the pixels in the display state are connected to obtain image i; when the target image resource is a dynamic image resource including two or more images, the playback parameter of the two or more images is sequential loop playback, starting from the first image in the playback order, the hexadecimal data of the first image is displayed at its corresponding pixel, the pixels in the display state are connected to obtain the first image, then the second image is displayed, until all images in the dynamic image resource are displayed, and sequential loop playback starting from the first image is started.

[0016] Preferably, the method further includes updating image resources, specifically: storing the newly created image data in the current partition; before system startup, identifying whether there is a difference between the new image data and the original image data stored in the current partition; if so, the new image data replaces the original image data; if not, the original image data in the current partition is retained; during system startup, displaying the current image data to be read from the partition to complete the update of the graphics resources.

[0017] The electronic device according to a second aspect of the present invention includes: one or more processors; and a memory for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the boot image display method as described in any one of claims 1-8.

[0018] A computer-readable medium according to a third aspect of the present invention stores a computer program thereon, characterized in that, when the computer program is executed by a processor, it implements the boot image display method as described in any one of claims 1-8.

[0019] The beneficial effects of this invention are as follows: One technical solution of this invention converts image resources into hexadecimal data. Based on the correspondence between hexadecimal data and the pixels of the display interface and the specifications of the display interface, the hexadecimal data is displayed on the display interface. Since the image to be played is displayed on the display interface in hexadecimal data form, the matching degree between the image to be played and the display interface is high, and the display effect of the image to be played is realistic and full, meeting the customer's predetermined requirements. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a boot image display method according to an embodiment of the present invention;

[0021] Figure 2 This is a schematic diagram of the preprocessing flow of the image resource to be displayed in one embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram illustrating the process of converting an image into hexadecimal data in one embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram of the process of displaying the image to be played in one embodiment of the present invention;

[0024] Figure 5 This is a schematic diagram of the image resource update process in one embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0026] Example

[0027] Reference Figure 1 One embodiment of this application describes a boot image display method, including:

[0028] S1, Based on the display parameters of the target display interface, adjust the image resources to be displayed to obtain target image resources including at least one image;

[0029] S2, convert each image in the target image resource into hexadecimal data;

[0030] S3, establish the correspondence between the hexadecimal data of each image and the pixels of the target display interface;

[0031] S4, based on the correspondence, display the hexadecimal data of the image to be played in its corresponding pixel, connect the pixels in the display state to obtain the image to be played, and complete the display of the image to be played;

[0032] S5, Display all images in the target image resource according to the playback parameters of the images in the target image resource.

[0033] More detailed explanation:

[0034] (a) S1, refer to Figure 2 .

[0035] 1.1 Obtain the display parameters of the target display interface.

[0036] Here, consult the target display interface's specifications to confirm its screen information, primarily including resolution, color mode, viewable area, and refresh rate. Adjust the resolution, bit depth, and color mode of the image resources to be displayed using the parameters specified in the specifications to avoid poor results due to parameter discrepancies.

[0037] The visible area of ​​the display interface: the actual usable screen area. The color mode of the display interface: the range of colors the display interface supports. The pixel pitch of the display interface: the distance between two adjacent pixels on the display interface; pixel pitch affects the level of detail in image quality. The interface resolution and refresh rate: The display interface resolution parameter is 1920*1080, meaning there are 1920 pixels horizontally and 1080 pixels vertically on the display interface. The display interface refreshes by lighting up one pixel at a time, moving to the next row after lighting up one row. The refresh rate refers to how many times the image can be redrawn per second, i.e., the number of times the display interface refreshes per second. A higher refresh rate results in better image stability, but the price will increase accordingly.

[0038] 1.2 Adjust the format of the image resource to be displayed based on the display parameters to obtain a target image resource adapted to the target display interface parameters. Here, the information of the image resource includes: name, size, format, resolution, color mode, etc.

[0039] 1.3 Save the target image resources to the corresponding file in the system. The images in the target image resources are saved in formats including JPG, PNG, etc.

[0040] During the adjustment process, the resolution of the target display interface is consistent with the size of the target image resource to avoid missing display content; the color mode of the target image resource is consistent with the color range supported by the target display interface to avoid differences between the image display effect of the target display interface and the image resource to be displayed.

[0041] (ii) S2, refer to Figure 3 .

[0042] 2.1 Read all images to be converted from the target image resource, which includes at least one image, to obtain an image set containing at least one image. Specifically:

[0043] First, based on the storage location of the target image resource in the system file, the target image data, including image start information, stored image parameters, and image encoding method, is read using the fread() function.

[0044] Next, based on the target image data read by the fread() function, OpenCV functions are used to obtain information about all images that need to be converted and their header information, resulting in an image set containing at least one image.

[0045] Before reading images using the `fread()` function, it's necessary to ensure that all images in the target image resource conform to the predetermined format requirements. Image transformations can be set using relevant functions; the `flip()` function can be used to flip images, and logarithmic and flip functions can be used to set color output, etc.

[0046] 2.2. According to the preset image scanning parameters and the data type of the output after scanning, all images in the image set are scanned respectively to obtain the hexadecimal data of each image and store it in the hexadecimal data array. The scanning ends.

[0047] 2.2.1. Use a for loop to iterate through the row and column data of the currently scanned image j to obtain its hexadecimal data. By using a for loop to iterate through the row and column data, adding the obtained data to the corresponding array, and then reorganizing and saving the output array, the corresponding image data information is obtained.

[0048] The reorganization of the output array specifically involves adjusting the byte order of the image output data. This includes two byte orders: little-endian and big-endian. Little-endian means that the least significant byte is stored at the lowest memory address and the most significant byte is stored at the highest memory address. Big-endian means that the most significant byte is stored at the lowest memory address and the least significant byte is stored at the highest memory address.

[0049] Here, images with different bit depths require different processing. Bit depth refers to the number of colors that each pixel can represent, typically 8-bit, 16-bit, or 32-bit. The higher the bit depth value of a pixel, the richer the colors it can represent. Specifically, processing images with different bit depths involves using OpenCV's `cvConvertScale()` function to convert the scanned image data between images of different bit depths when the input and desired output bit depths are inconsistent.

[0050] 2.2.2 Add the hexadecimal data of the currently scanned image j to the corresponding position in the hexadecimal data array, and continue scanning the next image until all images in the image set have been scanned.

[0051] Here, the pre-set image scanning parameters and the data type of the output after scanning are specifically as follows:

[0052] Set the image scanning parameters: horizontal scan or vertical scan;

[0053] Set the input adjustment parameters for the image: Normal display, Horizontal mirror, Vertical mirror, Horizontal and vertical mirror;

[0054] Set the image output color: monochrome or true color;

[0055] Set the width and height of the output image;

[0056] Set the output byte order;

[0057] Configure whether the output data should include the image header information.

[0058] (III) S4, refer to Figure 4 .

[0059] Based on the aforementioned correspondence, the hexadecimal data of the image to be played is displayed at its corresponding pixel. The pixels in the display state are then connected to obtain the image to be played, thus completing the display of the image to be played. Specifically:

[0060] Retrieve the hexadecimal data of the image to be played and store it in the video memory;

[0061] The controller of the target display interface reads hexadecimal data from the video memory line by line from the beginning. After reading the current line, it continues to read from the beginning of the next line until all the hexadecimal data in the video memory has been read.

[0062] All hexadecimal data read is sent to the target display interface;

[0063] Based on a pre-defined pixel-to-bit correspondence of the target display interface, each hexadecimal data value is assigned to a pixel. Specifically, this pre-defined pixel-to-bit correspondence means that one pixel corresponds to one bit or one pixel corresponds to two bits. The more bytes a pixel occupies, the richer the colors it can represent.

[0064] Based on the display rules of the target display interface, the values ​​of each pixel are assigned, and the pixels in the display state are connected to form the image in the image resource to be displayed.

[0065] Reference Figure 5Another embodiment of the boot image display method of this application further includes: updating image resources, specifically: storing the newly created image data in the current partition; before the system starts, identifying whether there is a difference between the new image data and the original image data stored in the current partition; if so, the new image data replaces the original image data; if not, the original image data in the current partition is retained; during the system startup process, displaying the current image data of the partition to be read, and completing the update of the graphics resources.

[0066] To meet the image resource update requirements described in this embodiment, a partition is needed to persistently store the updated logo. By adding a related service during system startup, upon detecting the insertion of a USB drive, a detection and replacement process is initiated. The prepared new image resource is stored on the USB drive, which is then connected before system startup. Because the new image resource data is stored in a read-write module, the system checks for differences between the new image data and the original image data stored in the current partition. If the new image resource differs from the currently stored resource, the content of that area is updated. If the new image data is identical to the currently stored resource content, the content of that area is not updated. After the comparison is complete, the system starts displaying the updated image.

[0067] The method described in this embodiment can meet the needs of updating and replacing the system's boot image, satisfying users' customization requirements for the system boot image. When a user replaces the original image resource file with a new image resource, firstly, the stored original image resource file needs to be replaced with the new image resource to complete the update. During the system startup phase, an automatic check and comparison is performed. If there are differences between the image resource to be displayed and the original display graphic resource, the new image resource is parsed, and the logo and boot animation carried by the new image resource are replaced to achieve the update effect. The updated data needs to be saved to this partition for the next data recognition and replacement. During the system startup process, the uboot stage also reads changes in relevant parameters and updates the display content based on the read image data. The kernel stage also reads relevant parameters; if changes occur, the display content is updated; if no differences are found, no update is performed.

[0068] By adopting the technical solution disclosed in this invention, the following beneficial effects are obtained: One technical solution of this invention converts image resources into hexadecimal data. Based on the correspondence between hexadecimal data and display interface pixels and the specifications of the display interface, the hexadecimal data is displayed on the display interface. Since the target image is displayed on the display interface in hexadecimal data form, the matching degree between the target image and the display interface is high, and the display effect of the target image is realistic and full, meeting the customer's predetermined requirements.

[0069] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for displaying a boot image, characterized in that, include: S1, Based on the display parameters of the target display interface, adjust the image resources to be displayed to obtain target image resources including at least one image; S2, convert each image in the target image resource into hexadecimal data; S3, establish the correspondence between the hexadecimal data of each image and the pixels of the target display interface; S4, based on the correspondence, display the hexadecimal data of the image to be played in its corresponding pixel, connect the pixels in the display state to obtain the image to be played, and complete the display of the image to be played; S1, specifically: Obtain the display parameters of the target display interface; The format of the image resource to be displayed is adjusted based on the display parameters to obtain the target image resource; Save the target image resource to the corresponding file in the system; During the adjustment process, the resolution of the target display interface is consistent with the size of the target image resource, and the color mode of the target image resource is consistent with the color range supported by the target display interface. S2, specifically: Read all the images that need to be converted from the target image resource, which includes at least one image, to obtain an image set containing at least one image; According to the preset image scanning parameters and the data type of the output after scanning, all images in the image set are scanned respectively to obtain the hexadecimal data of each image and store it in a hexadecimal data array. The scanning ends. The step of scanning all images in the image set to obtain the hexadecimal data of each image and storing it in a hexadecimal data array is as follows: Use a for loop to iterate through the row and column data of the currently scanned image j to obtain the hexadecimal data of the currently scanned image j; Add the hexadecimal data of the currently scanned image j to the corresponding position in the hexadecimal data array, and continue scanning the next image until all images in the image set have been scanned. S4, specifically: Retrieve the hexadecimal data of the image to be played and store it in the video memory; The controller of the target display interface reads hexadecimal data from the video memory line by line from the beginning. After reading the current line, it continues to read from the beginning of the next line until all the hexadecimal data in the video memory has been read. All the hexadecimal data read is sent to the target display interface; Based on the pre-defined correspondence between pixels and bits of the target display interface, each hexadecimal data is assigned to a pixel. Based on the display rules of the target display interface, the value of each pixel is assigned, and the pixels in the display state are connected to form the image in the image resource to be displayed; The pre-defined correspondence between pixels and bits in the target display interface is specifically: one pixel corresponds to one bit or one pixel corresponds to two bits. S4 is followed by: displaying all images in the target image resource according to the playback parameters of all images in the target image resource, specifically: When the target image resource is a static image resource that includes only one image i, the playback parameter of the image i is repeated playback, the hexadecimal data of the image i is displayed in its corresponding pixel, and the pixels in the display state are connected to obtain the image i. When the target image resource is a dynamic image resource including two or more images, the playback parameters of the two or more images are sequential loop playback. Starting from the first image in the playback order, the hexadecimal data of the first image is displayed at its corresponding pixel. The pixels in the display state are connected to obtain the first image. Then the second image is displayed, until all images in the dynamic image resource are displayed, and sequential loop playback starting from the first image is started. The method also includes updating image resources, specifically: storing the newly created image data in the current partition; before system startup, identifying whether there is a difference between the new image data and the original image data stored in the current partition; if so, the new image data replaces the original image data; if not, the original image data in the current partition is retained. During system startup, the system displays the current image data to be read from the partition and updates the graphics resources.

2. An electronic device, characterized in that, include: One or more processors; A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the boot image display method as described in claim 1.

3. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the boot image display method as described in claim 1.

Citation Information

Patent Citations

  • Method for displaying special sign on screen

    CN101064800A