Latest update has issue with Blend2D

 
Hi there,

My EA has a 24-bit bitmap which no longer shows in my trading panel in the chart.

Claude AI says this is a known new issue.

Can you please advise me when it is fixed or what alrernatives there are?

Thanks,
Steve
Flying Kiwi Trading
 
Can you provide all the files so I can play them? You can send me a private message if you don't want to share them publicly.
 
This problem also occurred for me after the last update.
 
After the latest update, build 5452, .bmp images are no longer displayed.
Files:
build_5430.png  52 kb
build_5452.png  71 kb
 
Mohammad Chavoshi #:
After the latest update, build 5452, .bmp images are no longer displayed.

Last beta is currently 5460. Please check it and confirm.

Please provide example code to reproduce the issue. I personally have no issue with bitmap, so it must be something more specific in your context.

 
Alain Verleyen #:

Last beta is currently 5460. Please check it and confirm.

Please provide example code to reproduce the issue. I personally have no issue with bitmap, so it must be something more specific in your context.

I tested it in Build 5460, it doesn't show up.
I have included part of the code here.
//+------------------------------------------------------------------+
//| Defines                                                          |
//+------------------------------------------------------------------+
#define  STRATEGY_ICON "STRATEGY_ICON"
#define  ACC_ANALYSIS_ICON "ACC_ANALYSIS_ICON"
#define  NEW_ORDER_ICON "NEW_ORDER_ICON"

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit() {
   
   CreateBitmapLabel(STRATEGY_ICON,65,60,32,32,"\\Images\\strategyIcon.bmp",CORNER_RIGHT_UPPER,1);   

   CreateBitmapLabel(ACC_ANALYSIS_ICON,65,110,32,32,"\\Images\\AccAnalysisIcon.bmp",CORNER_RIGHT_UPPER,1);  
   
   CreateBitmapLabel(NEW_ORDER_ICON,65,160,32,32,"\\Images\\NewOrderIcon.bmp",CORNER_RIGHT_UPPER,1); 
   
   return(INIT_SUCCEEDED);
}


   
//+------------------------------------------------------------------+
//| Create Bitmap Label object  Function                             |
//+------------------------------------------------------------------+
void CreateBitmapLabel(string objName, int xD, int yD, int xS, int yS, string file_off, ENUM_BASE_CORNER  corner, long z_order=0) {  
       
// Reset the error value
   ResetLastError();

   ObjectCreate(ChartID(),objName, OBJ_BITMAP_LABEL, 0, 0, 0);  
   ObjectSetInteger(ChartID(), objName, OBJPROP_XDISTANCE, xD);
   ObjectSetInteger(ChartID(), objName, OBJPROP_YDISTANCE, yD);
   ObjectSetInteger(ChartID(), objName, OBJPROP_XSIZE, xS);
   ObjectSetInteger(ChartID(), objName, OBJPROP_YSIZE, yS);
   ObjectSetInteger(ChartID(), objName, OBJPROP_STATE, false);
   ObjectSetString(ChartID(), objName, OBJPROP_BMPFILE, 0, file_off);
   ObjectSetInteger(ChartID(), objName, OBJPROP_CORNER, corner);
   ObjectSetInteger(ChartID(), objName, OBJPROP_BACK, false);
   ObjectSetInteger(ChartID(), objName, OBJPROP_SELECTABLE, false);
   ObjectSetInteger(ChartID(), objName, OBJPROP_SELECTED, false);
   ObjectSetInteger(ChartID(), objName, OBJPROP_HIDDEN, true);
   ObjectSetInteger(ChartID(), objName, OBJPROP_ZORDER, z_order);

// Redraw the chart
   ChartRedraw();

}
Files:
build_5460.png  43 kb
 
Mohammad Chavoshi #:
I tested it in Build 5460, it doesn't show up.
I have included part of the code here.
Without providing the bitmaps I can't comfirm.
 
Alain Verleyen #:
Without providing the bitmaps I can't comfirm.
//---Main Menu
#define  BOX_MAIN_MENU "BOX_MAIN_MENU"
#define  BTN_PLAN_ICON "BTN_PLAN_ICON"
#define  BTN_ACC_ANALYSIS "BTN_ACC_ANALYSIS"
#define  BTN_NEW_ORDER "BTN_NEW_ORDER"

// Top Menu
#define  BOX_TOP_MENU "BOX_TOP_MENU"
#define  BTN_IND_ICON "BTN_IND_ICON"
#define  BTN_CHART_ANALYSIS "BTN_CHART_ANALYSIS"
#define  BTN_NEWS "BTN_NEWS"
#define  BTN_TELEGRAM "BTN_TELEGRAM"
#define  BTN_ORDERFLOW "BTN_ORDERFLOW"


//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
  
  // Get chart window size
   long x_distance;
   long y_distance;
   if(!ChartGetInteger(0, CHART_WIDTH_IN_PIXELS, 0, x_distance)) {
      Print("Failed to get the chart width! Error code = ", GetLastError());
      return(false);
   }
   if(!ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS, 0, y_distance)) {
      Print("Failed to get the chart height! Error code = ", GetLastError());
      return(false);
   }

// Define bitmap label coordinates (center of the chart)
   int x = (int)x_distance / 2;
  
//--------------------------------------> Create Main Menu <--------------------------------------//
   CreateEditBox(BOX_MAIN_MENU, 75, 50, 55, 150, "", 7, clrNONE, color("41,41,41"), clrGray, CORNER_RIGHT_UPPER, 0, true);
   
   //----------------->> Main menu buttons

   CreateBitmapLabel(BTN_PLAN_ICON, 65, 60, 32, 32, "\\Images\\strategy.bmp", CORNER_RIGHT_UPPER, 1);   
   
   
   CreateBitmapLabel(BTN_ACC_ANALYSIS, 65, 110, 32, 32, "\\Images\\Acc_Analysis.bmp", CORNER_RIGHT_UPPER, 1);  
   
   CreateBitmapLabel(BTN_NEW_ORDER, 65, 160, 32, 32, "\\Images\\btnBuySell.bmp", CORNER_RIGHT_UPPER, 1); 
   
  
   
//--------------------------------------> Create Top Menu <--------------------------------------//
   CreateEditBox(BOX_TOP_MENU,x,10,300,40,"",7,clrNONE,color("41,41,41"),clrGray,CORNER_RIGHT_UPPER,0,true);
   
   //---------------->> Top menu buttons
   CreateBitmapLabel(BTN_IND_ICON, x-250, 15, 32, 32, "\\Images\\indicatorIcon.bmp", CORNER_RIGHT_UPPER, 1); 
   
   CreateBitmapLabel(BTN_CHART_ANALYSIS, x-200, 15, 32, 32, "\\Images\\TrendAnalysis.bmp", CORNER_RIGHT_UPPER, 1); 
   
   CreateBitmapLabel(BTN_NEWS, x-150, 15, 32, 32, "\\Images\\news.bmp", CORNER_RIGHT_UPPER, 1);
   
   CreateBitmapLabel(BTN_TELEGRAM, x-110, 17, 24, 24, "\\Images\\TelegramIcon.bmp", CORNER_RIGHT_UPPER, 1); 
   
   CreateBitmapLabel(BTN_ORDERFLOW, x-5, 15, 32, 32, "\\Images\\OrderFlow.bmp", CORNER_RIGHT_UPPER, 1);
   
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   
   ObjectsDeleteAll(ChartID());
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   
  }
//+------------------------------------------------------------------+



//+------------------------------------------------------------------+
//| Bitmap Label creation function                                   |
//+------------------------------------------------------------------+
void CreateBitmapLabel(string objName, int xD, int yD, int xS, int yS,
                       string file_off, ENUM_BASE_CORNER  corner, long z_order) {  
       
// Reset the error value
   ResetLastError();

   ObjectCreate(ChartID(),objName, OBJ_BITMAP_LABEL, 0, 0, 0);  
   ObjectSetInteger(ChartID(), objName, OBJPROP_XDISTANCE, xD);
   ObjectSetInteger(ChartID(), objName, OBJPROP_YDISTANCE, yD);
   ObjectSetInteger(ChartID(), objName, OBJPROP_XSIZE, xS);
   ObjectSetInteger(ChartID(), objName, OBJPROP_YSIZE, yS);
   ObjectSetInteger(ChartID(), objName, OBJPROP_STATE, false);
   ObjectSetString(ChartID(), objName, OBJPROP_BMPFILE, 1, file_off);
   ObjectSetInteger(ChartID(), objName, OBJPROP_CORNER, corner);
   ObjectSetInteger(ChartID(), objName, OBJPROP_BACK, false);
   ObjectSetInteger(ChartID(), objName, OBJPROP_SELECTABLE, false);
   ObjectSetInteger(ChartID(), objName, OBJPROP_SELECTED, false);
   ObjectSetInteger(ChartID(), objName, OBJPROP_HIDDEN, true);
   ObjectSetInteger(ChartID(), objName, OBJPROP_ZORDER, z_order);

// Redraw the chart
   ChartRedraw();

}

//+------------------------------------------------------------------+
//| Create Label                                                     |
//+------------------------------------------------------------------+
void CreateEditBox(string objName, int xD, int yD, int xS, int yS, string txt,
                   int fontS, color clrTxt, color clrBg, color clrBd ,
                   ENUM_BASE_CORNER corner ,long zorder, bool redOnly){
   
   ObjectCreate(0,objName,OBJ_EDIT,0,0,0);
   ObjectSetInteger(ChartID(), objName, OBJPROP_XDISTANCE, xD);
   ObjectSetInteger(ChartID(), objName, OBJPROP_YDISTANCE, yD);
   ObjectSetInteger(ChartID(), objName, OBJPROP_XSIZE, xS);
   ObjectSetInteger(ChartID(), objName, OBJPROP_YSIZE, yS);
   ObjectSetInteger(ChartID(), objName, OBJPROP_CORNER, corner);
   ObjectSetString(ChartID(), objName, OBJPROP_TEXT, txt);
   ObjectSetInteger(ChartID(), objName, OBJPROP_FONTSIZE, fontS);
   ObjectSetInteger(ChartID(), objName, OBJPROP_COLOR, clrTxt);
   ObjectSetInteger(ChartID(), objName, OBJPROP_READONLY,true);
   ObjectSetInteger(ChartID(), objName, OBJPROP_BGCOLOR, clrBg);
   ObjectSetInteger(ChartID(), objName, OBJPROP_BORDER_COLOR, clrBd);
   ObjectSetInteger(ChartID(), objName, OBJPROP_ZORDER,zorder);
   ObjectSetInteger(ChartID(), objName, OBJPROP_READONLY,redOnly);
   
}
Files:
Images.zip  11 kb
 
Mohammad Chavoshi #:

Ok confirmed. 

Workaround : use resource.

#resource "\\Images\\strategy.bmp"

CreateBitmapLabel(BTN_PLAN_ICON, 65, 60, 32, 32, "::Images\\strategy.bmp", CORNER_RIGHT_UPPER, 1);   
 
Alain Verleyen #:

Ok confirmed. 

Workaround : use resource.

Thank you, brother, the problem is solved🙏😎
 
Fixed in 5478 (possibly before but I could not check).