Libraries: PNG

 

PNG:

Forget about BMP files like a bad dream. With this library, you will now be able to use the more advanced and compact PNG image format for your programs.

PNG

Author: BeeXXI Corporation

 
A very useful library. Thanks for sharing.
 
Great work thanks 
 
Thanks! :)
 
Thanks for sharing. Great work ;-)
 

Perfectly! I can't believe what this code is written on MQL!

Keep it up!

 
New version of the library.
Unfortunately, CB does not allow you to update the code.
Added the LoadPngFromFile() function, which can be useful if you need to reload a PNG file after initialization.
Files:
Png.mqh  38 kb
 
Absolute life saver! Deserves 100 stars!
 

Congratulations very good, thank you for sharing. very good congratulations.

Auto-translation applied by moderator

 
@Ney Borges #: Congratulations very good, thank you for sharing. very good congratulations.

Auto-translation applied by moderator

On the English forum, please write in English. Either use the automatic translation tool, or post in one of the other language forums.
 
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:


Example of using an array:#include <Canvas\iCanvas_CB.mqh> // https://www.mql5.com/ru/code/22164
#include <Canvas\png.mqh>
#resource "//Images//refresh.png" as uchar png_data1[]
#resource "//Images//settings-sliders.png" as uchar png_data2[]
#resource "//Images//chart-histogram.png" as uchar png_data3[]

CPng PNG[3];

int OnInit() {
   PNG[0].LoadPngFromBinArray(png_data1);
   PNG[1].LoadPngFromBinArray(png_data2);
   PNG[2].LoadPngFromBinArray(png_data3);
...
Files:
Png.mqh  39 kb