727 views
in System Integration by
Hi,

I use I.MXRT1050-EVKB to run my Embedded Wizard project

I want to save the screen to image and put it into USB device through I.MXRT1050 USB OTG

Does EW provide any function like screenshot ?

Thanks!

Best Regards,
Andy Dong

1 Answer

0 votes
by

Hi Andy,

if you want to save the screenshot just for a showcase you can use the Embedded Wizard Prototyper, here you can find the documentation of it:

Embedded Wizard Prototyper

 

I think in your case you want to take a screenshot of the current view on your target?

For that I would use the LCD framebuffer.This buffer holds the view that is also present on your LCD screen and this you can convert into a picture. The start address is coded in "ewmain.c" (#define FRAME_BUFFER_ADDR). Depending on the format that you want to save the picture it is able to convert this buffer. In case that you want to save it as bitmap, you can forward the data to the USB API without converting. 

 

Kind regards 

Tim

by
Hi Tim,

Yes, I want to take a screenshot of the current view and save it to USB device
I will try it.
Thanks for your reply!
 

Best Regards,
Andy
by

Hi Tim,

I can successfully take screenshot from LCD framebuffer. 

Since the EW color format is RGB565 , I have converted into RGB888 and save it as bitmap.

Now,I want to replace the current view by the image in USB device.

I thought just do the reverse operation with screenshot.

But something strange, I will show in the following image.

1. Before Image https://imgur.com/x6CLGcu

the image in USB device is a white bitmap

2. After Image https://imgur.com/OfJLqxm

 

Is there any suggestion ? thanks!

 

Best Regards,

Andy

 

by
Hi Andy,
do you want load the saved bitmap into the framebuffer while Embedded Wizard is running?
Embedded Wizard continuously updates objects that are out of date. In case that you are using an RTOS you also should make sure that you take the screenshot between two updates.
Can you validate whether the RGB565 Bitmap contains the correct view, for me it looks like that something went wrong during the convertation.
 

Kind regards
Tim
by

Hi , Tim

 

yes, I want to load the saved bitmap into the framebuffer 

I converted the RGB565 to  RGB888 by doing the following steps:

            color[0] = ((*ptr & 0xf800) >> 11 ) << 3;       // R
            color[1] = ((*ptr & 0x07e0) >> 5 ) << 2;        // G
            color[2] = (*ptr & 0x001f) << 3;                    // B

I converted the RGB888 to  RGB565 by doing the following step:

             data = (_buf[0] >> 3 ) << 11 | (_buf[1] >> 2 ) << 5 | (_buf[2] >> 3 ) ;  // _buf[0] = R , _buf[1] = G  , _buf[2] = B 

For example, a pixel 0xE8ECE8 (RGB888) will be converted to 0xEF7D

 

Best Regards,

Andy

by

Hi Andy,

I followed your conversation - just some ideas:

  • If you want to fill the content of the framebuffer by yourself (outside from Embedded Wizard update cycle), make sure that you coordinate your framebuffer access with the main loop of the Embedded Wizard GUI application.
  • If your system operates in double buffering mode, make sure to access the desired one.
  • After writing into the framebuffer, make sure to flush the cache in order to ensure that the content is written to the SDRAM.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...