# How can I display a bitmap on MicroUi

**URL:** <https://forum.microej.com/t/how-can-i-display-a-bitmap-on-microui/1224>\
**Category:** Technical Support\
**Created:** [February 2, 2023, 10:32am UTC](https://forum.microej.com/t/how-can-i-display-a-bitmap-on-microui/1224 "2023-02-02T10:32:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guido.roncarolo](https://forum.microej.com/user_avatar/forum.microej.com/guido.roncarolo/32/452_2.png) [@guido.roncarolo](https://forum.microej.com/u/guido.roncarolo)\
**Post date:** [February 2, 2023, 10:32am UTC](https://forum.microej.com/t/how-can-i-display-a-bitmap-on-microui/1224/1 "2023-02-02T10:32:43Z")

</div>

Hi,

I would like to display a bitmap (RGB) image that I stored as a resource on MicroUI

for vectorial images there is  
final VectorImage

but I did not find the equivalent for Bitmaps

Thanks

g.

---

<div class="post-metadata">

**Author:** ![gaetan.harel](https://forum.microej.com/user_avatar/forum.microej.com/gaetan.harel/32/44_2.png) [@gaetan.harel](https://forum.microej.com/u/gaetan.harel)\
**Post date:** [February 2, 2023, 2:45pm UTC](https://forum.microej.com/t/how-can-i-display-a-bitmap-on-microui/1224/2 "2023-02-02T14:45:54Z")

</div>

Hello Guido,

We have a handy example on how to load raster images (in the example we use PNG):

> **[Example-Standalone-Foundation-Libraries/com.microej.example.foundation.microui.i...](https://github.com/MicroEJ/Example-Standalone-Foundation-Libraries/tree/master/com.microej.example.foundation.microui.image)**
>
> master/com.microej.example.foundation.microui.image

If you want more information about loading images, here is the full documentation: [Image Loader — MicroEJ Documentation](https://docs.microej.com/en/latest/VEEPortingGuide/uiImageLoader.html)

Have a nice day!  
Gaëtan for MicroEJ

---

<div class="post-metadata">

**Author:** ![guido.roncarolo](https://forum.microej.com/user_avatar/forum.microej.com/guido.roncarolo/32/452_2.png) [@guido.roncarolo](https://forum.microej.com/u/guido.roncarolo)\
**Post date:** [February 6, 2023, 7:58am UTC](https://forum.microej.com/t/how-can-i-display-a-bitmap-on-microui/1224/3 "2023-02-06T07:58:00Z")

</div>

Hello Gaetan,

thanks a lot for the examples: they really help

Please bear with me as my java is quite rusty:

I tried to extend Image class  
public class BitmapImage { extends Image

as is done in  
public class ResourceImage extends Image {

but as the Image constructor is private I cannot; here’s why

> <https://stackoverflow.com/questions/3952815/extends-of-the-class-with-private-constructor>

Why does it work for ResourceImage?  
How can I do the same?

Thanks a lot

guido

---

<div class="post-metadata">

**Author:** ![alexis.pineau](https://forum.microej.com/user_avatar/forum.microej.com/alexis.pineau/32/194_2.png) [@alexis.pineau](https://forum.microej.com/u/alexis.pineau)\
**Post date:** [February 10, 2023, 9:12am UTC](https://forum.microej.com/t/how-can-i-display-a-bitmap-on-microui/1224/4 "2023-02-10T09:12:52Z")

</div>

Hello Guido,

The Image constructor has the package visibility so as for the private visibility you cannot extend it.  
The ResourceImage class can extend Image because it is in the same package.

Why do you need to extend the Image class?

Alexis
