UEFI实战——显示图片

一、准备工作

1.1 BMP格式图片

  • 参考:BMP格式详解
  • 获取“BMP格式详解”文档里的图片,命名为Logo.bmp
  • 将Logo.bmp图片放到U盘里,U盘格式FAT32

二、实例代码

2.1 代码结构

TextPkg/
├── Display.c
├── GetFile.c
├── Test.c
├── Test.dsc
├── Test.h
└── Test.inf

  • GetFile.c 从U盘里读取Logo.bmp文件
  • Display.c 判断bmp格式并解析,将解析后的图片显示到屏幕上

2.2 GetFile.c

/** @file
  The application to print hello word.

Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full tex

你可能感兴趣的:(UEFI学习,uefi学习,uefi图形显示)