public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Liming Gao <liming.gao@intel.com>
To: edk2-devel@lists.01.org
Cc: Eric Dong <eric.dong@intel.com>, Dandan Bi <dandan.bi@intel.com>
Subject: [Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image
Date: Wed, 21 Sep 2016 10:39:10 +0800	[thread overview]
Message-ID: <1474425551-9056-3-git-send-email-liming.gao@intel.com> (raw)
In-Reply-To: <1474425551-9056-1-git-send-email-liming.gao@intel.com>

HiiImage protocol implementation doesn't support EFI_HII_IIBT_IMAGE_PNG.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index 612d57a..07b3ba0 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -142,8 +142,9 @@ GetImageIdOrAddress (
       break;
 
     case EFI_HII_IIBT_IMAGE_JPEG:
+    case EFI_HII_IIBT_IMAGE_PNG:
       CopyMem (&Length32, ImageBlock + sizeof (EFI_HII_IMAGE_BLOCK), sizeof (UINT32));
-      ImageBlock += Length32;
+      ImageBlock += OFFSET_OF (EFI_HII_IIBT_JPEG_BLOCK, Data) + Length32;
       ImageIdCurrent++;
       break;
 
@@ -895,6 +896,7 @@ HiiGetImage (
 
   switch (BlockType) {
   case EFI_HII_IIBT_IMAGE_JPEG:
+  case EFI_HII_IIBT_IMAGE_PNG:
     //
     // BUGBUG: need to be supported as soon as image tool is designed.
     //
@@ -1096,6 +1098,7 @@ HiiSetImage (
   //
   switch (BlockType) {
   case EFI_HII_IIBT_IMAGE_JPEG:
+  case EFI_HII_IIBT_IMAGE_PNG:
     //
     // BUGBUG: need to be supported as soon as image tool is designed.
     //
@@ -1497,6 +1500,7 @@ HiiDrawImageId (
   //
   // Get the specified Image.
   //
+  ZeroMem (&Image, sizeof (Image));
   Status = HiiGetImage (This, PackageList, ImageId, &Image);
   if (EFI_ERROR (Status)) {
     return Status;
-- 
2.8.0.windows.1



  parent reply	other threads:[~2016-09-21  2:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21  2:39 [Patch 0/3] BaseTools: Add build support to generate HII image package Liming Gao
2016-09-21  2:39 ` [Patch 1/3] MdePkg UefiHii: Add IMAGE_TOKEN macro to access image resource in C and VFR Liming Gao
2016-09-21  3:19   ` Dong, Eric
2016-09-21  5:10   ` Bi, Dandan
2016-09-21  2:39 ` Liming Gao [this message]
2016-09-21  3:19   ` [Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image Dong, Eric
2016-09-21  5:10   ` Bi, Dandan
2016-09-21  2:39 ` [Patch 3/3] BaseTools: support generating image package from BMP/JPEG/PNG files Liming Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474425551-9056-3-git-send-email-liming.gao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox