download color palette from the internet
int download_palette( LPCSTR lpcszURL, LPCSTR lpcszPALfilename = NULL )
0 if SUCCESS or a error number
EX1
#include <..\originlab\palette_utils.h> void download_palette_ex() { //online palette file url string strURL = "https://www.benjaminmoore.com/-/media/sites/benjaminmoore/files/palettedownloads/ase/en-us/benjaminmoore_off-whitecolors_en-us.ase"; //prepare local file string strPALFile = GetAppPath() + GetFileName(strURL, true)+".pal"; //download the online file and save it as .pal file int nRet = download_palette(strURL, strPALFile); if(0 == nRet) printf("online file:\n%s\nis saved as:\n%s\n", strURL, strPALFile); else out_str("fail"); }
palette_utils.h