In this article, I'll talk about how to get your own image to display on the screen. As much as we love the Tiano logo, sometimes it just doesn't serve our purposes. This article assumes that you have already followed the directions described in the previous post to display an image.
The first step is to get your image file into a format we can work with. My previous article only supports .BMP files, so be sure the image you want is saved as such. If it's a different file type, just open it in Paint or a similar program and save it in the proper format. To make things simpler, save the image in the same directory as the application.
Next is to create a GUID for our image. You can use uuidgen from the command line if you like, or in Visual Studio, you can go to Tools > Create GUID. Now, we copy the GUID and go to Main.c (our entry point). Change the declaration for gImageFileGuid to the new value. If you are not sure how to convert a GUID into the format used in the EFI_GUID declaration, take a look at this article.
Open up Nt32Pkg.fdf [1]. Search for "Logo.bmp". Below that statement, add a similar statement, in the following format:
FILE FREEFORM = 0E1FAAC7-82A4-41DA-90A4-EE1F6F3E81DC {
SECTION RAW = AppPkg/Applications/Main/6.bmp
}
Be sure to replace the GUID and filepath with your own.
And there it is! Build it and run Main like you would normally, and your own beautiful image will be displayed in place of the Tiano logo.
Next time, I'll talk about getting an image to moving an image around the screen using keyboard input.
UEFI News and Commentary
Showing posts with label FDF. Show all posts
Showing posts with label FDF. Show all posts
Thursday, September 06, 2012
Subscribe to:
Posts (Atom)
