Problem with using bitmap files

 

Hello.

Try to add as resource   2   .bmp  files. I have put both in correct directory 


#resource "\\Images\\Data\\b_close.bmp"
#resource "\\Images\\Data\\b_exit.bmp"

Compiling generate following error :

unsupported image format 'C:\Users\PC\AppData\Roaming\MetaQuotes\Terminal\9EB2973C469D24060397BB5158EA73A5\MQL5\Images\Data\b_close.bmp' ResourceSFRS.mqh 8 1


As I well understand compilator have problem only with one file.  Is there any limitation for .bmp files ?


In attachment zip with both files  and screenshot after compile 



Files:
b_close.zip  2 kb
error.jpg  40 kb
 
Piotr Storozenko:

Try to add as resource   2   .bmp  files. I have put both in correct directory 

Compiling generate following error :

unsupported image format 'C:\Users\PC\AppData\Roaming\MetaQuotes\Terminal\9EB2973C469D24060397BB5158EA73A5\MQL5\Images\Data\b_close.bmp' ResourceSFRS.mqh 8 1

As I well understand compilator have problem only with one file.  Is there any limitation for .bmp files ?

In attachment zip with both files  and screenshot after compile 

Just an idea: try to convert the file to true color, currently it has 256 colors.

 
Stanislav Korotky #:

Just an idea: try to convert the file to true color, currently it has 256 colors.

Thanks a lot! It work!