BMP File Not Loading

 

Hello everyone,

Quick question.

I believe the problem I am experiencing is because I have converted the external image to a bmp file online  // I used a free website but will not share the link because I do not think external links are allowed :( 

Here is the code and this is the output. However, when I replace the filename with the standard euro.bmp file, it works well.

Can anyone please suggest me how best to convert my png files to bmp or is there any size restriction for the image? Thank you!

   ObjectCreate(0, "foto", OBJ_BITMAP_LABEL, 0, 0, 0);
   ObjectSetString(0, "foto", OBJPROP_BMPFILE, "\\Images\\test.bmp");
   ObjectSetInteger(0, "foto", OBJPROP_XDISTANCE, 20);
   ObjectSetInteger(0, "foto", OBJPROP_YDISTANCE, 20);


 
Chioma Obunadike:

Hello everyone,

Quick question.

I believe the problem I am experiencing is because I have converted the external image to a bmp file online  // I used a free website but will not share the link because I do not think external links are allowed :( 

Here is the code and this is the output. However, when I replace the filename with the standard euro.bmp file, it works well.

Can anyone please suggest me how best to convert my png files to bmp or is there any size restriction for the image? Thank you!


theres a Png library actually . But you cannot include pngs so you can use the library to turn png to mq bmp and save it.

https://www.mql5.com/en/code/45439

PNG
PNG
  • www.mql5.com
Forget about BMP files like a bad dream. Thanks to this library, you can now use the PNG format, which has a number of advantages, such as being more compact without losing image quality and maintaining transparency.
 
Lorentzos Roussos #:

theres a Png library actually 

https://www.mql5.com/en/code/45439

thank you. absolute lifesaver

 
Chioma Obunadike #:

thank you. absolute lifesaver

awesome dont forget to rate it 5 stars

Reason: