case EFI_HII_IIBT_IMAGE_8BIT_TRANS:\r
Length = sizeof (EFI_HII_IIBT_IMAGE_8BIT_BLOCK) - sizeof (UINT8) +\r
BITMAP_LEN_8_BIT (\r
- ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
+ (UINT32) ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)\r
);\r
ImageIdCurrent++;\r
case EFI_HII_IIBT_IMAGE_24BIT_TRANS:\r
Length = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +\r
BITMAP_LEN_24_BIT (\r
- ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
+ (UINT32) ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)\r
);\r
ImageIdCurrent++;\r
// Convert the pixel from 8 bits to corresponding color.\r
//\r
for (Ypos = 0; Ypos < Image->Height; Ypos++) {\r
- OffsetY = BITMAP_LEN_8_BIT (Image->Width, Ypos);\r
+ OffsetY = BITMAP_LEN_8_BIT ((UINT32) Image->Width, Ypos);\r
//\r
// All bits are meaningful since the bitmap is 8 bits per pixel.\r
//\r
BitMapPtr = Image->Bitmap;\r
\r
for (Ypos = 0; Ypos < Image->Height; Ypos++) {\r
- OffsetY = BITMAP_LEN_8_BIT (Image->Width, Ypos);\r
+ OffsetY = BITMAP_LEN_8_BIT ((UINT32) Image->Width, Ypos);\r
CopyRgbToGopPixel (&BitMapPtr[OffsetY], &Data[OffsetY], Image->Width);\r
}\r
\r
}\r
\r
NewBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +\r
- BITMAP_LEN_24_BIT (Image->Width, Image->Height);\r
+ BITMAP_LEN_24_BIT ((UINT32) Image->Width, Image->Height);\r
\r
//\r
// Get the image package in the package list,\r
}\r
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Width, Image->Width);\r
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Height, Image->Height);\r
- CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Bitmap, Image->Bitmap, Image->Width * Image->Height);\r
+ CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Bitmap, Image->Bitmap, (UINT32) Image->Width * Image->Height);\r
\r
//\r
// Append the block end\r
//\r
CopyMem (&Iibt1bit, CurrentImageBlock, sizeof (EFI_HII_IIBT_IMAGE_1BIT_BLOCK));\r
ImageLength = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) *\r
- (Iibt1bit.Bitmap.Width * Iibt1bit.Bitmap.Height);\r
+ ((UINT32) Iibt1bit.Bitmap.Width * Iibt1bit.Bitmap.Height);\r
Image->Bitmap = AllocateZeroPool (ImageLength);\r
if (Image->Bitmap == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
case EFI_HII_IIBT_IMAGE_24BIT:\r
Width = ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width);\r
Height = ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height);\r
- ImageLength = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * (Width * Height);\r
+ ImageLength = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ((UINT32) Width * Height);\r
Image->Bitmap = AllocateZeroPool (ImageLength);\r
if (Image->Bitmap == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
case EFI_HII_IIBT_IMAGE_8BIT_TRANS:\r
OldBlockSize = sizeof (EFI_HII_IIBT_IMAGE_8BIT_BLOCK) - sizeof (UINT8) +\r
BITMAP_LEN_8_BIT (\r
- ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
+ (UINT32) ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)\r
);\r
break;\r
case EFI_HII_IIBT_IMAGE_24BIT_TRANS:\r
OldBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +\r
BITMAP_LEN_24_BIT (\r
- ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
+ (UINT32) ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),\r
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)\r
);\r
break;\r
// Create the new image block according to input image.\r
//\r
NewBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +\r
- BITMAP_LEN_24_BIT (Image->Width, Image->Height);\r
+ BITMAP_LEN_24_BIT ((UINT32) Image->Width, Image->Height);\r
//\r
// Adjust the image package to remove the original block firstly then add the new block.\r
//\r
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Width, Image->Width);\r
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Height, Image->Height);\r
CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Bitmap,\r
- Image->Bitmap, Image->Width * Image->Height);\r
+ Image->Bitmap, (UINT32) Image->Width * Image->Height);\r
\r
CopyMem ((UINT8 *) NewImageBlock + NewBlockSize, (UINT8 *) CurrentImageBlock + OldBlockSize, Part2Size);\r
\r