Libraries: PNG - page 2

 
Nikolai Semko #:
New version of the library 1.04
Unfortunately, CB does not allow you to update the code.

Added a default constructor to allow array declarations.


Example of using an array:

You can update the code in CB if you specify a valid #property version string. It needs to be greater than the last version.
 
Dominik Egert #:
You can update the code in CB if you specify a valid #property version string. It needs to be greater than the last version.

That's what I do, but unfortunately it doesn't work.


 
can you make this or MT4 please?
 
Patar Ferry C P Napit #:
can you make this or MT4 please?

https://www.mql5.com/en/forum/467203#comment_53418848

see working example in mql4.zip file

PNG image on the MT4 Chart is not working!
PNG image on the MT4 Chart is not working!
  • 2024.05.18
  • Anass Habrah
  • www.mql5.com
Hello, I'm tryng to show png image on the chart when i do run the EA, below the related script: as you see in the attached screenshot, it is showin...
 
Could you please have code to display walking bear at bottom of chart (from x = 0 -> width) (gif animation) show the remain time
 
Vu Bao Linh #:
Could you please have code to display walking bear at bottom of chart (from x = 0 -> width) (gif animation) show the remain time

Like this?

 
new meta editor update causing this warning to pop up:

'struct CPoint' initialized from type type 'CPoint' using assignment operator, this behavior is deprecated and will be removed in future Canvas.mqh 2898 17


CPoint tmp=p[0];
 
Muhammad Fahad #:
new meta editor update causing this warning to pop up:

'struct CPoint' initialized from type type 'CPoint' using assignment operator, this behavior is deprecated and will be removed in future Canvas.mqh 2898 17


The problem is not in my library. The CPoint class is a standard library class Rect.mqh, which in turn is referenced by the standard library Canvas.mqh. Wait for MQ to fix this file.

By the way, I have build 5227 and there are no warnings during compilation.
 
Latest version of png.mqh.
I don't know why, but I can't update the file in the codebase.

Files:
Png.mqh  52 kb
 

fix:

           int byteWidth = 0 ;
           switch (header.colorType) {
             case 6 :   // RGBA 
              byteWidth = 4 ;
               break ;
             case 2 :   // RGB 
              byteWidth = 3 ;
               break ;
             case 3 :   // Palette 
              byteWidth = 1 ;
               break ;
          }


           ArrayResize (imagePixels, imageWidth * imageHeight);
           ArrayResize (previousRow, imageWidth * byteWidth); 

Using the attached image will cause the program to encounter an array out-of-bounds error. The code above is the fixed version.

Files:
location.png  3 kb