Discussion:
[edk2] Show image BMP with UEFI
S.Vieira
2015-06-11 13:50:41 UTC
Permalink
Hi everyone.

I am trying show a image with UEFI

(i see a example in http://uefi.blogspot.com.br/)

But does not worked .

Can help me Somebody ?!


Source code of the example:

http://sourceforge.net/p/syslibforuefi/code/HEAD/tree/trunk/Applications/


Thx S.Vieira


------------------------------------------------------------------------------
Rod Smith
2015-06-11 19:25:12 UTC
Permalink
Post by S.Vieira
Hi everyone.
I am trying show a image with UEFI
(i see a example in http://uefi.blogspot.com.br/)
But does not worked .
Can help me Somebody ?!
http://sourceforge.net/p/syslibforuefi/code/HEAD/tree/trunk/Applications/
I can't comment on the code to which you're referring, but for more
example code, see rEFIt (BSD-licensed) and rEFInd (GPLv3-licensed; I
forked it from rEFIt):

https://sourceforge.net/p/refit/code/HEAD/tree/trunk/refit/
https://sourceforge.net/p/refind/code/ci/master/tree/

In both cases, the BMP code is in the libeg subdirectory, and especially
in the load_bmp.c file. Other files, like screen.c and image.c, hold
more EFI-specific code for image manipulation; the load_bmp.c file has
little or nothing EFI-specific in it.
--
Rod Smith
***@rodsbooks.com
http://www.rodsbooks.com

------------------------------------------------------------------------------
Andrew Fish
2015-06-11 19:59:57 UTC
Permalink
Post by S.Vieira
Hi everyone.
I am trying show a image with UEFI
(i see a example in http://uefi.blogspot.com.br/)
But does not worked .
Can help me Somebody ?!
The edk2 supports BMP logos on boot:
The Logo is a bmp file: https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Logo/Logo.bmp

I assume you are looking for the code to convert a BMP into a GOP Blt buffer.
https://svn.code.sf.net/p/edk2/code/trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
/**
Convert a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer
is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt
buffer is passed in it will be used if it is big enough.

@param BmpImage Pointer to BMP file
@param BmpImageSize Number of bytes in BmpImage
@param GopBlt Buffer containing GOP version of BmpImage.
@param GopBltSize Size of GopBlt in bytes.
@param PixelHeight Height of GopBlt/BmpImage in pixels
@param PixelWidth Width of GopBlt/BmpImage in pixels

@retval EFI_SUCCESS GopBlt and GopBltSize are returned.
@retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image
@retval EFI_BUFFER_TOO_SMALL The passed in GopBlt buffer is not big enough.
GopBltSize will contain the required size.
@retval EFI_OUT_OF_RESOURCES No enough buffer to allocate.

**/
EFI_STATUS
ConvertBmpToGopBlt (
IN VOID *BmpImage,
IN UINTN BmpImageSize,
IN OUT VOID **GopBlt,
IN OUT UINTN *GopBltSize,
OUT UINTN *PixelHeight,
OUT UINTN *PixelWidth
)

Thanks,

Andrew Fish
Post by S.Vieira
http://sourceforge.net/p/syslibforuefi/code/HEAD/tree/trunk/Applications/
Thx S.Vieira
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
S.Vieira
2015-06-12 11:15:57 UTC
Permalink
Thanks

I will see this soon.


------------------------------------------------------------------------------
Blibbet
2015-06-12 17:03:48 UTC
Permalink
Post by Andrew Fish
Thanks
I will see this soon.
Maybe this code will help?

efiShow - UEFI app to show BMP picture
https://github.com/leebaok/efiShow

or possibly:

snapshot - saves UEFI screenshot as BMP file
https://github.com/kurtqiao/snapshot


------------------------------------------------------------------------------
Loading...