Wednesday, June 28th 2017, 5:31am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

vard

Beginner

Date of registration: Aug 13th 2012

Posts: 18

1

Wednesday, August 29th 2012, 8:45am

Drawing ditmap on button

Hello,

Is there any way to load custom BMP image via ethernet for example, without using BMP-converter and display it on button, using BUTTON_SetBitmap() function? Or display it as emWin's iconview icon?
How can I convert raw BMP file to emWin GUI_BITMAP?

Best regards
Anton

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

2

Wednesday, August 29th 2012, 10:10am

Hello Anton,

You can use the function BUTTON_SetBMP() to draw a BMP file directly on a button. This option is not available for the ICONVIEW widget. It is required to use emWin bitmaps to draw ICONVIEW items. These bitmaps may be stored in external memory, if required. To convert BMP files to emWin bitmaps, please use the Bitmap Converter.

For further information about the BUTTON widget, the ICONVIEW widget and the Bitmap Converter, please refer to the chapters "Widgets" and "Bitmap Converter" in the emWin user manual.

Best regards,
Adrian

armvietnam

Beginner

Date of registration: Apr 11th 2013

Posts: 3

3

Saturday, April 13th 2013, 12:21pm

Drawing bitmap from SD card on button

Dear Adrian,

Please tell me how I can use BUTTON_SetBMP() to draw Window Bitmap from SD card on a button? I don't see any example about BUTTON_SetBMP() in the manual.

Thank & Regards,
Vu Phung

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

4

Monday, April 15th 2013, 9:29am

Hello Vu Phung,

The function BUTTON_SetBMP() can not be used to draw a BMP image from external memory. To do so, please overwrite the callback function of the BUTTON widget and use the function GUI_BMP_DrawEx(). Detailed information on how to implement this can be found in the function description of the function GUI_BMP_DrawEx() and in the chapter "The Window Manager" in the emWin user manual.

Best regards,
Adrian

armvietnam

Beginner

Date of registration: Apr 11th 2013

Posts: 3

5

Wednesday, April 17th 2013, 3:29am

How to setup emwin bitmap address on Nor flash with KEIL MDK 4.6

Dear Adrian,

Thank for your reply.

I have one more question, if You have free time, please have a look:
- I want to store bmp file on Nor flash (emwin bmp: after convert by emwin tool) so that I can use BUTTON_SetBitmap() with emwin bmp on nor flash???

if it's true, how can I setup linker to put emwin bmp file to the specific address on nor flash with KEIL?

Thank & Regards,

Vu Phung

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

6

Wednesday, April 17th 2013, 10:38am

Hello Vu Phung,

Please note that this is not an emWin related question. Nevertheless I would assume you will have to use a file system to access NOR flash. This can e.g. be done using emFile. For detailed information about emFile, please have a look at www.segger.com .

Best regards,
Adrian

armvietnam

Beginner

Date of registration: Apr 11th 2013

Posts: 3

7

Wednesday, April 17th 2013, 1:41pm

Dear Adrian,

Thank for your reply.

Thank & Regards,
Vu Phung

This post has been edited 1 times, last edit by "armvietnam" (Apr 17th 2013, 1:48pm)


Yraeisi

Beginner

Date of registration: Feb 10th 2014

Posts: 5

8

Tuesday, February 11th 2014, 10:36am

Hello Vu Phung,

The function BUTTON_SetBMP() can not be used to draw a BMP image from external memory. To do so, please overwrite the callback function of the BUTTON widget and use the function GUI_BMP_DrawEx(). Detailed information on how to implement this can be found in the function description of the function GUI_BMP_DrawEx() and in the chapter "The Window Manager" in the emWin user manual.

Best regards,
Adrian

Hi Adrian
please help me :
I want to Drawing bitmap from SD card on button.but I can't.
I can read bmp file from sd card.but I don't know how used form this file!
Rds Raeisi

This post has been edited 2 times, last edit by "SEGGER - Adrian" (Feb 11th 2014, 2:06pm)


SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

9

Tuesday, February 11th 2014, 2:14pm

Hello Raeisi,

In order to draw a BMP file from external memory, you can use the function GUI_BMP_DrawEx(). For detailed information on how to do this, please refer to the chapter "Displaying bitmap files" in the emWin user manual.

Best regards,
Adrian

Yraeisi

Beginner

Date of registration: Feb 10th 2014

Posts: 5

10

Wednesday, February 12th 2014, 8:10am

Hi Adrian
I want to set BMP for Button.
I can display BMP with GUI_BMP_DrawEx() on screen
:)
,But I can't set BMP for Button
?(
.!!!!!
:?:
PLease help me how I can set BMP for Button?
Thanks so much.
Rds Raeisi

This post has been edited 1 times, last edit by "Yraeisi" (Feb 12th 2014, 8:16am)


SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

11

Wednesday, February 12th 2014, 9:11am

Hello Raeisi,

You can overwrite the callback function of the BUTTON widget in order to draw it yourself. In your custom callback function you can make use of the function GUI_BMP_DrawEx().

Best regards,
Adrian

Yraeisi

Beginner

Date of registration: Feb 10th 2014

Posts: 5

12

Saturday, February 15th 2014, 5:55am

overwrite the callback function of the BUTTON widget?

Hi Adrian
How I do overwrite the callback function of the BUTTON widget?please send a sample if you have.
Rds Raeisi

This post has been edited 1 times, last edit by "Yraeisi" (Feb 15th 2014, 5:56am)


SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

13

Monday, February 17th 2014, 9:06am

Hello Raeisi,

Overwriting the callback function of a window/widget is explained in the chapter "The Window Manager" in the emWin user manual. This is done in a lot of samples you should be able to find in the "Sample" folder in your emWin shipment as well as on www.segger.com.

Best regards,
Adrian

ANK

Beginner

Date of registration: Sep 19th 2014

Posts: 2

14

Monday, October 27th 2014, 10:22am

What is the procedure to convert the images and store it in SD card

Hi,
I want to store the BMP images (converted) into SD card and use those in my code.
Do i have to convert each and every image one by one using BMPConverter and store the .C files in SD card ?
or there is any Graphic resource converter tool which will create a .hex or a combined .c file which i can use for my program ?


thanks.

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

15

Tuesday, October 28th 2014, 9:11am

Hello,

Quoted

store the .C files in SD card ?

Please note that .C files need to be compiled before they can be actually used. In order to use image from an SD card, I would recommend using the emWin dta format. The Bitmap Converter can be used to convert your images to DTA files. For details, please refer to the emWin user manual.

Best regards,
Adrian

anilem

Beginner

Date of registration: Aug 12th 2015

Posts: 1

16

Wednesday, August 12th 2015, 9:14am

Hello,

Is there anybody who can send here one basic example of BUTTON_SetBitmap() please? I couldn't use this function.

Thank you for answers! ^^

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

17

Thursday, August 13th 2015, 11:43am

Hello,

You can try the WIDGET_ButtonPhone.c sample. It can be downloaded from www.segger.com.

Best regards,
Adrian

ajaym006

Beginner

Date of registration: Aug 5th 2016

Posts: 5

18

Monday, September 19th 2016, 3:48pm

Loading a image placed in filesystem into a widget

Hi all,

Could you please give a sample code on How to load a bitmap(can be a jpeg or gif) into a button widget dynamically which is placed inside the file system.
I know it's possible but couldn't get it working. I need the image on top of the widget.


Thanks in advance
Ajay