6410 eboot display image

Source: Internet
Author: User
Tags clear screen

Show images in eboot. If you want to display images of a non-full screen size, it is not very good. Therefore, several functions are encapsulated for displaying images or drawing images.

The screen size is 320*240. When the screen is painted, draw a row to the right in the upper left corner of the screen, and then draw the next row. The image to be displayed must be converted into an array. Here we use the BMP 2c.exe software. Because the screen is placed in the vertical direction, that is, 240*320. In this way, the image must be rotated 90 degrees counter-clockwise before it can be converted to the corresponding array.

The following function supports full screen or non-full screen image or color display.

Several key functions are as follows:

// Display the image bool showpicture (INT startx, int starty, int width, int high, const unsigned short * Picture) {unsigned int * pfb; int I, J; if (startx> 320 | starty> 240) return false; If (picture = NULL) return false; pfb = (unsigned int *) eboot_framebuffer_ua_start; For (j = 0; j 

Parameter descriptions in the above functions:

Startx: X coordinate at the beginning of the image (subject to screen 320*240)

Starty: Y coordinate at the beginning of the image

Width: The image width (the image width after rotation)

High: The image height (the Image Height after rotation)

Picture: array pointer corresponding to the image

Color: color value. 0xffff indicates white, 0x0000 indicates black

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.